Skip to content

Set Results Modernized

CI opencode edited this page Sep 13, 2026 · 15 revisions

Set Results — Modernized Screen

Modernization of the legacy "set results" execution popup (lib/execute/execSetResults.php, level=testcase mode, gui/templates/dashio/execute/execSetResults.tpl) — GitHub issue #817. The legacy Smarty screen is replaced by a standalone Dashio page (gui/templates/execute/execSetResults.html) backed by a plain-PHP REST BFF API (api/execsetresults/index.php). The 5 report screens that still opened the legacy execSetResults.php popup (tcasesWithCF, resultsMatrix, assignedTcOverview, tcAssignments, and the shared gui/javascript/testlink_library.js openExecutionWindow() helper) now open the modern screen instead. Path: reached from report screens (Results matrix, TC with CF, Assigned TC overview, TC assignments) — row execute icon opens the popup. URL: gui/templates/execute/execSetResults.html?tplan_id=..&tcase_id=..&tcversion_id=..[&setting_build=..][&setting_platform=..] BFF API: GET ?action=init + POST ?action=save on /api/execsetresults/ Rights: testplan_execute (full) or exec_ro_access (read-only — Save disabled and server rejects write). Tracking issue: #817

Behavioral parity with the legacy controller

The BFF reproduces the level=testcase path of lib/execute/execSetResults.php:

  • GET ?action=init resolves test plan + owning project (access-checked), test case + version (must belong to the case AND be linked to the plan), and returns:
    • test case context (external id, name), version (summary, preconditions, importance, execution type),
    • steps (sorted by step_number),
    • builds of the plan (executable = active+open; newest active+open wins as default),
    • platforms linked to the plan (empty → UI hides the selector),
    • execution status vocabulary (f/b/p/n/x/u — the legacy virtual filter status a/All is excluded),
    • grants (testplan_execute / exec_ro_access / edit_testcase),
    • prior execution of this version on this build+platform, including recorded step-level results (partial-execution feature) so the form resumes the last run.
  • POST ?action=save writes the execution with write_execution() (exec.inc.php), payload shape identical to api/execute?action=save: status code, notes, optional per-step results (step ids validated to belong to the version → forged ids skipped), execution duration, platform id. not_run results are ignored (legacy parity), non-executable builds and unlinked versions are rejected.

Parameter normalization

Legacy callers used different key names (from level=testcase cookie-settings contract and openExecutionWindow()):

Modern Legacy aliases
tcase_id id
tcversion_id version_id
build_id setting_build
platform_id setting_platform

Edit test case on execution (Refs #1400)

Legacy parity: exec_show_tc_exec.inc.tpl:476-481 shows a note_edit icon (gated on grants->edit_testcase = mgt_modify_tc at project+plan level, execSetResults.php:1425) left of the TC title, calling openTCaseWindow(tcase_id, tcversion_id, 'editOnExec&tplan_id=…') which opens the TC-spec viewer in a TestCaseSpec popup. The modern popup mirrors this:

  • BFF GET ?action=init returns grants.edit_testcase (1/0) computed with the exact legacy scope hasRight('mgt_modify_tc', tproject_id, tplan_id).
  • UI when granted, a pencil icon (tooltip "Show Test Case specification") precedes the TC title (TC-1 (v1)) in the header card. It opens the modern TC-spec viewer gui/templates/testcases/tcView.html?tcase_id=..&tcversion_id=..&tproject_id=.. in a TestCaseSpec popup — the modern equivalent of the legacy archiveData.php?show_mode=editOnExec viewer (tcView.html itself offers the "Edit Version" button to users with design rights; window name TestCaseSpec is kept so repeated clicks reuse the popup, legacy behavior). Users without mgt_modify_tc see the plain-text title (no icon, no popup).

Auto-refresh after on-exec TC edit (Refs #1479)

Legacy parity: the legacy editOnExec viewer wired testcase.class.php:7447-7460

  • gui/javascript/testlink_library.js:712-757 (dialog_onLoad/dialog_onUnload) so the exec popup auto-refreshed when the TestCaseSpec popup closed after an edit. Issue #1479 restores that behavior in the modern popup with a same-origin postMessage signal chain (no backend change):
  • execSetResults.html openTcSpecWindow() opens the viewer with &editOnExec=1&tplan_id=.. and a message listener reloads the execution context (loadInfo(), the modern equivalent of the legacy top.opener.location reload) and shows a toast ("Test case updated. Refreshing execution context...") when a tcedit-saved message arrives for the CURRENT test case.
  • tcView.html detects editOnExec=1, appends it to the tcEdit.html URL its "Edit Version" button opens, and forwards the editor's tcedit-saved notification to window.opener (the exec popup) while refreshing its own view.
  • tcEdit.html after a successful update or create_version, if editOnExec=1, postMessage({type:'tcedit-saved', tcase_id, tcversion_id}) to window.opener. i18n: esr.tcUpdated in all 10 locale bundles.

Screen layout

Section Description
Header "Set Results" + TC external id / name / version
Toolbar Test Project / Test Plan context + locale switcher
Plan context Build selector (all builds; closed ones marked (closed)) + Platform selector (hidden when plan has none)
Prior execution Info box showing last result / tester / timestamp / notes (resumes the run; hidden when the selected build has no execution)
TC content Summary, Preconditions, Steps table (per-step status + notes)
Result Overall-result status buttons (colored) + Notes + Execution time (minutes)
Actions Save result (disabled for read-only) and Cancel

Flow

  1. The popup loads and calls GET ?action=init with the plan/case/version ids (plus optional build/platform). The BFF resolves context and returns it, pre-selecting the prior execution status if one exists.
  2. The tester sets the overall result, optionally per-step results/notes and a note + execution duration, then clicks Save result.
  3. The front-end POST ?action=save (JSON). The BFF writes the execution and returns {status:ok, saved:true, execution_id}; the toast confirms.

TC design-info sub-sections (Refs #1404)

The legacy popup showed three design-info blocks under the steps table: the linked Requirements list, the test case relations table and the Keywords line. All three are reimplemented in the modern screen, fed by the same GET ?action=init call (requirements, relations, keywords, requirements_enabled).

  • Keywords: one line Keywords: kw1, kw2, … rendered only when the version has keywords (legacy exec_test_spec.inc.tpl).
  • Linked Requirements: a list of links /lib/requirements/reqView.php?showReqSpecTitle=1&requirement_id=..&tproject_id=.., titled [spec] : REQ-1 : Title [Version n]; rendered only when the project enables requirements (requirementsEnabled) AND the user has mgt_view_req. Empty result collapses the section (matches legacy DF-empty behavior).
  • Test case relations: table with ID/Type + Test case columns. Each row carries the relation id, the localized type label and, for every linked case version, three popup icons: execution history (execHistory.html?tcase_id=..&tproject_id=..), execute (execSetResults.html?tcase_id=..&version_id=..&level=testcase&id=..&tplan_id=..&setting_build=..&setting_platform=..) and design (tcView.html?tcase_id=..&tcversion_id=..&tproject_id=..). Relation type labels come from $tlCfg->testcase_cfg->relations->type_labels; both directions (source/destination) are shown per legacy exec_tc_relations.inc.tpl. All new labels are i18n keys (esr.keywords, esr.relations, esr.relationIdType, esr.testCase, esr.requirements, esr.clickToOpen, esr.execHistory, esr.executeRel, esr.designRel) present in all 10 locale bundles.

Read-only access

A user with only exec_ro_access sees the full context (steps, prior execution) but the Save result button is disabled client-side AND the save route returns HTTP 403 Insufficient rights server-side. testplan_execute is required to write.

Closed builds (issue #1403)

The BFF init returns every build of the plan (id/name/active/open/executable/release_date, executable = active AND open). The legacy popup shows a closed build with a "Build is closed / Test cases can not be executed" banner and blocks new execution while still allowing result review — the modern popup mirrors this:

  • The build selector lists all builds (closed ones suffixed (closed)), so a closed build never silently disappears from the dropdown.
  • Selecting a closed build shows the amber "Build is closed. Test cases can not be executed." box and switches the popup to review-only: Save, status buttons, step selects/notes, Notes and Execution-time are disabled, but the build selector stays enabled so the tester can switch back.
  • Switching builds re-runs GET ?action=init for the new setting_build, so the banner and the prior-execution box always reflect the ACTUAL selected build (a build with no execution hides the prior box).
  • doSave() defensively re-validates the selected build and aborts with esr.errClosedBuild ("Selected build is closed - result not saved.") if the UI state was somehow bypassed.
  • Server-side the save route already rejected closed builds (HTTP 400 "Invalid or non-executable build"), so data was always safe; this change only restores the missing user-facing signal. i18n keys (all 10 locale bundles): esr.closedBuild, esr.buildClosedMsg, esr.errClosedBuild.

Case navigation: Move to Previous / Next + Save and move to next (Refs #1402)

The legacy popup's action bar offered Move to next test case, Save result, Save result and move to next and Move to previous test case (gui/templates/dashio/execute/include/exec_controls.inc.tpl:84-103, lib/execute/execSetResults.php:617-632); the initial 2.0.1 port shipped only Save + Cancel. Issue #1402 restores the full navigation.

  • BFF (api/execsetresults/index.php): ?action=init now returns save_and_move (from $tlCfg->exec_cfg->exec_mode->save_and_move, default unlimited) and nav {mode, prev:{tcase_id,tcversion_id}|null, next:...} describing the sibling chain:
    • unlimited — cyclic walk of the plan's linked case versions ordered by node_order, tc_external_id (deduped by tcversion); Next from the last case wraps to the first, Previous from the first wraps to the last.
    • limited — via the exact legacy testplan::getTestCaseNextSibling() (local scope): Next stops at the last case (prev:null / next:null when no sibling), Previous clamps at the first.
  • Front-end (gui/templates/execute/execSetResults.html): action bar shows Move to Previous Test Case, Save result, Save and move to next, Move to Next Test Case, Cancel. navTo(dir) keeps the selected build/platform, rewrites the popup URL in place (id/tcase_id/version_id/ tcversion_id) and re-runs init. doSave(navNext=true) saves then moves to next — including the legacy not_run case (nothing recorded, still navigates). Closed-build / read-only state disables Save, Save and move to next, Next and Previous.
  • i18n: esr.moveToNext, esr.moveToPrevious, esr.saveAndMoveNext, esr.noNextCase, esr.noPrevCase in all 10 locale bundles.

Per-step attachments & Steps Work In Progress save (issue #1401)

The legacy popup allowed a file to be attached per execution step on result save (exec_test_spec.inc.tpl:53-73 → uploadedFile[<step_id>][], consumed by write_execution() in lib/functions/exec.inc.php:255-321), plus a partial save of step results before the execution was formally completed (execSetResults.php:333-343 → testcase::saveStepsPartialExec(), persisted in execution_tcsteps_wip, testcase.class.php:9658-9699). Neither was present in the initial 2.0.1 popup port. Issue #1401 restores all three.

  • BFF (api/execsetresults/index.php):
    • ?action=init returns feature gates steps_exec, steps_exec_attachments, attachments_enabled (from $tlCfg->exec_cfg->steps_exec / steps_exec_attachments, config.inc.php:1140-1144, and the attachments module flag).
    • esrPriorExecution() additionally exposes, per step, the prior execution's step attachments (from attachments where fk_table='execution_tcsteps') as prior_steps[<stepId>].attachments[] with download_url (/lib/attachments/attachmentdownload.php?id=).
    • New POST ?action=save_partial persists step results into execution_tcsteps_wip (validates plan/build rights, open build, and that every step id belongs to the selected tcversion; ctx testplan_id, platform_id, build_id, tester_id).
  • Front-end (gui/templates/execute/execSetResults.html):
    • Each step row shows the File: uploader (multiple) plus prior attachment download links when the feature flags are on.
    • Under the steps table: the legacy ATTENTION banner "When saving Steps Work In Progress Execution, Attachments will not be saved" and the Save Steps Work In Progress Execution button.
    • doSave() now posts FormData multipart (overview fields + steps[<sid>][status] / steps[<sid>][notes] + files as uploadedFile[<sid>][]), so step files attach on the full save (write_execution() also deletes the WIP rows).
    • Closed build disables the file inputs and the WIP save.
  • i18n: esr.localFile, esr.stepFiles, esr.partialExecWarn, esr.savePartialExec, esr.partialSaved, esr.errPartialSave in all 10 locale bundles.
  • Test cases: TLU suite #1401, 11/11 PASS (tmp/TLU_Test_Cases.md).

Execution & tc-level attachments, copy-from-latest and upload (issue #1394)

The popup computed the prior run's execution-level attachments (esrPriorExecution() → prior.attachments) but never rendered them, and offered no way to attach files to the NEW execution (the legacy popup had download links for the prior run + an upload via openFileUploadWindow()/copyAttFromLEXEC). Issue #1394 restores all of it.

  • BFF (api/execsetresults/index.php):
    • ?action=init now returns tc_attachments (tcversion-level download-only links, getAttachmentInfos(...,'tcversions') — legacy exec_test_spec.inc.tpl:134-139) and new_exec_latest (1 when exec_cfg->exec_mode->new_exec == 'latest', config.inc.php:1111 — the legacy copy-checkbox gate, exec_img_controls.inc.tpl:69-73).
    • POST ?action=save parses copy_att_from_lexec; captures the latest execution id in context (testcase::getLatestExecIDInContext, execSetResults.php:1731-1733) BEFORE writing; after write_execution() + re-read of the fresh row it copies exec-level attachments (tlAttachmentRepository::copyAttachments(...,'executions')) plus step-level attachments (execution_tcsteps rows matched by step_number — execSetResults.php:184-205), then sinks any exec_attachments[] files onto the new execution row via insertAttachment (no uploadedFile — mirrors api/execute?action=save). Response adds attachments_uploaded / attachments_rejected.
  • Front-end (gui/templates/execute/execSetResults.html):
    • New renderExecAttachments() block: prior-run execution-attachment download links, a "Copy attachments from latest execution" checkbox (shown only when new_exec_latest && a prior execution exists), and a multi-file upload picker (exec_attachments[]) — hidden when attachments_enabled is off.
    • New #tcAttsBox renders the tcversion-level attachment download links (hidden when empty).
    • doSave() forwards copy_att_from_lexec=1 + exec_attachments[] in the FormData; applyBuildState() disables the upload + copy controls on closed builds / read-only while keeping the prior-run links reviewable; attachments_rejected shows a warning toast after save.
  • i18n: new esr.tcAttachments in all 10 locale bundles; reused esr.attachments, exe.copyAttFromLatest, exe.attachmentsUpload, exe.noAttachments, exe.attachmentsRejected.
  • Test cases: TLU suite #1394, 8/8 PASS (tmp/TLU_Test_Cases.md).

Test suite block (issue #1399)

The legacy popup showed a test-suite block above the TC summary (gui/templates/dashio/execute/include/exec_show_tc_exec.inc.tpl:36-71): a link to the owning test suite opening the legacy suite viewer (openTestSuiteWindow, gui/javascript/testlink_library.js:1529 → archiveData.php?edit=testsuite), the suite details, the suite's design-time custom fields (testsuite::html_table_of_custom_field_values, lib/functions/testsuite.class.php:1419, values from cfield_design_values keyed by the suite node), and the suite attachments (getAttachmentInfos(..., 'nodes_hierarchy', ...), lib/execute/execSetResults.php:1766-1769/1980-1983). The initial 2.0.1 port dropped the whole block. Issue #1399 restores it.

  • BFF (api/execsetresults/index.php): esrTestSuite() walks up from the test case through nodes_hierarchy until it reaches a testsuite node (returns null when the TC sits directly under the project), then returns:
    • id / name / details / path (branch from the project down),
    • cfs[] — suite design-time custom fields (all get_linked_cfields_at_design fields; values read from cfield_design_values on the suite node, formatted via cfield_mgr::string_custom_field_value),
    • attachments[] — attachments where fk_table='nodes_hierarchy' and fk_id=<suite id>, each with download_url (/lib/attachments/attachmentdownload.php?id=). ?action=init includes it as the suite key.
  • Front-end (gui/templates/execute/execSetResults.html): the suiteBox block renders "Test Suite : " (link + icon that opens the modern viewer suiteView.html?id=<suite>&tproject_id=<project> in a new window), the DETAILS text, the TEST SUITE CUSTOM FIELDS table (Field/Value) and the ATTACHMENTS list. The block is hidden when suite is null.
  • i18n: esr.testsuite, esr.details, esr.attachments, esr.suiteCfs, esr.cfField, esr.cfValue, esr.openSuite in all 10 locale bundles.
  • Test cases: TLU suite #1399 (see tmp/TLU_Test_Cases.md).

Header execInfo strip, notes panels, execution meta (issue #1398)

The legacy popup rendered, in its app-header, an "execInfo" strip + the notes sections + the type/duration rows that the initial 2.0.1 port dropped:

  • Copy direct link to this execution — legacy tplan_id/tcversion_id/ build_id feature-id resolution (execSetResults.php buildExecContext + getFeatureID) exposed by init as feature_id + direct_link. The popup's header Copy link button toggles an inline read-only input with the full URL (basehref/ltx.php?item=exec&feature_id=…&build_id=…, exactly the legacy format) and a clipboard copy (navigator.clipboard + execCommand fallback).
  • Print — header button calling window.print().
  • Import XML Results — header button opening the modern import popup gui/templates/results/resultsImport.html with tproject_id, tplan_id, build_id and platform_id of the current context.
  • Execute and Save Results (remote exec) — gated on exec_cfg-> enable_test_automation (default DISABLED: button hidden and the BFF action answers 403). When enabled, POST ?action=remote_exec ports do_remote_execution() (lib/execute/execSetResults.php:1066): runs executeTestCase() against the automation server configured via the design-time custom fields (getXMLRPCServerParams) and, on a now result, writes an AUTO execution row (TESTCASE_EXECUTION_TYPE_AUTO, db->db_now(), insert_id()); configProblems/connectionFailure surface the localized server message.
  • Notes panels — collapsible Test Plan / Build / Platform boxes (the execTest.html Refs #1163 pattern) with the plan+build design-time custom fields scoped by show_on_execution=1 (html_table_of_custom_field_values equivalent), fed by new init fields tplan_notes/build_notes/ platform_notes/tplan_cfs/build_cfs. Empty boxes are skipped.
  • Execution meta row — "Execution type: Manual/Automated | Estimated execution duration: N minutes" (decimal preserved), from init execution_type_label + estimated_exec_duration. BFF additions (all in api/execsetresults/index.php): esrDirectLink(), esrExecutionTypeLabel() (uses TESTCASE_EXECUTION_TYPE_AUTO), and esrNotesPayload(). i18n: 14 new esr.* keys in all 10 locale bundles. Test cases: TLU suite #1398 (see tmp/TLU_Test_Cases.md).

Tester assignment display + "Assign task to me" (issue #1397)

The legacy popup showed the tester assignment of the executed version inside its title block, and offered to claim an unassigned task on save — both were dropped in the initial 2.0.1 port:

  • Assignment line — legacy exec_show_tc_exec.inc.tpl:484-491: when the version has no tester in the current plan/build/platform context, an amber box "No tester assigned" (warning icon); otherwise a teal box "Assigned to: " (user icon). Display names come from testcase::get_version_exec_assignment() + tlUser::getDisplayName(), comma-joined exactly like legacy setTesterAssignment() (execSetResults.php:1195-1225).
  • Assign task to me — legacy exec_controls.inc.tpl:52-60: only shown (and only savable) while the version has no tester AND the user can execute. On save the BFF claims the version for the current user (assignment_mgr::assign(), exactly the execSetResults.php:208-219 flow). Default state follows exec_cfg->exec_mode->assignTaskChecked (default false). The checkbox is disabled on closed builds / in read-only mode (grants.can_execute=0 hides it entirely for RO users).
  • Legacy parity on not_run — a not_run save with the box checked still creates the assignment: the BFF applies assign_task BEFORE the legacy not_run early-return (write_execution() skips not_run INSERTs but the claim must still happen).
  • Assignment line survives the save — the popup re-fetches its context after every save, so the warning + checkbox are replaced by the new assignee without a manual reload. BFF additions in api/execsetresults/index.php: init now returns assignment {assigned_to, assigned_user_ids, has_no_assignment, assigned_to_me} + assign_task_default_checked; the save handler accepts assign_task=1 (values 1/true/on/yes). i18n: esr.assignedTo, esr.hasNoAssignment, esr.assignTaskToMe in all 10 locale bundles (reusing the existing exe.* translations). Test cases: TLU suite #1397 (see tmp/TLU_Test_Cases.md).

Newer-version handling: auto-bump, hasNewestVersion warning + update-link (issue #1396)

The legacy popup silently executed the newest plan-linked version of the requested test case (auto-bump via getLinkedItems, execSetResults.php:2085-2090) and, when the executed version was NOT the newest one available at all, displayed a warning + offered "Update Linked TCV To The Latest" (hasNewestVersion @ :1725-1728, updateTPlanLinkToLatestTCV @ :83-88, exec_show_tc_exec.inc.tpl:455-474). The initial 2.0.1 port dropped all of it. Refs #1396 ports it end-to-end:

  • Auto-bump (BFF init) — new esrNewestVersion() compares the requested version against the newest version linked to the plan for that test case (join testplan_tcversions → nodes_hierarchy, max version); when a newer linked version exists, init resolves it transparently, exactly like legacy. Payload additions: has_newest_version (0/1 — executed version is NOT the newest available = getLatestVersionID overall), newest_version_id, newest_version_number.
  • Warning + update-link button (UI) — #newestVerBox alert (warning icon, .nv-box teal/amber palette consistent with the screen) under the card title bar: "Attention: This is not the latest available version (Version v2)" and the "Update Linked TCV To The Latest" button. Rendered by renderNewestVersion() only while grants.can_execute — read-only / closed-build users see no action.
  • POST ?action=update_link (BFF) — 405 on GET, 409 when the newest available version is already plan-linked (forged re-point would hit the testplan_tcversions_tplan_tcversion unique key), errors when the version does not belong to the test case (404) or the caller can't execute (403), then re-points the plan link via the legacy testcase::updateTPlanLinkToLatestTCV($tcversionId,$tplanId,null) (which also re-points existing executions + cfield_execution_values). Responds {status,new_tcversion_id,new_version_number}; the popup rewrites its URL to version_id/tcversion_id = new, reloads context, and the warning disappears.
  • i18n (all 10 bundles): esr.hasNewestVersionMsg, esr.updateLinkToLatestTCVersion, esr.errUpdateLink, esr.linkUpdated. Test cases: TLU suite #1396 (see tmp/TLU_Test_Cases.md).

Issue-tracker integration in the popup (issue #1393)

The legacy Set Results popup embedded the issue-tracker workflow of execSetResults.php — create-issue-on-save (bug_create_into_bts + create_issue.inc.tpl), the copy issues-from-latest-execution checkbox (exec_cfg->copyLatestExecIssues, config.inc.php:1169-1180) and the linked-bug table / link-create-delete icons of the prior-execution history row (inc_show_bug_table.tpl + open_bug_add_window).

BFF (api/execsetresults/index.php):

  • esrItsSetup() / esrItsBlock() — the its init block: enabled, tracker_name, up_and_running, tl_can_create_issue, bug_summary_max_length, edit_issue_attr, create_issue_url, copy_latest_exec_issues_enabled/_default, add_link_to_tl_checked/_print_view_checked, metadata (JIRA selects; GitHub null), issue_type/issue_priority/artifact_version/artifact_component.
  • esrExecBugs() — prior.bugs[] (id, bug_url, is_resolved, tcstep_id, step_number) + prior.build_open.
  • save: honours create_issue/bug_summary/bug_notes/add_link_to_tl(_print_view)/ copy_issues + metadata; creates the issue via $its->addIssue() (returns ['status_ok','id','msg']) then write_execution_bug(). Copy-issues source captured before write_execution() (legacy execSetResults.php:147-151 — otherwise the fresh row would be "latest" and copy no-op). Response gains add_issue + copy_issues.
  • New actions linkBug/createBug/unlinkBug (POST JSON, case level) gated by esrExecBugContext() (testplan_execute + plan membership + open build).
  • esrIssueDescription() reproduces the legacy generated text with %%EXECID%% %%TESTER%% %%TESTPLAN%% %%PLATFORM_VALUE%% %%BUILD%% %%EXECTS%% %%EXECSTATUS%% %%TCNAME%% %%TCEXTID%% + %%EXECPLINK%%/%%EXECATT:n%%. New server labels tc_name, tc_external_id, github_bug_created, github_bug_comment in all 10 locale/*/strings.txt.

UI (gui/templates/execute/execSetResults.html):

  • ITS panel (tracker header, Create Issue → summary/description/add-link fields + metadata selects, Copy issues checkbox gated on the config feature).
  • Prior-box bug chips (open / link / unlink / add icons) gated on ITS connected + grants.can_execute + prior.build_open.
  • #linkBugModal mirroring the modern Execute screen modal (link-existing / create-new toggle, create mode pre-fills description with tc external id + name).
  • Closed-build / read-only freezes the ITS write controls.

ITS panel Prior-execution bug chips + ITS panel

i18n: 30 new esr.* keys in all 10 bundles. Test cases: TLU suite #1393. Events during testing: only audit rows (log_level 16), zero ERROR/WARNING.

Execution history — history_on toggle + exec_history table (Refs #1392)

The legacy execSetResults.php embedded a per-tc execution history behind a session history_on toggle (manage_history_on()) plus a "Latest execution (any build)" box. All of it is restored:

  • Toolbar toggle — History: ON/OFF button (esr.historyOn/Off, tooltips esr.historyToggleOn/Off) persists via POST ?action=set_history (session-scoped, survives navigation / plan switches, default OFF from config.inc.php history_on=false).
  • History OFF (default): the "Latest execution (any build)" box (esr.lastExecAnyBuild, gated on show_last_exec_any_build) + a LAST EXECUTION (CURRENT BUILD) table with exactly the last execution of the selected build/platform (legacy get_last_execution wrapped set).
  • History ON: the full exec_history table, one row per historical execution, DESC-ordered (history_order=DESC). Build/Platform columns are dropped when show_history_all_builds / show_history_all_platforms are false (matches legacy). Each row shows date/build/platform/tester/status badge/duration/version/attachments/run-mode, the per-execution actions (edit notes → editExecution.html, attachment upload, print preview → execPrint.html, delete with confirm) and the notes/custom-fields/ attachments/bugs sub-rows. Bug chips + link/create icons render when the ITS is connected and the execution's build is still open (esr.linkBug).
  • BFF (api/execsetresults): init returns history (incl. last_any_build) + other_execs[] with row-level can_edit_notes / can_delete grants (legacy exec_edit_notes / exec_delete), local bug chips, attachment links and cf_html from html_table_of_custom_field_values. New actions: set_history and deleteExecution (plan-scoped + exec_delete + open-build gate, mirrors api/execute).
  • i18n (Refs #1392): esr.historyOn/Off, esr.historyToggleOn/Off, esr.lastExecAnyBuild, esr.lastExecCurrentBuild, esr.executionHistory, esr.actions, esr.attachFiles, esr.status added to all 10 bundles.

Execution history (history ON)

Clone this wiki locally