How can I default to a user (such as reporter) in a transition but still keep it changeable?

I am new to Jira and am trying to figure out how to accomplish this in our workflow.

Problem:

We have a Needs Info state where in most cases it should assign to the reporter. I don't want to ONLY allow this though as the user might need to assign it to a different person for the info that they need. This means that a post function will not work for me as far as I can tell. So, what I would like to be able to do is have the Assignee field defaulted to reporter but use the selected Assignee if the user changed it to someone else.

So far I have not been able to figure out a way to make this work.

Some of what I have tried

  1.  I tried using the "Update on Transition" add on to detect if the Assignee was blank during a transition and then set it to reporter thinking that if a value was selected that it would use that instead 
  2. I then came across JJupin and thought it would work since they seem to describe exactly what I want to do through live fields here  but so far I have not been able to get this to work either.

Has anyone else run into this problem and figured out how to solve it? Setting default values in the transition screens that could then be changed would be the ideal solution.

Thanks,

Doug

 

 

2 answers

0 vote

My intial thought, to save having to use an add-on, is why not have two transitions?

Something like:

  • 'Ask reporter for more info' - Has post-function to auto-assign to reporter.
  • 'Ask someone else for more info' - Has 'Assignee' field on transition screen for user to pick who they want to assign to.

Sure that could work but it seems a bit silly to have 2 transitions for this. Our hope was to keep things as simple (in appearance) as possible. This was something that our old DB was able to do easily and something that seems like it should be possible in Jira.

0 vote
Alex Christensen Community Champion Apr 14, 2017

Do you have ScriptRunner installed? We are on Server using ScriptRunner and I was able to use this scripted post-function - if the Assignee field is left as "Automatic" when creating an issue, then the issue gets assigned to the Reporter. You could use this in your transition - this would allow you to choose an Assignee, or leave it as "Automatic" and then the issue would be assigned to the Reporter.

import com.atlassian.jira.issue.MutableIssue
import webwork.action.ActionContext

String assigneeFormValue = ((String[])webwork.action.ActionContext.getRequest().getParameterMap().get("assignee"))[0];
if (assigneeFormValue == '-1') {
    issue.assignee = issue.reporter
}

ScriptRunner says there's an error in this code (error with casting object types), but this works on our instance of JIRA correctly. Also, I've never used ScriptRunner in Cloud, so if you're on Cloud, I don't know if scripted post-functions are possible or not.

That is close to being workable for us. The problem is that this is not on the create transition so when the transition is chosen, it will have the current assignee populated in the assignee field. 

I suppose we might be able to detect if the assignee has been changed or not and assign to reporter if it has not changed. That should give me the functionality I want but would not be immediately obvious to the user. Still, it might be better than nothing. Now I have to figure out what that would look like in the script.

The JJupin option might still be a possibility. I was able to get it to display the reporter in the transition screen and assign to them. The problem is that even if I change it, it still goes to the reoprter. :( They say this is a bug that they are going to fix...fingers crossd that it happens soon.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,316 views 14 20
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot