It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to Use the Post Function

Kristen Viscardi Dec 10, 2015

it is possible to set a post function or a condition that says if the assignee field is “unassigned” that the person making the transition becomes the assignee?

3 answers

1 accepted

0 votes
Answer accepted
Nic Brough [Adaptavist] Community Leader Dec 10, 2015

Definitely a post-function.  A condition blocks a user from starting a transition if the condition is not met. 

You will need to find or write a post-function that will set the data for you at the end of the transition.  You can read the assignee field and say "if unassigned, set it to current user".  I'd use the script-runner to do it.

0 votes
Steven Behnke Community Leader Dec 10, 2015

Conditional Post-Functions are not a 'thing' in JIRA. Sometimes the programmer of a Post-Function programs the ability to write conditions or select simple conditions but that's outside of this conversation.

You should write your own post-function to achieve this goal.

To obtain this functionality without a writing a custom add-on, we must use conditions/post-functions as they exist within JIRA.

 

Use-case

Pressing Start Progress should assign the issue to the current user if it's unassigned.

Design

Create mutually exclusive transitions with opposite conditions, with identical functionality. They can have the same name to create a seamless experience.

Process

Transition to assign to current user if the issue is unassigned

  • Create a new transition, from Open to In Progress
    • Name it Start Progress
    • Add a Value Field condition
      • Assignee = null
    • Add an Assign to Current User post-function

 

Transition to leave it assigned to the current assignee

  • Create a new transition, from Open to In Progress
    • Name it Start Progress
    • Add a Value Field condition
      • Assignee != null


To sum up...

You should now have two transitions. Only one can be visible at a time, and the logic performed will be as requested.

Steven Behnke Community Leader Dec 10, 2015

Please note, the Value Field condition is provided by the JSUtil plugin, which is available for free for both JIRA Server and JIRA Cloud, thanks to Beecom.

0 votes
Kristen Viscardi Dec 11, 2015

Thanks!

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted in Jira Core

How to manage many similar workflows?

I have multiple projects that use variations of the same base workflow. The variations depend on the requirements of the project or issue type. The variations mostly come in the form of new statuses ...

741 views 7 0
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you