Hi
I'm using the solution from Riada https://riada.se/blog/sana/estimate-your-sub-tasks-in-jira-agile/ to be able to use the summed up Estimate from the sub-tasks instead of the Estimate only from the Story in a Scrum board. So I want the sub-tasks to roll up to the Estimate value which it does, but not immediately.
I also have a listener that does reindex/update both the issue itself and its parent (if it has one). But when I create a sub-task and set an Original Estimate, the parent Issues Estimate field (and the scripted field that contain the sum) doesn't change until I do some update like edit, change the ranking or such on the parent issue. The idea with the listener is of course that the changes should be instant. But if I for example remove a sub-task the value updates instantly so it seems to be that the reindex listener misses out that I have created a sub-task?? The sub task fires an Issue Created event and I also added the reindex post function but it doesn't help.
Does anyone have any idea why the listener doesn't run when creating the sub-task?
This is basically the interesting part of the reindex listener:
@EventListener
public void onIssueEvent(IssueEvent issueEvent) {
Long eventTypeId = issueEvent.getEventTypeId();
Issue issue = issueEvent.getIssue();
Issue parent = issue.getParentObject();
// if an event is triggered, re-index
if (!eventTypeId.equals(EventType.ISSUE_DELETED_ID)){
reIndexIssue(issue);
if (parent != null) {
reIndexIssue(parent);
}
}
}