Hi All,
is it possible in JIRA that the creator of an issue would be the default assignee? THere is a project where most of the users raise issues for themselves. When they raise the issue and set the assignee it will automatically changed to the default assignee.
How can we do that?
Thanks, Rumi
Hi,
In the workflow, add the postfunction "Assign to Reporter" at create tranistion (Assuming the creator is always same as reporter)
Regards,
Chaithra
They can also just click the assign to me link underneath the Assignee dropdown box. Then both your workflows are possible.
You can use the Script Runner plugin and the following simple scripted postfunction
Condition:
!issue.assignee
Script:
issue.assignee = currentUser
as part of the create transition. If the user doesn't change the assignee, the issue is assigned to the current user. If it's changed, the assignee choosen by the user is the assignee.
Henning
Hey Henning,
i'd like to implement your suggestion but I am pretty new to script runner. Can you give me a more step by step help to implement this?
Thanks
Thomas
Enter inline script
if (!issue?.assignee) { issue.assignee = currentUser }
Click on "Add"
Hi Henning,
thanks a lot for comming back to me. I tried it but i cannot find an option for entering an inlin script. I can preselect some options or define a path to a script. How do I enter an inline script?
Hi Thomas,
in my version there is a (dark blue) inline script field. Did you follow the instructions step by step?
Hi All!
I also need to do reporter = assignee.
I did this step by step and the task was created unassigned.
Should I change smth in it?
What did I do wrong?
try
if (!issue?.assignee || issue?.assignee == "-1") { issue.assignee = currentUser}
as inline script.
No, it doesnt work also and I have a log on it
Time (on server): Thu Apr 12 2018 11:27:11 GMT+0300 (Russia TZ 2 Standard Time)
The following log information was produced by this execution. Use statements like:log.info("...") to record logging information.
2018-04-12 11:27:11,117 ERROR [workflow.ScriptWorkflowFunction]: ************************************************************************************* 2018-04-12 11:27:11,117 ERROR [workflow.ScriptWorkflowFunction]: Script function failed on issue: null, actionId: 1, file: <inline script> groovy.lang.MissingPropertyException: No such property: currentUser for class: Script1591 at Script1591.run(Script1591.groovy:2)
Ah, ok, than this:
import com.atlassian.jira.component.ComponentAccessorif (!issue?.assignee || issue?.assignee == "-1") { issue.assignee = ComponentAccessor.jiraAuthenticationContext?.getLoggedInUser()}
It looks like you're new here. Sign in or register to get started.