In JIRA, I was wondering if there is a way for the user that creates an issue can be the only one to close it. Right now, I have only the reporter can close an issue condition set for the close transition.
Any help would be appreciated.
I see what you mean. You are saying that you want the *original* reporter to be the only one able to close it, regardless of who the *current* reporter is, yes? Sounds like what you want to do is create a user custom field, call it "Original Reporter", copy the value of Reporter to that field in a post function from the Create step in your worklfow, and then associate that custom user field in a permission based condition on your close step. :)
Thank you for the response Kapil!
I currently have that set as one of my conditions. However, we have multiple people creating issues (users, developers, and admins) and assigning a reporter and assignee other than themselves. Even though they are not the reporter or the assignee, I would like whoever created the issue be the only one to close it. Is this possible?
Just like to ask were you able to do what Natalie mentioned? I tried to copy it by doing the following below
1) Created a workflow
2) Created a new custom field called it "original reporter"
3) On the new workflow that was created, updated the post function of the create transition
4) selected the post function "copy value from other field". The source field is the "reporter" and the destination field is the "original reporter field"
5) Update the condition of the "close issue" transition created and added the condition "user is in customer field" , and selected the user must be "in field" and field is the "original reporter"
Here is the sample workflow created
This did not work, hope you can enlighten me or me on who to make this work.
Now that Atlassian has provided a "Creator" value (which is the person who originally created the issue, no matter who the current Reporter is set to), this can be done more easily using the Condition or Validator "based on regular expression" from the JIRA Workflow Toolbox plugin (one of my faves). Simply select either the Condition or the Validator, and in the "Field or parsed text to be checked for matching with regular expression" select "Current User" from the dropdown, and then in the "Regular expression" box select "Creator" in the "Field code injector:" dropdown.
Thanks for replying, I check the JIRA Workflow Toolbox plugin you mentioned above.The plugin is not for free, I have to get approval to buy the item. Is there any other way to work around this using only the post functions or the conditions of the JIRA workflow diagram?
Can you narrow down where the workflow is failing? For example, does it successfully copy the value of Creator to your custom field on create transition? Or is the workflow failing later on?
Note that you want to make sure the post function you add to the create transition is below the "creates issue originally" post function, otherwise there's no value for Creator to be copied.
Apologies for the late reply. Was able to make it already work. Thanks for those hints, I was actually doubting if the value of to initial reporter was actually being copied to the custom field. Then, you mentioned that I have to make sure "the post function you add to the create transition is below the "creates issue originally" post function" and it made sense. Missed that little detail, and was able make it work afterwards.
Cudos to you! Many thanks!
@natalie-hobson is right.
Kapil, "Only Reporter" condition will not work here. I can be the logged in user and set the reporter as Kapil. What Kyle wants is, only Bhushan should be able to close the issue because I am the one who is actually creating the issue although I am setting the reporter to Kapil.
Natalie Hobson's method will work. You will need a custom field that you set the value to the logged in user and then have a condition to allow closing the issue to only the person captured in the custom field.
Atlassian Summit is an excellent opportunity for in-person support, training, and networking.Learn more
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!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG