Can I take description of 'Spent time' field from JS workflow or search query?
I want to take description of Spent time field and update the type of Spent time.
1) Is it possible to get the value of description of Spent time field from JavaScript workflow?
I see ctx.SpentTime and ctx.issue, but there are no value of description of Spent time field.
2) Is it possible to show the value of description of Spent time field in the result of search query or in some report?
Please sign in to leave a comment.
I'm Lena from the YouTrack Team.
Could you please specify if you are talking about the Spent Time field or about work items? The Spent Time field has a type: period and doesn't have a description. If you are talking about the work items, you can check these docs: https://www.jetbrains.com/help/youtrack/devportal/v1-IssueWorkItem.html
Hello Lena.
I attached the screenshot. I need to get 'qwerty' comment.
I am sorry. It seems that I meant the comment, not description.
Spent time is located near by general comment. Is it field or about work items?
Hello,
Thank you for the screenshot. It is a work item. In this case, the code will look as follows:
As for the second requirement, I'm afraid, it is not supported. However, if you describe your scenario in detail, I will try to find a workaround for you.
Thank you for the answer. I think it should help me.
About the second question. Actually, I want to see duration (10m, 1h etc) that has specific description/comment (For example "Review") in the issues of the project at one place. Not sure that it is possible, but if yes, it would be good.
Thank you for clarification. You can create search queries based on this message: https://www.jetbrains.com/help/youtrack/cloud/Search-and-Command-Attributes.html#Time-Tracking-Search. Also, you can use workflows to create reports and use this message there: https://www.jetbrains.com/help/youtrack/cloud/generate-time-reports-workflow.html
Thank you for the answer.