Hi Dear Community!
I need a solution in this case.
I have a custom field named Logged in Current sprint.
I need an automation, which will copy logged time in the mentioned customfield, but logged time only for the current sprint, no need to copy all logged time, which could be transferred from previous sprint.
{
"fields": {
"customfield_23826": "{{#=}} {{issue.fields.timetracking.timeSpentSeconds}} / 3600 {{/}}h"
}
}
I used this, but it returns all logged time, I need only the logged time of the current sprint of the each ticket to keep in the customfield.
Hi @Gor Greyan
This can't be done.
Log worked actions can't be differentiated based on Sprint field value is populated or not.
So Time Spent only has information based on the logged work.
Hi @Marc - Devoteam
Thanks for the response.
So, you mean that from the Time Spent, there is no possibility to get information and keep it in customfields, that are logged in the current sprint?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI @Gor Greyan
Correct.
Logged time is on an issue, when this occurred can be filtered based on dat, but not related to a Sprint name
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Gor Greyan
I could just think of a workaround with a separate customfield and some automation:
Might that be a feasible solution for you?
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Stefan Salzl
Thanks for the answer.
But how to copy the logged time into that custom field? I tried my mentioned way, but it copied all time logged time.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Gor Greyan
I just did a quick test rule and as far as I got you right it does the job.
The trigger is a "work logged" trigger with "work log created" action:
This means it will run whenever a new working time is logged. The trigger allows to get the amount of time logged with the smart value {{worklog.timeSpentSeconds}}
Afterwards I add the amount of logged time to my number field (see screenshot):
The whole calculation statement within the edit issue action is:
{{#=}} {{issue.Number 1|0}} + {{worklog.timeSpentSeconds.asNumber}}{{/}}
In case your users are allowed to delete their worklogs you could create another similar rule with the same trigger but with "delete" action and then substract the time logged.
Furthermore another rule needs to be created that "resets" all issue´s number field when a sprint is closed so that you start from scratch in the new sprint.
Hope this gives some hints and input to solve your requirement.
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Stefan Salzl
Thanks for the detailed information. But unfortunately, I received the following error. See the attached screenshot.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Gor Greyan
Did you set up the rule exactly as described i my previous post? As the audit log shows any JQL action it seems (without seeing details of the rule) the trigger is not a worklog trigger. Am I right?
If so the {{worklog}} smart value is not available. This special smart value refers to the special worklog trigger and can only be used in such a rule.
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Stefan Salzl
Yes, the trigger is Worklog creation, and I had a JQL condition, which checks that the worklog is done during my sprint dates.
Below you can find my automation structure.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Gor Greyan
how should that work in future sprints then? (fixed date?)
furthermore:
did you chceck the JQL in a native Jira issue search? What´s the result there?
Furthermore:
why would you check the sprint?
as described in my suggested solution the temporary sum of worklogs gets deleted after each sprint.
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Stefan Salzl
I think we will change it every sprint.
Yes, I searched, and it returns all tickets that are logged only in the mentioned period.
Firstly, I tried to achieve that via that JQL, and get from there Time Spent, that is why that JQL condition was left there.
Okay, it is great that it is being deleted.
But as I mentioned, I could not get the Time Spent, getting the mentioned error, which I provided.
Do you have another solution?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For the JQL I could suggest a workaround solution to try with jql function openSprints()
https://support.atlassian.com/jira-software-cloud/docs/jql-functions/#openSprints--
Further:
The community is a place where we try to give hints, lead into directions to guide you finding your solution. It should not be a place to post your requirement and expect a "ready-to-go" solution. I believe I can savely say I offered quite some inspiration on how this requirement can be solved even though with some effort.
Getting a ready to go solution there are quite a lot consultants out there who will be happy to deliver ;)
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Stefan Salzl
Sorry, but I didn't expect or require ready-to-go solution. You provide a way to achieve that, I inform you that it is not working :)
Thanks anyway!
Have a good weekend.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Following my original documentation the suggested solution would have worked (as I tested it successfully).
I do not take account of unnecessary modifications.
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Stefan Salzl
You provided solution is from Jira Cloud, as I mentioned, I am using Data Center. Also, I provide the example, where in the Data Center you provided Documentation didn't work. I provided the error message, which I received.
If you can help regarding that error, thank you; if not, please, don't say that I require ready-to-go solutions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Gor Greyan
now I guess I understand the background of the JQL condition. Is it because of the "update"-condition in the trigger? that´s why I separated all the trigger actions. I would like to guide to clear and easy solution.
When I only have the trigger action "create worklog" it can only be a worklog at that special point of time. So any other sprint (as the are either past or in the future) could make it into the rule (hence the field).
Furthermore for an update action of the worklog it needs more logic as the amount of time (the difference between old and new timeSpent) needs to be calculated and wether it´s a reduction or raise of the time it needs to be decided either to substract or add that amount.
Regarding your JQL Problem:
My fault, didn´t see that it´s DC. I created it in DC too. Did you try to set the date into quotation marks? And furthermore did you try to validate the JQL in the condition-copmponent? (see screenshots)
Please let me know if this worked/helped.
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Gor Greyan ,
Our app, Time in Status by SaaSJet, currently cannot populate a custom field with logged time filtered by sprint. However, we do provide this data within the Sprint Report, where it’s calculated like this:
Logged Time – The total time team members spent on each work item during the sprint, based on worklog records between the sprint’s start and completion dates.
So, while you can’t push this data into a custom field at the moment, you can still view the precise sprint-based logged time through our app’s Sprint Report section.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Iryna Komarnitska_SaaSJet_
Thanks for the provided solution.
But does it provide information per ticket?
I need this at the ticket level
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.