Issue Re-assignment Event

Hiren Sharma June 9, 2014

Hi,

I have a requirement where i want the current user to be added as watcher whenever that issue is re-assigned to someone else. I know that this can be done with help of post function but i don't know how i can track this "re-assignment" event ??

Please help me out as i need this urgently.

Thanks

1 answer

0 votes
Peter Van de Voorde
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 9, 2014

Hi Hiren,

Simply add the assignee to the watchers list using the issue assigned event.

This is triggered everytime the issue is assigned (so also when the issue is reassigned).

Best regards,

Peter

Hiren Sharma June 9, 2014

Thanks Peter for your response bu i am a newbee. Can you please elaborate. I have added post functions in Workflows but i am not getting an idea about how i can write post function for "Issue Assigned" event ??

Peter Van de Voorde
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 9, 2014

Hi Hiren

The easiest way might be using the JIRA Toolbox plugin and the watchers postfunctions it provides: https://marketplace.atlassian.com/plugins/com.fca.jira.plugins.workflowToolbox.workflow-toolbox

Another option might be to write your own post function using the scriptrunner plugin: https://marketplace.atlassian.com/plugins/com.onresolve.jira.groovy.groovyrunner

Autowatching might also be a solution:

https://confluence.atlassian.com/pages/viewpage.action?pageId=591593930

Best regards,

Peter

Hiren Sharma June 9, 2014

Well, those plugins really don't fir mt situation but yes if i find a way to capture issue-assign event from groovy listener, may be i can achieve what i want.

But how do i capture issue assigned event in groovy runner ??

Peter Van de Voorde
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 9, 2014

Use the listeners to listen for the Issue Assigned Event, they can then trigger your groovy script.

Hiren Sharma June 9, 2014

I'm sorry peter but I think i was not able to explain my last comment. My concern is that how do i get the last Assignee. I have used the custom listener but i am not getting the last assignee. All i get is the current assignee and not the older one

Peter Van de Voorde
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 9, 2014

Hi Hiren,

If you trigger this listener on every issue assigned, issue created or issue updated event you should be able to add everybody that was once assignee to the watchers (and even the current assignee will be added). It will indeed always be the current assignee you're adding, not the old one. But this will make no difference in the end.

Do keep in mind that you cannot add somebody multiple times to the watchers so you shouldn't be worrying about that.

Best regards,

Peter

Suggest an answer

Log in or Sign up to answer