Clear account field on issue when moved between projects

Sigridur Harpa Hannesdottir
Contributor
July 2, 2019

Hoping someone can help me, not finding anything with my dear friend Google :)

When I move an issue to a certain project (project X) I want the account field to be cleared because in project X there is one or two accounts that are used and they are not available in other projects.

I added a post function on the create transition in the workflow on project X: "Clear Field Value (JSU): Field: Account" and selected that Precondition is ignored.

I was hoping that when I moved an issue from another project to project X, the issue would not keep their current status, but go through the create transition of project X and therefor the account field would be cleared.

How can I do this?

Can I do this through the workflow?

Best regards

Sigga Harpa

1 answer

1 accepted

0 votes
Answer accepted
Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 2, 2019

Hi @Sigridur Harpa Hannesdottir ,

moving an issue is not the same as creating one. There's no new issue after moving, just the old one with a new key. E.g. you can still find the issue if you search for its old key.

That's why the create-transition is not triggered by moving an issue.

Do you have the Scriptrunner app? If so, you can create a custom listener which is triggered by the "Issue Moved" system event and removes the field value with your custom listener by script.

Sigridur Harpa Hannesdottir
Contributor
July 2, 2019

Hi Thomas.

Thank you for your reply. Yes we do have Scriptrunner.

One question - I select the Event= Issue moved and the project, is that project X then? The project issues are moved to?

Best regards

Sigga

Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 2, 2019

I think it should be the one you are moving the issue to. This is the one, where the event is fired as far as I know. 

Sigridur Harpa Hannesdottir
Contributor
July 2, 2019

Great thank you.

Suggest an answer

Log in or Sign up to answer