[RESOLVED] How to determine that a task has been moved?

Hello,

How to determine that a task has been moved from one project to another?

Sometimes when transferring tasks from one project to another, some fields may be filled in, but I need to clear them. I can't find an event to understand when the task was moved.

0
4 comments

Hi, 

Please try the following: ctx.issue.isChanged("project") && ctx.issue.project.key === "SP", where SP is the new project key. 

Unfortunately, there is no way to get the old project value.

0

Hi, 

thank you, I already found it myself, I just didn’t have time to answer. I can use issue.oldValue('project').team.name, for example.

0

ctx.issue.oldValue('project').name - old project name
ctx.issue.oldValue('project').shortName - old project short name

0

Hi,

Thank you for sharing. It might be helpful to other forum users. 

0

Please sign in to leave a comment.