I want to update Original Estimate field using Groovy in Scriptrunner that way changes will not appear in history.
I know that customfield.updatevalue() method does what i want, but it's for custom fields, not for TimeTracking field.
In documentation I saw a matching method at Calvindude
updateValue(FieldLayoutItem fieldLayoutItem, Issue issue, ModifiedValue modifiedValue, IssueChangeHolder issueChangeHolder)
, but there is 2 problems:
I dont know how to retrieve this field for an issue
And what modifiedValue should look like in code
You can use issue.setOriginalEstimate() to set it on an issue instead of customfield.updatevalue()
And that leads to the assumption for me that issue.getOriginalEstimate answers your first problem (An assumption that I did just look up too, it's right)
The modified value is a pair of values, old and new, for the field being modified, so the old-value would be whatever you get from .getOriginalEstimat, and the new, the same type of data, changed in the way you want. (I am not sure I remember what original estimate thinks in, but I think it is seconds, and the value a long, so an estimate of 1 minute would be simply 60 (long) and a new value of 1 hour 3600 (long) )
Hi @Minahil Malik ,
welcome to the Atlassian Community!
The change is always done in the name of some user, so I don't think it's possible to do it without change in the history.
When do you what to do the change? Should this be a post function or something else?
And to which value you want to change it?
Thank you.
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.