As an example I have 5 Tempo worklogs on an issue, 3 are billable and 2 are not billable.
Each time a log is entered the following automation is triggered:
I order to better understand the issue I've added a comment for each billable worklog:
The custom field has at the end the last iteration value, instead of the needed sum of 6h.
I've tried to get this running with updating the issue field (triggerIssue as well as issue) and getting the value again via web request in order to increase it. I've tried the same now via a project property. But in none of the cases the value is updated withing the loop. It always remains within the loop with the original value that it had outside the loop.
How can I get an increasing number field that modifies the outer issue custom field (JQL not possible with TEMPO)
@Bill Sheboy I've seen many great posts from you, maybe that's an easy answer for you? Thanks.
@Simmo Do you have any ideas? - thanks
Hi @André -- Welcome to the Atlassian Community!
Without seeing your entire rule, or understanding the problem you are trying to solve (i.e., why do this), I note three things in what you show:
Putting those things together, it is likely the rule is walking over prior issue updates. This could be confirmed if you view the issue history to observe the repeated edits.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy thanks a lot for the quick answer.
What do you mean with "add a Re-fetch Issue action after the edit"?
Mainly I'm searching for a possibility to have an increasing variable within a advanced loop, that I can use once to update one sum filed. As I didn't find any possibility I tried these variants.
We need one sum off all billable worklog items within an issue. Therfore we need to check all worklogs of one issue if they are maked billable and the take their sum.
At the end we're not interested of the sum of remaining time, but in the sum of remaining billable hours.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for that additional information.
For an example of what I meant by the Re-fetch Issue actions...
In this example, the edit in step #3 is based on the issue and data conditions at the trigger timeframe, and not from the step #2 immediately prior.
Back to your original scenario, you are gathering the Tempo worklogs for a specific issue and then trying to sum the billable time.
Reviewing this endpoint, isn't the billableSeconds value available when the worklogs are queried? https://apidocs.tempo.io/#tag/Worklogs/operation/getWorklogs I am not using Tempo currently so please confirm this for your site.
If so, you could sum the data using smart value, list filtering on the results in one step after that first Send Web Request call by filtering for the ones where billableSeconds is greater than 0. That would eliminate the need for the branching to lookup each log entry.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy unfortunately not. The billableSeconds are only to be added to the sum, if the attribute (within another array) with the key "_Billable_" contains the value "Billable".
But I manage to get now all in a very complex smart value operation.
Still my questions reamain:
1. Is there any possibility to have any running variable in a loop, that can be used even after the loop.
2. Is there a possibility to stop a running loop when a check fails
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For your specific questions:
1. Is there any possibility to have any running variable in a loop, that can be used even after the loop.
Answer: Not with automation rules currently.
As such rule branches run in parallel and asynchronously, they apparently do not share any storage that could be used for such a variable. Using something outside of the issue (like a project property) is unlikely to work due to update collisions. And, because the branch may not complete before the steps after it start, such a value could not be relied upon.
There is an open suggestion to add an option for serial vs parallel, rule processing, which you may watch or vote for to see progress: https://jira.atlassian.com/browse/AUTO-32
I have seen brittle workarounds using multiple rules, but they rely on forecasting rule duration and assuming no automation outages / slow downs before completion. For example:
2. Is there a possibility to stop a running loop when a check fails
Answer: No. Please see answer to the first question.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy thanks again for your very quick replies.
A real pity. I've now also voted for the suggestion to get a massive improvement.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.