Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Post-Functionality / Auto-assign for Jira Cloud

Grayson_Pollock March 19, 2019

I was able to find a useful article on how to set up post-functions for Jira server, however, the document states this does not apply to Jira Cloud. Never the less, I attempted to add the post-functions, but they did not work. 

 

I am trying to set it up for custom fields, where for example, when the user transitions to 'In Progress' it auto stamps them to a custom 'Engineer' field using the '%%CURRENT_USER%%' functionality. 

 

We had this set up at my previous company and I cannot seem to get it to work now. Any tips?

2 answers

2 accepted

0 votes
Answer accepted
John Funk
Community Champion
March 19, 2019

Hey Grayson - welcome to the Community!

You can definitely use a post function in JIRA Cloud. Edit the transition and click on Add post function.

Then choose Update Issue Custom Field from the list.

Select the Engineer field from the drop down for the Issue Custom Field.

Then paste in %%CURRENT_USER%% in the Custom Field Value.

Click the Update button.

Be sure to publish the workflow changes and you should be good to go.

The first thing I would check to to make sure that your custom Engineer field was created as a User Picker (single user) custom field type. 

Grayson_Pollock March 19, 2019

@John Funk Thanks for the reply. Please see my response above. 

John Funk
Community Champion
March 19, 2019

I would take the Append Value off and see if that helps. I do not have that checked on mine. 

John Funk
Community Champion
March 19, 2019

Capture.PNG

Grayson_Pollock March 19, 2019

@John Funk That was something I tried after it was not working. I tried again without the Append Value and still no luck. Appreciate the help anyway. 

John Funk
Community Champion
March 19, 2019

Does your post function look like mine, except with Engineer instead?

John Funk
Community Champion
March 19, 2019

And if so, do you get an error? Or it just doesn't work?

Grayson_Pollock March 19, 2019

Screenshots of both Transition Post Functions I have in place: 

Post Function 1.JPGPost Function 2.JPG

No error. It just does not populate the field with any value. I can also confirm there is not transition setting related to the assignee. I read that if you have transitions limited to assignee it may not work, but that is not the case here.

Like LCD likes this
Taranjeet Singh
Community Champion
March 19, 2019

@Grayson_Pollock Please try changing the order of your post-function to place it after the default post-function "Add a comment to an issue if one is entered during a transition" and see if it fixes the issue.

Grayson_Pollock March 19, 2019

Still no luck. Thanks anyways gentlemen. 

John Funk
Community Champion
March 19, 2019

I would open a support ticket then. There is no apparent reason why it is not working.  :-(

Taranjeet Singh
Community Champion
March 20, 2019

@Grayson_Pollock  Can you try removing single quotes from %%CURRENT_USER%% and then see it if works?

John Funk
Community Champion
March 20, 2019

Great catch, Taranjeet!

Grayson_Pollock March 20, 2019

@Taranjeet Singh That did it. This was a frustrating one since I copied and pasted the information from Atlassian's note at the bottom of the page with quotes, but now makes sense what they were doing. Really appreciate your help. 

 

@John Funk Thank you as well. 

Taranjeet Singh
Community Champion
March 20, 2019

:-), sometimes the cause of the problem is so small that we tend to ignore it and make it a bigger problem in our mind.

0 votes
Answer accepted
Taranjeet Singh
Community Champion
March 19, 2019

@Grayson_Pollock Can you share which post-function you added to the workflow and in which order it has been added to the list of post-functions?

 

Is your goal only to auto-assign issue to the current user making "In Progress" transition? or do you also want to copy the current user value to "Engineer" custom field? If yes, then you will need to use another post-function, which will copy one field value to another. Also, "Engineer" custom field should be of type "User Picker (Single user)".

 

Hope it helps !

Grayson_Pollock March 19, 2019

@Taranjeet Singh I prefer to leave the Assignee field out of the equation. Simply would like to stamp the Custom fields with the Current User when the transition takes place. Each of the Custom Fields is set to 'User Picker (single user). I made sure to publish the pages as well. 

 

Below is a screenshot of the post-functions in place. I only added the top one, the other were already there. Appreciate your quick responses. 

 

Post Functions.JPG

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events