Skip to content

Commit 07722ad

Browse files
committed
Move from progressIssue to transitionIssue
The progressIssue action was deprecated in Jira CLI 6. And replaced by better transitionIssue. Also, move away from --custom , deprecated in Jira 10 and instead use --field, that supports both standard and custom fields (and can be used multiple times, one for every field. Note that, because of https://jira.atlassian.com/browse/JRASERVER-61539 is still impossible to use the correct updateIssue action, because it's not allowed to update fields not available in the current screen. So we need to continue using those "CI Global Self-Transition" ghost transitions (from -> to the same status), using a hidden screen having ALL the fields, via the transitionIssue action in order to get those fields updated. Sigh.
1 parent d876dc7 commit 07722ad

File tree

9 files changed

+76
-55
lines changed

9 files changed

+76
-55
lines changed

tracker_automations/close_tested_issues/close_tested_issues.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ for issue in $( sed -n 's/^"\(MDL-[0-9]*\)".*/\1/p' "${resultfile}" ); do
5959
--issue ${issue} \
6060
--transition "Mark as committed" \
6161
--resolution "Fixed" \
62-
--custom "customfield_10211:,customfield_10210:${altdate}" \
62+
--field "customfield_10211=" \
63+
--field "customfield_10210=${altdate}" \
6364
--comment "${altcomment}"
6465
echo "$BUILD_NUMBER $BUILD_TIMESTAMP ${issue}" >> "${logfile}"
6566
done

tracker_automations/continuous_manage_queues/lib.sh

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -88,18 +88,21 @@ function run_A2() {
8888
# For fields available in the default screen, it's ok to use updateIssue or SetField, but in this case
8989
# we are setting some custom fields not available (on purpose) on that screen. So we have created a
9090
# global transition, only available to the bots, not transitioning but bringing access to all the fields
91-
# via special screen. So we'll ne using that global transition via progressIssue instead.
91+
# via special screen. So we'll ne using that global transition via transitionIssue instead.
9292
# Also, there is one bug in the 4.4.x series, setting the destination as 0, leading to error in the
9393
# execution, so the form was hacked in the browser to store correct -1: https://jira.atlassian.com/browse/JRA-25002
9494
# Commented below, it's the "ideal" code. If some day JIRA changes that restriction we could stop using
9595
# that non-transitional transition and use normal update.
9696
#${basereq} --action updateIssue \
9797
# --issue ${issue} \
98-
# --custom "customfield_10110:,customfield_10210:,customfield_10211:Yes"
99-
${basereq} --action progressIssue \
98+
# --field="customfield_10110=" --field="customfield_10210=" --field="customfield_10211=Yes"
99+
${basereq} --action transitionIssue \
100100
--issue ${issue} \
101-
--step "CI Global Self-Transition" \
102-
--custom "customfield_10211:Yes,customfield_15810:No,customfield_10110:,customfield_10011:" \
101+
--transition "CI Global Self-Transition" \
102+
--field "customfield_10211=Yes" \
103+
--field "customfield_15810=No" \
104+
--field "customfield_10110=" \
105+
--field "customfield_10011=" \
103106
--comment "Continuous queues manage: Moving to current because it's important" \
104107
--role "Integrators"
105108
echo "$BUILD_NUMBER $BUILD_TIMESTAMP ${issue} moved to current: important" >> "${logfile}"
@@ -160,18 +163,21 @@ function run_A3a() {
160163
# For fields available in the default screen, it's ok to use updateIssue or SetField, but in this case
161164
# we are setting some custom fields not available (on purpose) on that screen. So we have created a
162165
# global transition, only available to the bots, not transitioning but bringing access to all the fields
163-
# via special screen. So we'll ne using that global transition via progressIssue instead.
166+
# via special screen. So we'll ne using that global transition via transitionIssue instead.
164167
# Also, there is one bug in the 4.4.x series, setting the destination as 0, leading to error in the
165168
# execution, so the form was hacked in the browser to store correct -1: https://jira.atlassian.com/browse/JRA-25002
166169
# Commented below, it's the "ideal" code. If some day JIRA changes that restriction we could stop using
167170
# that non-transitional transition and use normal update.
168171
#${basereq} --action updateIssue \
169172
# --issue ${issue} \
170-
# --custom "customfield_10110:,customfield_10210:,customfield_10211:Yes"
171-
${basereq} --action progressIssue \
173+
# --field="customfield_10110=" --field="customfield_10210=" --field="customfield_10211=Yes"
174+
${basereq} --action transitionIssue \
172175
--issue ${issue} \
173-
--step "CI Global Self-Transition" \
174-
--custom "customfield_10211:Yes,customfield_15810:No,customfield_10110:,customfield_10011:" \
176+
--transition "CI Global Self-Transition" \
177+
--field "customfield_10211=Yes" \
178+
--field "customfield_15810=No" \
179+
--field "customfield_10110=" \
180+
--field "customfield_10011=" \
175181
--comment "Continuous queues manage: Moving to current given we are below the threshold ($currentmin)" \
176182
--role "Integrators"
177183
echo "$BUILD_NUMBER $BUILD_TIMESTAMP ${issue} moved to current: threshold (before ${lastweekdate})" >> "${logfile}"
@@ -260,18 +266,21 @@ function run_B1b() {
260266
# For fields available in the default screen, it's ok to use updateIssue or SetField, but in this case
261267
# we are setting some custom fields not available (on purpose) on that screen. So we have created a
262268
# global transition, only available to the bots, not transitioning but bringing access to all the fields
263-
# via special screen. So we'll ne using that global transition via progressIssue instead.
269+
# via special screen. So we'll ne using that global transition via transitionIssue instead.
264270
# Also, there is one bug in the 4.4.x series, setting the destination as 0, leading to error in the
265271
# execution, so the form was hacked in the browser to store correct -1: https://jira.atlassian.com/browse/JRA-25002
266272
# Commented below, it's the "ideal" code. If some day JIRA changes that restriction we could stop using
267273
# that non-transitional transition and use normal update.
268274
#${basereq} --action updateIssue \
269275
# --issue ${issue} \
270-
# --custom "customfield_10110:,customfield_10210:,customfield_10211:Yes"
271-
${basereq} --action progressIssue \
276+
# --field="customfield_10110=" --field="customfield_10210=" --field="customfield_10211=Yes"
277+
${basereq} --action transitionIssue \
272278
--issue ${issue} \
273-
--step "CI Global Self-Transition" \
274-
--custom "customfield_10211:Yes,customfield_15810:No,customfield_10110:,customfield_10011:" \
279+
--transition "CI Global Self-Transition" \
280+
--field "customfield_10211=Yes" \
281+
--field "customfield_15810=No" \
282+
--field "customfield_10110=" \
283+
--field "customfield_10011=" \
275284
--comment "Continuous queues manage: Moving to current given we are below the threshold ($currentmin)" \
276285
--role "Integrators"
277286
echo "$BUILD_NUMBER $BUILD_TIMESTAMP ${issue} moved to current on-sync: threshold" >> "${logfile}"

tracker_automations/delay_awaiting_issues/delay_awaiting_issues.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,13 @@ ${basereq} --action getIssueList \
5555
# Iterate over found issues and perform the actions with them
5656
for issue in $( sed -n 's/^"\(MDL-[0-9]*\)".*/\1/p' "${resultfile}" ); do
5757
echo "Processing ${issue}"
58-
# We use progressIssue instead of updateIssue because some of the fileds are not available in the default screen.
58+
# We use transitionIssue instead of updateIssue because some of the fileds are not available in the default screen.
5959
# (current in integration = customfield_10211, integration priority = customfield_12210)
60-
${basereq} --action progressIssue \
60+
${basereq} --action transitionIssue \
6161
--issue ${issue} \
62-
--step "CI Global Self-Transition" \
63-
--custom "customfield_10211:,customfield_12210:1" \
62+
--transition "CI Global Self-Transition" \
63+
--field "customfield_10211=" \
64+
--field "customfield_12210=1" \
6465
--comment "${altcomment}"
6566
echo "$BUILD_NUMBER $BUILD_TIMESTAMP ${issue}" >> "${logfile}"
6667
done

tracker_automations/manage_waiting_for_feedback/manage_waiting_for_feedback.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ for issue in $( sed -n 's/^"\(MDL-[0-9]*\)".*/\1/p' "${resultfile}" ); do
137137
${basereq} --action transitionIssue \
138138
--issue ${issue} \
139139
--transition "Reopen Issue" \
140-
--custom "customfield_10211:" \
140+
--field "customfield_10211=" \
141141
--comment "${comment}"
142142
done
143143

tracker_automations/move_to_current_integration/move_to_current_integration.sh

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,22 @@ for issue in $( sed -n 's/^"\(MDL-[0-9]*\)".*/\1/p' "${resultfile}" ); do
5151
# For fields available in the default screen, it's ok to use updateIssue or SetField, but in this case
5252
# we are setting some custom fields not available (on purpose) on that screen. So we have created a
5353
# global transition, only available to the bots, not transitioning but bringing access to all the fields
54-
# via special screen. So we'll ne using that global transition via progressIssue instead.
54+
# via special screen. So we'll ne using that global transition via transitionIssue instead.
5555
# Also, there is one bug in the 4.4.x series, setting the destination as 0, leading to error in the
5656
# execution, so the form was hacked in the browser to store correct -1: https://jira.atlassian.com/browse/JRA-25002
5757
# Commented below, it's the "ideal" code. If some day JIRA changes that restriction we could stop using
5858
# that non-transitional transition and use normal update.
5959
#${basereq} --action updateIssue \
6060
# --issue ${issue} \
61-
# --custom "customfield_10110:,customfield_10210:,customfield_10211:Yes"
62-
${basereq} --action progressIssue \
61+
# --field="customfield_10110=" --field="customfield_10210=" --field="customfield_10211=Yes"
62+
${basereq} --action transitionIssue \
6363
--issue ${issue} \
64-
--step "CI Global Self-Transition" \
65-
--custom "customfield_10110:,customfield_10210:,customfield_10211:Yes,customfield_15810:No,customfield_10011:" \
64+
--transition "CI Global Self-Transition" \
65+
--field "customfield_10110=" \
66+
--field "customfield_10210=" \
67+
--field "customfield_10211=Yes" \
68+
--field "customfield_15810=No" \
69+
--field "customfield_10011=" \
6670
--comment "Moving this issue to current integration cycle, will be reviewed soon. Thanks for the hard work!"
6771
${basereq} --action removeLabels \
6872
--issue ${issue} \

tracker_automations/mv_reopened_out_from_current/mv_reopened_out_from_current.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,20 +65,20 @@ while read line; do
6565
# For fields available in the default screen, it's ok to use updateIssue or SetField, but in this case
6666
# we are setting some custom fields not available (on purpose) on that screen. So we have created a
6767
# global transition, only available to the bots, not transitioning but bringing access to all the fields
68-
# via special screen. So we'll ne using that global transition via progressIssue instead.
68+
# via special screen. So we'll ne using that global transition via transitionIssue instead.
6969
# Also, there is one bug in the 4.4.x series, setting the destination as 0, leading to error in the
7070
# execution, so the form was hacked in the browser to store correct -1: https://jira.atlassian.com/browse/JRA-25002
7171
# Commented below, it's the "ideal" code. If some day JIRA changes that restriction we could stop using
7272
# that non-transitional transition and use normal update.
7373
#${basereq} --action updateIssue \
7474
# --issue ${issue} \
75-
# --custom "customfield_10211:" \
75+
# --field "customfield_10211=" \
7676
# --comment "Moving this reopened issue out from current integration. Please, re-submit it for integration once ready."
77-
${basereq} --action progressIssue \
77+
${basereq} --action transitionIssue \
7878
--issue ${issue} \
79-
--step "CI Global Self-Transition" \
79+
--transition "CI Global Self-Transition" \
8080
--fixVersions "${keepversion}" \
81-
--custom "customfield_10211:" \
81+
--field "customfield_10211=" \
8282
--comment "Moving this reopened issue out from current integration. Please, re-submit it for integration once ready."
8383
echo "$BUILD_NUMBER $BUILD_TIMESTAMP ${issue}" >> "${logfile}"
8484
done < "${resultfile}"

tracker_automations/normal_manage_queues/lib.sh

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,21 @@ function run_A() {
5050
# For fields available in the default screen, it's ok to use updateIssue or SetField, but in this case
5151
# we are setting some custom fields not available (on purpose) on that screen. So we have created a
5252
# global transition, only available to the bots, not transitioning but bringing access to all the fields
53-
# via special screen. So we'll ne using that global transition via progressIssue instead.
53+
# via special screen. So we'll ne using that global transition via transitionIssue instead.
5454
# Also, there is one bug in the 4.4.x series, setting the destination as 0, leading to error in the
5555
# execution, so the form was hacked in the browser to store correct -1: https://jira.atlassian.com/browse/JRA-25002
5656
# Commented below, it's the "ideal" code. If some day JIRA changes that restriction we could stop using
5757
# that non-transitional transition and use normal update.
5858
#${basereq} --action updateIssue \
5959
# --issue ${issue} \
60-
# --custom "customfield_10110:,customfield_10210:,customfield_10211:Yes"
61-
${basereq} --action progressIssue \
60+
# --field="customfield_10110=" --field="customfield_10210=" --field="customfield_10211=Yes"
61+
${basereq} --action transitionIssue \
6262
--issue ${issue} \
63-
--step "CI Global Self-Transition" \
64-
--custom "customfield_10211:Yes,customfield_15810:No,customfield_10110:,customfield_10011:" \
63+
--transition "CI Global Self-Transition" \
64+
--field "customfield_10211=Yes" \
65+
--field "customfield_15810=No" \
66+
--field "customfield_10110=" \
67+
--field "customfield_10011=" \
6568
--comment "Normal queues manage: Moving to current because it's important" \
6669
--role "Integrators"
6770
echo "$BUILD_NUMBER $BUILD_TIMESTAMP ${issue} moved to current: important" >> "${logfile}"
@@ -122,18 +125,21 @@ function run_B() {
122125
# For fields available in the default screen, it's ok to use updateIssue or SetField, but in this case
123126
# we are setting some custom fields not available (on purpose) on that screen. So we have created a
124127
# global transition, only available to the bots, not transitioning but bringing access to all the fields
125-
# via special screen. So we'll ne using that global transition via progressIssue instead.
128+
# via special screen. So we'll ne using that global transition via transitionIssue instead.
126129
# Also, there is one bug in the 4.4.x series, setting the destination as 0, leading to error in the
127130
# execution, so the form was hacked in the browser to store correct -1: https://jira.atlassian.com/browse/JRA-25002
128131
# Commented below, it's the "ideal" code. If some day JIRA changes that restriction we could stop using
129132
# that non-transitional transition and use normal update.
130133
#${basereq} --action updateIssue \
131134
# --issue ${issue} \
132-
# --custom "customfield_10110:,customfield_10210:,customfield_10211:Yes"
133-
${basereq} --action progressIssue \
135+
# --field="customfield_10110=" --field="customfield_10210=" --field="customfield_10211=Yes"
136+
${basereq} --action transitionIssue \
134137
--issue ${issue} \
135-
--step "CI Global Self-Transition" \
136-
--custom "customfield_10211:Yes,customfield_15810:No,customfield_10110:,customfield_10011:" \
138+
--transition "CI Global Self-Transition" \
139+
--field "customfield_10211=Yes" \
140+
--field "customfield_15810=No" \
141+
--field "customfield_10110=" \
142+
--field "customfield_10011=" \
137143
--comment "Normal queues manage: Moving to current given we are below the threshold ($currentmin)" \
138144
--role "Integrators"
139145
echo "$BUILD_NUMBER $BUILD_TIMESTAMP ${issue} moved to current: threshold" >> "${logfile}"
@@ -160,18 +166,18 @@ function run_C() {
160166
# For fields available in the default screen, it's ok to use updateIssue or SetField, but in this case
161167
# we are setting some custom fields not available (on purpose) on that screen. So we have created a
162168
# global transition, only available to the bots, not transitioning but bringing access to all the fields
163-
# via special screen. So we'll ne using that global transition via progressIssue instead.
169+
# via special screen. So we'll ne using that global transition via transitionIssue instead.
164170
# Also, there is one bug in the 4.4.x series, setting the destination as 0, leading to error in the
165171
# execution, so the form was hacked in the browser to store correct -1: https://jira.atlassian.com/browse/JRA-25002
166172
# Commented below, it's the "ideal" code. If some day JIRA changes that restriction we could stop using
167173
# that non-transitional transition and use normal update.
168174
#${basereq} --action updateIssue \
169175
# --issue ${issue} \
170-
# --custom "customfield_10110:,customfield_10210:,customfield_10211:Yes"
171-
${basereq} --action progressIssue \
176+
# --field="customfield_10110=" --field="customfield_10210=" --field="customfield_10211=Yes"
177+
${basereq} --action transitionIssue \
172178
--issue ${issue} \
173-
--step "CI Global Self-Transition" \
174-
--custom "customfield_12210:1" \
179+
--transition "CI Global Self-Transition" \
180+
--field "customfield_12210=1" \
175181
--comment "Normal queues manage: Raising integration priority after ${waitingdays} days awaiting" \
176182
--role "Integrators"
177183
echo "$BUILD_NUMBER $BUILD_TIMESTAMP ${issue} raised integration priority" >> "${logfile}"

tracker_automations/set_integration_priority_to_one/set_integration_priority_to_one.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@ for issue in $( sed -n 's/^"\(MDL-[0-9]*\)".*/\1/p' "${resultfile}" ); do
101101

102102
# So we raise its priority here and now.
103103
echo " Raising its integration priority to 1"
104-
${basereq} --action progressIssue \
104+
${basereq} --action transitionIssue \
105105
--issue ${issue} \
106-
--step "CI Global Self-Transition" \
107-
--custom "customfield_12210:1"
106+
--transition "CI Global Self-Transition" \
107+
--field "customfield_12210=1"
108108
echo "$BUILD_NUMBER $BUILD_TIMESTAMP ${issue}" >> "${logfile}"
109109
echo
110110
done

tracker_automations/set_integration_priority_to_zero/set_integration_priority_to_zero.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ ${basereq} --action getIssueList \
5050
# Iterate over found issues and set their integration priority (customfield_12210) to 0.
5151
for issue in $( sed -n 's/^"\(MDL-[0-9]*\)".*/\1/p' "${resultfile}" ); do
5252
echo "Processing ${issue}"
53-
${basereq} --action progressIssue \
53+
${basereq} --action transitionIssue \
5454
--issue ${issue} \
55-
--step "CI Global Self-Transition" \
56-
--custom "customfield_12210:0"
55+
--transition "CI Global Self-Transition" \
56+
--field "customfield_12210=0"
5757
echo "$BUILD_NUMBER $BUILD_TIMESTAMP ${issue}" >> "${logfile}"
5858
done
5959

@@ -125,10 +125,10 @@ for issue in $( sed -n 's/^"\(MDL-[0-9]*\)".*/\1/p' "${resultfile}" ); do
125125
# So we lower its priority here and now.
126126
echo " lowering its integration priority to 0 (has unresolved blockers)"
127127
echo
128-
${basereq} --action progressIssue \
128+
${basereq} --action transitionIssue \
129129
--issue ${issue} \
130-
--step "CI Global Self-Transition" \
131-
--custom "customfield_12210:0"
130+
--transition "CI Global Self-Transition" \
131+
--field "customfield_12210=0"
132132
echo "$BUILD_NUMBER $BUILD_TIMESTAMP ${issue}" >> "${logfile}"
133133
echo
134134
done

0 commit comments

Comments
 (0)