adding value multiple times to a custom field

Matiss Davis September 13, 2019

Hello,

I am trying to make approval transition in Jira core with custom fields for multiple approvals. problem is when someone approves it overwrites the field with the newest value. 

Is there a way to make so that updating custom field named Approver, it adds another value to custom field named approvals to show all users who have approved the issue?

Approvals (user1, user2, user3 etc.)

if it helps there are installed plugins. - JSU automation Suite suite and Adaptavist scriptrunner 

 

3 answers

1 accepted

2 votes
Answer accepted
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 13, 2019

I'm wondering if this can be done via post function? I have not played with it but the premise is that if you are using multiple transitions for each approval, each of the transitions has the Update custom field PF. An image of what I am thinking follows. I have used the append value on other scenarios successfully.

approver.jpg

Matiss Davis September 13, 2019

Thank you this was exactly what I was looking for.

Have a nice day!

1 vote
Rakesh Kumar September 13, 2019

Hi Mattis, 

 

You my achieve this if you are using ScriptRunner plugin. One of the possible solution could be, 

1. Create a multi-user picker custom field called "Approvers". 

2. In the Approve transitions,  select a Script post-function and prepare a groovy script which will concatenate the current approver to the existing list of the custom field "Approver".  In this way you will not loose existing list of approvers in each transition. 

 

Regards, 

Rakesh

0 votes
Joe Pitt
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 13, 2019

You're going to need multiple fields. Here the solution I use:

Approvals

You want several groups to approve an issue before proceeding. It requires a bit of work on the workflow, but simple stuff.  I use project roles for user permissions.

Create a select list for each area with N/A, Yes, No options

Create a transition from the status where you want them to approve for each group with the condition of only users in 'that' project role can execute it and the related select list must be empty. Each group will only see their transition and it isn't set. Have the transition go back to the initial status.

As each group completes the goes through their transition to approve or deny the transitions will disappear.

Now you need to decide how to proceed if there is a No selected by any group. I usually open a transition to a status of something like Rework Needed, or More Information Needed. and then go through the approving status again. If all options are Yes of N/A I make a transition to the next status available.

Suggest an answer

Log in or Sign up to answer