feat(issues): Record escalate/unresolve transitions in the action log#117852
Open
yuvmen wants to merge 2 commits into
Open
feat(issues): Record escalate/unresolve transitions in the action log#117852yuvmen wants to merge 2 commits into
yuvmen wants to merge 2 commits into
Conversation
manage_issue_states transitions group status via direct .update (bypassing update_group_status), so the escalating and ongoing transitions were never recorded in the action log. Publish a system-sourced action mirroring the Activity each branch already writes: EscalatingAction for SET_ESCALATING, UnresolveAction for SET_UNRESOLVED. Adds GroupActionType.ESCALATING + EscalatingAction. Named for the state the system observed (the group is escalating), not an actor "escalate" action — nobody performs it; it's a recorded fact mirroring Activity's SET_ESCALATING. Part of ID-1631
f533823 to
3f04f74
Compare
detect_new_escalation escalates groups from any status via a direct group.update bypassing update_group_status, with its own SET_ESCALATING Activity. Publish the matching EscalatingAction (source=system), same as the manage_issue_states ESCALATING branch. Part of ID-1631
kcons
reviewed
Jun 16, 2026
| Activity.objects.create_group_activity( | ||
| group=group, type=ActivityType.SET_ESCALATING, data=data | ||
| ) | ||
| publish_action( |
Member
There was a problem hiding this comment.
We expect these to be unnecessary and potentially duplicative when Charles's stuff is ready, right? Should we wait?
Member
Author
There was a problem hiding this comment.
yea they are for sure, though I am not sure where it stands and I thought in the mean time I can mark the points of integration where we should take notice for him. But yes we should coordinate you are right.
These are just gaps I am finding that I want to make sure we correclty add source/actor to
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Several automated/system paths transition group status via direct
Group.objects...update(status=...)(bypassingupdate_group_status), so the transitions were never recorded in the action log. This publishes a system-sourced action at each site, mirroring 1:1 theActivityit already writes:manage_issue_statesESCALATING (SET_ESCALATING) →EscalatingActionmanage_issue_statesONGOING (SET_UNRESOLVED) →UnresolveActionpost_processdetect_new_escalation(SET_ESCALATING) →EscalatingActionAdds
GroupActionType.ESCALATING+EscalatingAction. It's named for the state the system observed (the group is escalating), not an actor "escalate" action — nobody performs it; it's a recorded fact mirroring Activity'sSET_ESCALATING. (ONGOING/UNIGNOREDboth collapse toSET_UNRESOLVEDin Activity, so both map toUnresolveAction; the dead UNIGNORED branch is left alone.)All callers are system/automated, so
source=SYSTEM. Usespublish_actiondirectly (noaction_context_scope) since the values are known and no deep context-reading primitive is in the path.Regression transitions (
SET_REGRESSION, inevent_manager+status_change_consumer) are a separate, larger piece — tracked under its own ticket.Test
TestManageIssueStatesActionLog(escalating/unresolve) +DetectNewEscalationTestMixin.test_has_escalated(post_process escalation), asserting the matching action attributed tosystem.Part of ID-1631