Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to fix approval count after change of approval rule (changed "All approvals" to "1 approval")

msn Atlassian
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 9, 2022

Change of required approvals does not affect existing issues - approval count out of sync

What we did:

We added an approval. On create new issue a postfunction sets the reporter as approver:

...
def reporter = missue.getReporter();

HashSet<ApplicationUser> approvers = (HashSet<ApplicationUser>) missue.getCustomFieldValue(approversField);

if (approvers == null) approvers = new HashSet<>();

if (!approvers.contains(reporter))

    approvers.add(reporter);

missue.setCustomFieldValue(approversField, approvers);
...

 

The approval at the workflow status was set per default to "All approvals" which was fine, since we had no representative regulations activated – the Approver field hosted no project-context.

Meanwhile the representative regulations became mandatory for some projects:

  • We added one project specific context (custom field contect) to the Approver field, coming up with 3 approvers.
  • One approval is sufficient – so its “one out of 3”.
  • BUT: We forgot to switch the setting to "1 approval(s)" before we did that, hence all the tickets created meanwhile require e.g. 3-approvals, which is nasty.
  • We corrected that setting (and published the change) to "1 approval(s)", but that only fixes the problem for new tickets.

It seams, that the approval-count can’t be modified once the ticket is in approval?
We tried several things, again with no effect:

  • We created a new “self-transition” on the approval status, executing the same postfunction we use for new tickets with no effect.
  • We removed the "jira.issue.editable=false" property from the status (temporarily).
  • We edited the approvers beforehand, so that there would be e.g. only one – it remained unchanged after the transition.

We’re running out of options and are in serious need of help. If you need any further information, please don’t hesitate to contact me.
We need this problem solved shortly and the knowledge base holds no solutions, only more questions ☹

Regards and looking forward to hearing from you (soon),

Birgit Küntzel

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events