Conversation
c5c66f6 to
4b766c9
Compare
Snapshots the label set per journal so the activity tab renders label changes and baseline comparison loads historic labels. Snapshot rows keep no foreign key to labels so history survives a hard delete. https://community.openproject.org/wp/79963
4b766c9 to
d2db840
Compare
|
Warning Flaky specs
🤖 Ask Copilot to investigateCopy the prompt below into a new comment on this PR to delegate the investigation to GitHub Copilot. It will look into the flakiness and open a separate pull request with you as reviewer. |
|
Note for the admin side of labels (COMMS-1025 / COMMS-1026, PR 2 of the labels stack): deleting a label from Administration → Labels removes its Consequences for this PR's model:
That is acceptable for the first iteration; the epic's journaling wording ("Label {name} removed by {author}") assumes a per-work-package change, and an admin delete is a bulk operation. If a dedicated entry at deletion time turns out to be wanted, the way to do it is a background job iterating the affected work package ids and calling Flagging it here so the two PRs stay consistent; nothing to change in this one. |
|
Follow-up to the note above, after checking the epic text: admin deletion of a label (COMMS-1026, #25394) is allowed while work packages still carry it and cascades to the labelings. The epic only defines work-package-level entries ("Label {name} added / removed by {author}") and is silent on admin deletion, so #25394 ships without journaling it. Decided to handle the journaling side here rather than in the admin PR. Two things this model needs to be able to show a deletion in history: a journal on each affected work package at deletion time (a job with the admin as author and a dedicated cause), and the label name surviving the delete, either as a snapshot column on |
https://community.openproject.org/wp/79963
Each journal now snapshots the work package's label set, so the activity tab renders label changes ("Labels: a, b") and baseline comparison loads the historic set for a timestamp. The snapshot table keeps no foreign key to labels so history survives a hard delete, the same shape versions use. The versions formatter base becomes a generic
JoinedAssociationshared by target versions, observed-in versions and labels. Exposing the historic labels through the API waits for the labels property in the API PR.