Hi,
The Approval workflow is configured to pull approvers names from an Asset Attribute.
This works absolutely fine and Approvers gets generated on creation of tickets.
Now, we have a new requirement to remove the Reporter from the list of approvers
Is there an Automation Advanced field update script, which will remove the reporter/initiator of the issue from the Approvers list?
Is there an Automation Advanced field update script, which will remove the reporter/initiator of the issue from the Approvers list?
Hi Sumona,
You can’t exclude the Reporter directly at the Asset attribute level. Instead, use Jira Automation to remove the Reporter from the Approvers field after the issue is created.
Automation rule:
References:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gunjan,
Mine is a DC instance, and i dont seem to have the option in Edit Issue to
Remove value → {{reporter}}
And the links you provided above are not accessible.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried below JSON Edit Issue - More options - Additional fields, however it doesn't work.
{
"update": {
"approvers" : [
{
"remove": {
"id":"{{initiator}}"
}
}
]
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sumona,
Since you’re using Data Center, the Cloud smart values (like {{reporter}}) and list functions won’t work the same way.
In JSM Data Center, the Approvers field stores users by username/key, not accountId. Try using the Reporter’s username instead:
{
"update": {
"approvers": [
{
"remove": {
"name": "{{issue.reporter.name}}"
}
}
]
}
}Also, please ensure:
If this still doesn’t work, you may need to handle it via a post-function or ScriptRunner, as DC automation capabilities are more limited than Cloud.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gunjan,
Thank you for the detailed instructions, I used exactly as you specified. However, the reporter's name is not getting removed from the approvers' list. even though the Automation Audit log states Success.
I will explore the post-function in the Workflow.
I don't have ScriptRunner, is that plugin/AddOn?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sumona,
Thanks for the update.
Yes, ScriptRunner is a third-party marketplace app (from Adaptavist) that adds advanced scripting and workflow functions in Jira Data Center.
Unfortunately, native Automation in DC has limited support for modifying multi-user fields like Approvers, which is why the audit log may show success but the value is not actually removed.
Your most reliable options in DC are:
If installing apps is not an option, I recommend handling this via a workflow post-function where you explicitly set the approvers list without the Reporter.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.