diff --git a/tcms/testruns/static/testruns/js/get.js b/tcms/testruns/static/testruns/js/get.js index 13d80d518d..446f129444 100644 --- a/tcms/testruns/static/testruns/js/get.js +++ b/tcms/testruns/static/testruns/js/get.js @@ -113,6 +113,8 @@ function renderTestExecutions(testExecutions, executionStatuses) { } function renderAdditionalInformation(testExecutions, testExecutionCaseIds) { + $('.test-executions-count').html(testExecutions.length); + jsonRPC('TestCase.filter', { 'id__in': testExecutionCaseIds }, testCases => { testExecutions.forEach(testExecution => { const testCase = testCases.find(testCase => testCase.id === testExecution.case_id) @@ -156,55 +158,55 @@ function renderTestExecutionRow(template, testExecution, testExecutionStatus) { /////// and need updates before they can be used again /////// function changeExecutionAssignee() { - const executions = 0 // todo: this is the list of all selected executions - if (!executions.length) { - window.alert(default_messages.alert.no_case_selected); - return false; - } -//todo: all texts in alert/prompt must come translated from the HTML template - var assignee = window.prompt('Please type new email or username for assignee'); - if (!assignee) { - return false; - } - executions.forEach(execution_id => jsonRPC('TestExecution.update', [execution_id, {'assignee': assignee}], () => { }, sync=true)); - window.location.reload(); + const executions = 0 // todo: this is the list of all selected executions + if (!executions.length) { + window.alert(default_messages.alert.no_case_selected); + return false; + } + //todo: all texts in alert/prompt must come translated from the HTML template + var assignee = window.prompt('Please type new email or username for assignee'); + if (!assignee) { + return false; + } + executions.forEach(execution_id => jsonRPC('TestExecution.update', [execution_id, { 'assignee': assignee }], () => { }, sync = true)); + window.location.reload(); } function updateExecutionText() { - const executions = 0 // todo: this is the list of all selected executions - if (!executions.length) { - window.alert(default_messages.alert.no_case_selected); - return false; - } -//todo: translations - executions.forEach(executionId => - jsonRPC('TestExecution.update', [executionId, {'case_text_version': 'latest'}], () => { }, sync=true) - ); - window.location.reload(true); + const executions = 0 // todo: this is the list of all selected executions + if (!executions.length) { + window.alert(default_messages.alert.no_case_selected); + return false; + } + //todo: translations + executions.forEach(executionId => + jsonRPC('TestExecution.update', [executionId, { 'case_text_version': 'latest' }], () => { }, sync = true) + ); + window.location.reload(true); } function fileBugFromExecution(run_id, title_container, container, case_id, execution_id) { - // todo: this dialog needs to be reimplemented with a Patternfly modal - var dialog = new AddIssueDialog({ - 'action': 'Report', - 'onSubmit': function (e, dialog) { - e.stopPropagation(); - e.preventDefault(); - - var tracker_id = dialog.get_data()['bug_system_id']; - jsonRPC('Bug.report', [execution_id, tracker_id], function(result) { - $('#dialog').hide(); - - if (result.rc === 0) { - // unescape b/c Issue #1533 - const target_url = result.response.replace(/&/g, '&') - window.open(target_url, '_blank'); - } else { - window.alert(result.response); - } - }); - } - }); + // todo: this dialog needs to be reimplemented with a Patternfly modal + var dialog = new AddIssueDialog({ + 'action': 'Report', + 'onSubmit': function (e, dialog) { + e.stopPropagation(); + e.preventDefault(); + + var tracker_id = dialog.get_data()['bug_system_id']; + jsonRPC('Bug.report', [execution_id, tracker_id], function (result) { + $('#dialog').hide(); + + if (result.rc === 0) { + // unescape b/c Issue #1533 + const target_url = result.response.replace(/&/g, '&') + window.open(target_url, '_blank'); + } else { + window.alert(result.response); + } + }); + } + }); - dialog.show(); + dialog.show(); } diff --git a/tcms/testruns/templates/testruns/get.html b/tcms/testruns/templates/testruns/get.html index e0564e906a..ba80a3e560 100644 --- a/tcms/testruns/templates/testruns/get.html +++ b/tcms/testruns/templates/testruns/get.html @@ -57,7 +57,7 @@

{% trans 'Status' %}:

@@ -117,6 +117,63 @@

{% trans 'Test executions' %}

+
+
+
+
+ + +
+ + + +
+ + +
+ + +
+
+
+
+
Results
+

Active filters:

+
    + {% comment %} TODO: maybe don't show this button until at least one filter is added {% endcomment %} +

    Clear All Filters

    +
    +
    +
    +
    +