Our goal is to update the field "Request Participants" automatically with an automation whenever a ticket is approved by an approver.
The necessary steps for adding the correct approval step where taken within the corresponding workflow.
I can correctly get the approver who approved the ticket by adding [~accountid:{{approval.approver}}] into, for example, a comment.
I read in this forum that updating the Request Participants field takes the following JSON Code:
{
"update": {
"Request participants": [
{
"add": { "name": "NameOfTheApprover" }
}
]
}
}
It is important for us to update the field and not to just set it because we need to keep customers who where already added to said field.
Altogether out current solution looks like this:
{
"update": {
"Request participants": [
{
"add": { "name": "{{approval.approver.displayName}}" }
}
]
}
}
In the automations Audit-Log this shows as succesfull, however it doesn't show up in the ticket.
I already tried a lot of ways to get the approvers name and add it in this JSON Code (for example using the field identifiers from the corresponding REST Endpoint) but nothing worked so far.
Can anyone here help me with this issue?
I already searched this forum and could not find any working solution.
Thanks!
Hi @David Kintzinger ,
Welcome to the community !! Small correction required in your JSON.
Use below json, here I am copying value from Approvers field
{"update": {
"Request participants": [
{
"add": {"id":"{{issue.Approvers.accountId}}"}
}
]
}
}
Thanks for your reply!
I switched this up a little bit and used the following code:
{
"update": {
"Request participants": [
{
"add": { "id": "{{approval.approver}}" }
}
]
}
}
This works perfectly fine and adds the approver that either approved or declined the current ticket to the list of Requested Participants.
The key seems to be to set the "id" field as you suggested instead of setting the "Name" field.
I found a different question where it was stated that using the "name" field ist deprecated in Jira cloud.
Thanks so much for your help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi David!
I believe this is possible without using JSON.
Set the automation to trigger
When: Approval completed
Then: Edit issue field
Select Request Participant from the cogwheel drop down
Press the three dots to the right of the field below the cogwheel and select Copy.
Change the value to copy from Appover and make sure the checkbox to "Add to existing values" is kept checked, that way it won't write over the existing request participants.
(Edit: Fixed the last image, as it said request participants earlier)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your answer. I already implemented the solution that Rilwan Ahmed stated above but yours seems to do what we need as well.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey
This really help me recently, so thank u so much! 🫶🏼
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.