Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

Assign Issue to Reporter ONLY If Assignee Left Unassigned

We have developers that create issues all the time. Most often, these issues are for themselves, so we'd like to have issues automatically assigned to the reporter. Sometimes developers assign issues to other users.

If I use the "Assign to Reporter" post function, the issue is assigned to the reporter even if he or she changes the assignee to someone else.

Is there a way to only assign to the reporter if the assign field is "Unassigned"?

Thanks!

Karl

5 answers


import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.component.ComponentAccessor
def reporter = issue.getReporter()
def assingee =issue.getAssignee()

if (issue.assignee!=null){
issue.assignee=issue.getAssignee()


}else {

issue.assignee=issue.getReporter()
}

Where should this script be used/put?

Hi Max

You can use this script for on your workflow ,select a step in workflow select edit 

-->post function than you can add their a script ,i use this with ScriptRunner 

i am adding also links here to help you start with scripts on JIRA 

https://docs.adaptavist.com/sr4js/latest/get-started/tutorials/workflow-functions-tutorial/post-functions-tutorial

https://www.youtube.com/watch?v=DFvdK30lYuc

let me know if you need more info 

br

Mevi 

Out of the box, the answer appears to be no:

https://jira.atlassian.com/browse/JRA-27529

But....using a little script or a plugin can achieve the same trick:

https://answers.atlassian.com/questions/55934/how-to-assign-an-issue-to-the-current-user-on-create-transition

This can be achieved via post functions on the Create Transition in the Project Workflow.  You can make "Assign to Reporter" the first post function.  This will make Assignee = Reporter if the user did not change the value in the create screen (left it set to "Automatic").

Kimberly's solution did not work for me:

 

  1. The Assignee of the issue will be set to @#$@#$$.
  2. Creates the issue originally.
  3. Fire a Issue Created event that can be processed by the listeners.

I have it first yet whenever i try to create an issue, it always goes to the default assignee, not to the assignee that I select when creating the issue.

For anyone coming across this page in the 2020's - this can easily be accomplished using Automations. See: https://www.atlassian.com/software/jira/automation-template-library#/rule/1381434

You can add a condition that if the Assignee IS EMPTY the automation will run. If your "Default" assignee is "Unassigned", this will only change the assignee to the reporter if a different assignee is not chosen.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Asked in Jira Service Management

JSM June ask me anything (AMA)

Hello Community members! We’re wrapping up the end of JSM June with an Ask Me Anything (AMA) with the Jira Service Management product team. This is your chance to ask all your ITSM questions to o...

258 views 12 14
View question

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