Follow-up from "Prevent errors when work item does not exist"
From @acroitor
!147032 (diffs, comment 1812493321)
Scenario:
- Let's say we have this work item structure:
- Epic1
- Issue 1: start date: X1, due date: Y1
- Issue 2: start date: X2, due date: Y2
- We delete the Issue 2
-
-
parent = ::WorkItem.find_by_id(event.data[:id])&.work_item_parent
returns nil, so we do not update theEpic1
?
-
Given that when a WI dates are changes we really need to fire the rollup update starting with WI's parent, maybe in the event we should be passing the work_item_parent_id
on all the events: creat, update, delete? And in the handler we would be finding the work item by parent_id and if not found nothing to do.