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
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()
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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://www.youtube.com/watch?v=DFvdK30lYuc
let me know if you need more info
br
Mevi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Kimberly's solution did not work for me:
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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").
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.