time tracking not cloning

Hi

when I try to clone issue (with time tracking), it wont cloning time track to new issue.

is it possible to clone time tracking with issue?

 

Thanks,

3 comments
Comment actions Permalink
Official comment

Hi,

Do you mean cloning issue using `Clone` command? Unfortunately no, it works as designed - this work has not been actually done for the cloned issue. 

However, you can clone work items using workflows (ctx.issue.workItems set represents all issues workflows).

Comment actions Permalink

Hi Ana,

As I’m not familiar with Youtrack workflow, would you please tell me step by step?

for example: which type of workflow do I need?

After create and attach to project should I doing something else? Or it work when I clone issue automatically?

Thanks,

0
Comment actions Permalink

Hi,

This should be an action rule (https://www.jetbrains.com/help/youtrack/standalone/Workflow-Rules.html#action-rules) which will create a copy of the issue when applying some command (e.g. "cloneIssue"). Please don't use "clone" command as this keyword is reserved for the default clone action. 

You should add work items copying after copying the issue itself. What you need to do, is to copy ctx.issue.workItems into new issue workItems set (something like newIssue.workItems). Please refer to https://www.jetbrains.com/help/youtrack/standalone/v1-Set.html to find out how to handle sets. 

0

Please sign in to leave a comment.