Hi Team,
We are looking for the configuration to update the parent ticket field value based on the sub-task field value using the scriptrunner
The requirement is :
If the main task has "n" number of sub-tasks, and if the "Scheduled Completion Date" of any subtask is changed to a later date(farthest), we should update the main task with that date.
Ex : If subtasks "Scheduled Completion Date" are sub-task1 = June 23, sub-task2 =July 20, sub-task3 = July 26, etc., and a user changes any of these sub-tasks to August 12, the main ticket should also changes to August 12th.
Hi Lakshmi,
I do that with a simple Automation Rule:
You could probably do this through an Automation rule, although I admit to not being super familiar with them, so I'm not sure how the logic would work to get the latest date.
If you wanted to use Scriptrunner, you would still probably want to have an Automation rule that triggers when the Scheduled Completion Date field is updated. The rule would trigger a custom event, but only when the field was updated on the particular subtask issue type (so it wouldn't trigger when the parent's value was updated).
I'm not sure what level of assistance you need with the Scriptrunner script, but something like this would do most of what you want. In this example, I'm using a field called "Target End", but you could change the name of the field you're looking for.
The last section updates the field on the parent, but doesn't generate an IssueUpdated event. It also re-indexes the parent issue so that the new field value will be used when doing any kind of JQL search.
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.