Automation for JIRA time estimation editing issue

Stanisław Juźwicki September 27, 2019

I have an issue with a relatively simple automation rule, I would be grateful if you could point out if I am making a mistake here. The requirement is: whenever an issue of "Sub-task" type is set to "Done", the rule should zero-out the remaining time estimate on that sub-task.

So I have a rule that looks like in the screen below. It does work correctly in a way that it does zero out the remaining estimate. However, it also zeroes out the Original estimate - and that is definitely not something I want. Is that a known issue, or should I use a different syntax in the Additional fields box?

 

jira-automation-issue.JPG

3 answers

1 accepted

0 votes
Answer accepted
Michael Kuhl {Appfire}
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 27, 2019

Hi Stanislaw - Your advanced editing looks right.  Perhaps a workaround would be to set the original estimate as well, but use the smartvalue for the issue to set it to it's current values like this:

"originalEstimate": "{{originalestimate.value}}"

 

Nick Menere
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 29, 2019

Yeah, this is annoying as the API zeros out the value unless you explicitly set it.

The better option is to select the Time Tracking field from the field list and set the remaining - we do the smarts in the back end to ensure it works as expected.

 

Cheers,
Nick [Automation for Jira]
Co-founder

Stanisław Juźwicki October 3, 2019

Thanks, Nick, this worked like a charm :)

Alexandru Vlaicu June 15, 2021

Hi @Nick

We are using Cloud Jira. 
I'm trying to automate and copy a value from a custom field (only accepts integer numbers) to OriginalEstimate, when I transition a ticket from In Developement to QA Ready. 

I've tried multiple scenarios:

1.
{
"fields": {
"timetracking": {
"originalEstimate": "{{issue.customfield_10211}}"
}
}
}

2. 

Define in automation the variable {{timeFromQA}}
timefromqa.png
then 

try editing with automation the originalEstimate field:


{
"fields": {
"timetracking": {
"originalEstimate": "{{timeFromQA}}"}
}
}

Screenshot 2021-06-15 153305.png
Please advise!

3 votes
Dan H June 19, 2020

Hello, this doesn't seem to work at all for Next Gen projects, so gutted :'(

Have attempted using the following:

{
   "fields": {
    "timetracking": {
      "remainingEstimate": "0",
"originalEstimate": "{{timetracking.originalEstimate}}"

    }
  }
}

which works perfectly for Classic Projects but we receive an error mentioning the 'timetracking' field when using this advanced automation rule on Next Gen projects.

Please help!

0 votes
Christophe Noualhat June 1, 2021

Why are you not using a post-transition rule in your workflow to do that ?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events