Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Time spent as the same of the original estimated

Lucas Silva Dantas Abrantes November 16, 2022

i'am trying to copy the the original estimated value to the time logged and put zero on time remaining when the sub-task go moved from the status to do and in progress to done but is not working well, i tried to make it with the json code but it is getting a erros of parse, i don't know if is my rule or something else, how could i solve this ?

Automation screenshot

image.png


JSON CODE

"update": {
"worklog" : [
{
"add": {
"timeSpent" : "{{issue.timetracking.remainingEstimate}}",
"remainingEstimate": "0"
}
}
]
}


Error screenshot

image.png

1 answer

1 accepted

3 votes
Answer accepted
Trudy Claspill
Community Champion
November 16, 2022

Hello @Lucas Silva Dantas Abrantes 

An issue can have multiple worklog entries.

Do you want to actually edit an existing worklog entry, or add a new worklog entry for the time that was remaining on the issue? I think you want to do the latter (add a new worklog entry).

With the Edit Issue action you would be trying to edit a pre-existing entry, but what you have would not be the right way to do that anyhow, as it would not know which pre-existing worklog entry you are trying to edit.

If you want to simply add another worklog entry for the amount of time remaining, use the Log Work action.

Screen Shot 2022-11-16 at 9.10.58 AM.png

 

In this case you don't need to explicitly set the Remaining Estimate field to 0. Logging work automatically resets the Remaining Estimate to (Remaining Estimate - Time Spent). Since you are setting Time Spent to the value that was in Remaining Estimate, the new value of Remaining Estimate will be zero.

Lucas Silva Dantas Abrantes November 17, 2022

it worked well thank you very much

Enmanuel Vignoli July 19, 2024

i got a similar case, but what i want is to "copy" the time spent (registered hours) to the Original Estimation, but this just in the case of the O.E = 0.

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events