Automatically set the current user when closing an issue in JIRA?

Hi devs,

Context: Loading...

In order to make sure we always have an assignee for closed issues, I’m proposing to add a jira post function in the close transition so that the current user is assigned when closing an issue (“Assign the issue to the current user. Please note that the issue will only be assigned to the current user if the current user has the ‘Assignable User’ permission.”).

The only issue I see is that this will overwrite the assignee if it’s already set (with the current user).

It should be possible to write a custom scriptrunner groovy script to do this but it’s much harder (something like https://community.atlassian.com/forums/Jira-questions/Script-Runner-setting-Assignee-on-Issue/qaq-p/808105 but that requires some research and testing).

WDYT?

Thx

I don’t find a common scenario where it would be a problem: AFAIK people assigned are always the one closing. There might be rare case of fixing something in the ticket where we might need to reopen and close again but then I guess we’d be careful.
So +1 for me.

I’m regularly closing issues where I’m not assigned when merging pull requests of non-committers (as I want to be sure that the issue doesn’t stay open, and I don’t always know if the contributor is available immediately to close the issue). Apart from special contributors, afaik non-committers also aren’t allowed to close issues but should be assigned to them based on our best practices. This will make it much harder to follow these practices.

Can’t we only change the assignee when it is empty?

-1 for that since there are many cases where a committer need to close an issue assigned to a contributor, as mentioned by @MichaelHamann

I would of course be +1 if the rule was “Assign the issue to the current user, if it’s not assigned”.

See:

Yes, I wouldn’t have sent a proposal if I was able to implement this easily, the proposal was only there to decide if we wanted to simplify the 90+% use case (where the assigned user is the current user) and for the 10%, do the extra work of setting back the assignee before it’s changed when closing the issue. But I wasn’t sure myself.

So the conclusion is that we’re not going to do it and I’m dropping the proposal, as:

  • I don’t have the time to invest more in the research (writing the groovy script-
  • I don’t want to invest too much in jira as we want to move out of it (for openproject most likely)

Thanks for the feedback.