Assignee in post function not working

Mark Wemyss July 1, 2012
I have defined the following post function for Create Issue.
Creates the issue originally.
— THEN
The Assignee of the issue will be set to 764632.
— THEN
Re-index an issue to keep indexes in sync with the database.
— THEN
Fire a Issue Created event that can be processed by the listeners.
However, when using auto assign, the issue being sent to the project leader instead of the user defined in the post function.
If assigning to the user manually, it works.
There are no components defined for this project.
Any tips as to why the auto assign isn't working ?

2 answers

1 accepted

2 votes
Answer accepted
Norman Abramovitz
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 1, 2012

I can think of two possibilities.

1) You did not state that the "Update change history for an issue and store the issue in the database" is part of your post-function chain. Without this post action, the database will not be updated with your change.

2) if you do have that post-function does it occur before the assignee post action?

I do not believe it is a permission problem since you can do the action manually.

Mark Wemyss July 1, 2012

Thanks Norman.. I changed it to the following and it seems to have fixed it.

Creates the issue originally.
— THEN
Add a comment to an issue if one is entered during a transition.
— THEN
The Assignee of the issue will be set to 764632.
— THEN
Stores updates to an issue (no change history is created).
— THEN
Re-index an issue to keep indexes in sync with the database.
— THEN
Fire a Issue Created event that can be processed by the listeners.

Norman Abramovitz
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 1, 2012

Since this is an initial transition, I am not sure if you also need this post function or not.

"Set issue status to the linked status of the destination workflow step" I know you need it for any other transition. See this documentation:

https://confluence.atlassian.com/display/JIRA/Configuring+Workflow#ConfiguringWorkflow-Applyingpostfunctionstotransitions

8 votes
Aaron Oliver January 28, 2013

You need to make the "assign" step the first in the list of post functions, as explained in this knowledge base article.

5. Add a post-function, 'Update Issue Field', and set the Assignee field to desired user (if necessary, create a draft so the workflow is editable)

6. Make sure the Post-function is the first step in the list

It seems counter-intuitive to set the assignee before the issue is created, but it seems to do the trick.

Andrew Pidcock January 4, 2019

If only it worked.. 

Ricky LaFleur October 25, 2019

Works for me. This is for case where Post-Function in the create issue transition does not update assignee due to order. Thanks @Aaron Oliver4 !

Suggest an answer

Log in or Sign up to answer