Hello and thank you in advance. I have been seeing many similar answered questions but none of the suggested scripts were able to be parsed in ScriptRunner Console. Especially when adding EventDispatchOption class for being able to execute issueManager.issueUpdate().
The goal is listen to a change in one or more of these fields: Original Estimate, "Start Date" and "Target End" (the last two are custom fields)
Since both custom fields are a date picker and the oEstimate isn't I fail to run simple math operations such as minus() and plus().
I wanted to do something like this:
- If oEstimate is empty, calculate it from targetEnd.minus(startDate)
- if startDate or targetEnd were left empty, update them with the current Sprint value
- if startDate is updated, update both targetEnd and oEstimate by the calculating the days changed in startDate
- if targetEnd is changed, calculate a new oEstimate
I only have ScriptRunner. (Automation plugin requires Pro edition that we don't have)