From f76730ab6c1c8d3d66d710fe1d5d4d6a7ff9a35e Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Tue, 19 Dec 2023 11:42:40 +0100 Subject: [PATCH 1/2] Move from participants to JQL Tricks commentedByUser() The original query was working wrongly sometimes, because of Jira re-indexing problems. And that was leading to some ToBiC jobs to be relaunched, when they should not. We have confirmed that, after a re-index, the original query is back to work, but that's not nice-enough outcome. So we have moved to the already installed JQL Tricks query that seems to be immune to the indexing problems and properly keeps out to all the issues where ToBiC already has participated (by adding a comment). Note that it has been checked that the JQL Tricks extension is also available for Jira Cloud (with a change in the syntax), but will work there, so it's ok if we add this new use here. Ref: https://www.j-tricks.com/jql-tricks-cloud-migration.html --- .../criteria/awaiting_component_lead_review/query.sh | 2 +- .../bulk_prelaunch_jobs/criteria/awaiting_integration/query.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tracker_automations/bulk_prelaunch_jobs/criteria/awaiting_component_lead_review/query.sh b/tracker_automations/bulk_prelaunch_jobs/criteria/awaiting_component_lead_review/query.sh index 07f0fa0e..73705b5f 100755 --- a/tracker_automations/bulk_prelaunch_jobs/criteria/awaiting_component_lead_review/query.sh +++ b/tracker_automations/bulk_prelaunch_jobs/criteria/awaiting_component_lead_review/query.sh @@ -2,7 +2,7 @@ ${basereq} --action getIssueList \ --jql "project = 'Moodle' \ AND status = 'Waiting for component lead review' \ AND status WAS NOT 'Waiting for component lead review' ON '-${schedulemins}' \ - AND participants not in (tobic) \ + AND issue NOT IN commentedByUser('tobic') \ AND level IS EMPTY \ ORDER BY priority DESC, votes DESC, 'Last comment date' ASC" \ --outputFormat 101 \ diff --git a/tracker_automations/bulk_prelaunch_jobs/criteria/awaiting_integration/query.sh b/tracker_automations/bulk_prelaunch_jobs/criteria/awaiting_integration/query.sh index f662532f..e3defa11 100755 --- a/tracker_automations/bulk_prelaunch_jobs/criteria/awaiting_integration/query.sh +++ b/tracker_automations/bulk_prelaunch_jobs/criteria/awaiting_integration/query.sh @@ -2,7 +2,7 @@ ${basereq} --action getIssueList \ --jql "project = 'Moodle' \ AND status = 'Waiting for integration review' \ AND status WAS NOT 'Waiting for integration review' ON '-${schedulemins}' \ - AND participants not in (tobic) \ + AND issue NOT IN commentedByUser('tobic') \ AND level IS EMPTY \ ORDER BY priority DESC, votes DESC, 'Last comment date' ASC" \ --outputFormat 101 \ From 4ea0d69c1af5120f8f842692e5496fe866624bbd Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Tue, 19 Dec 2023 12:07:40 +0100 Subject: [PATCH 2/2] Amend some tests to verify new phpcs is being used --- tests/0-setup.bats | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/0-setup.bats b/tests/0-setup.bats index a4b1476e..fd058e35 100755 --- a/tests/0-setup.bats +++ b/tests/0-setup.bats @@ -19,7 +19,7 @@ load libs/shared_setup assert_success run $phpcs --version - assert_output --regexp "PHP_CodeSniffer version [0-9]+\.[0-9]+\.[0-9]+ \(stable\) by Squiz \(http://www.squiz.net\)" + assert_output --regexp "PHP_CodeSniffer version [0-9]+\.[0-9]+\.[0-9]+ \(stable\) by Squiz and PHPCSStandards" } @test "GNU grep installed" {