Hi All,
I am trying to use the Jira automation to edit a multi user picker field. We use Jira Service management and what I would like to do when an issue is updated by a certain member, then a specific user is removed from the Approvers field. I've tried different variations of JSON code but I can't get anything to work. I'Ve looked through the commmunity posts of this and although there seems to be some solutions none are working for me.
Solved: Jira Automation - Edit issue multi user picker fie... (atlassian.com)
Remove "Request Participants" using Automation rul... (atlassian.com)
If anyone could help me it would be much appreciated.
thanks in advance.
Alex.
@alexander.cartlidge , this is working for me
{"update": {"approvers" : [{"remove": {"id":"user_id"}}]}}
Can you try this in your automation rule and share the screenshot of your audit log automation? If you could share your complete automation rule, I think can help us to understand better your rule structure.
Let me know if you have questions
Hi Fernando,
Thanks for the quick reply. Unfortunately no it doesn't work for me. However if I substitute the "user_id" for "name" and use a custom field smart value I can get it to work. The customfield is populated with a post function upon issue creation and then I can use that.
{"update": {"Approvers": [{"remove": { "name": "{{Delegate Approver.name}}" }}]}}}
So this will solve half the problem. Thanks for pointing me in the right direction. What the rule should do is remove 1 of the 2 approving Managers when the 1 Manager approves the request / Issue.
The problem I have now is the fact that an approval does not trigger an update to the issue. So although I have a working rule I have no trigger to make the rule run. If you have an idea about that one. I'm all ears
Kind regards
@alexander.cartlidge
Glad to know that it worked for you!
If you don't have the "Approval Completed" trigger on your automation, then you can use the "Issue Transitioned" event to execute your rule.
Considering that when Manager 1 approves, jira will transition the Issue to another status, I believe this trigger will help you with that.
Hello @Fernando Eugênio da Silva ,
I have multiple users in the Approvers field and want to remove the one who triggered it.
Even tho I used the initiator.accountId still it's removing the other users as well.
Any assistance will be appreciated.
Thank you in advance.
Hi folks,
I have a customfield "Approved" and we have a list of approvers for a CAB. The workflow status has the configure "2 approval(s)" needed.
When the 2 approvers has approved done we want to remove the other approvers from the approval list.
If anyone could have a good idea it would be much appreciated.
Thanks in advance.
I found a solution
Edit issue fields:
{"fields": {"customfield_ID": "{{issue.customfield_ID.slice(0,2)}}"}}
It looks like you're new here. Sign in or register to get started.