https://community.openproject.org/wp/STC-462
Two readability passes over the work package activity tab, no behaviour change. The paginator's private methods are reordered to follow their call order so the file reads top-down from `#call`, and the three activity filter modes (`:all`, `:only_comments`, `:only_changes`) — until now bare symbols duplicated across the controller, paginator, journal components and the hidden form — move into a single `WorkPackages::ActivitiesTab::Filters` module so the modes have one source of truth and can't drift apart. The diff reaches beyond the paginator into the controller, several components and a form, since that's where the symbols were scattered.
The work package activity tab computed a per-journal sequence_version on
every render — a ROW_NUMBER() window function over a LATERAL join — only to
stamp the legacy data-anchor-activity-id that #activity-N deep links rely on.
Nothing mints those links anymore; copy and share links use
#comment-<journal id>, which needs no extra query.
The activity number is now resolved on demand. Only a request carrying
?anchor=activity-N runs the window function, mapping the number to a journal
id the paginator exposes as resolved_anchor. The view hands that to the
client, which rewrites #activity-N to the canonical #comment-<id> and scrolls
using the comment anchor already present in the DOM. Default renders no longer
touch the window function.
References WP #68063.
Implements `:only_comments` and `:only_changes` filters to prevent paginating journals that don't match the active filter, reducing unnecessary HTTP requests during lazy loading.
Use SQL-based heuristic to filter journals with changes at database level
* Include journals with: initial version, attachments, custom fields, file links, cause metadata, or attribute changes
* Compare work_package_journals columns with immediate predecessor to detect data changes _(handles non-sequential journal versions)_
https://community.openproject.org/wp/66552
The activities tab polling mechanism updates newly updated journals, based on the last update timestamp. In case an attachment is added, or the journal is updated in any other places- the UI item would be updated\ on the next poll, overriding the edit form.
This commit adds an exclusion for any forms that are in "edit" state- it does not yet take into account conflict resolution.
https://community.openproject.org/wp/63545https://community.openproject.org/wp/65680
Atm, `Journal` is the only reactable model, so emoji reaction queries were naively performed on the "Journal" static interface. However, should we introduce another Reactable, then this approach falls apart quickly as the methods would be duplicated and practically accessible from any of the Reactables.
Therefore, we extract emoji reactions "grouping" queries into their own encapsulation that makes it agnostic to the reactable- it further adds convenience method parameters allowing either an "reactable:" kw arg or "reactable_type:" and "reactable_id:" pair.
https://community.openproject.org/wp/64167
Follows #18988
* Rename InternalMentionsSanitizer "notes" to "comment" Better represent that the class recieves a "work package comment" and not a "note"
* Fully qualify `InternalCommentMentionsSanitizer` class name
Claim inline attachments that are actually in use- leave any previosly uploaded but unclaimed
attachemnts for clean up (later)- this way we don't clog up storage with unused image files
TODO:
1) Account for associated journals such as attachments, ensure those are restricted
2) Exclude restricted journals from aggregation? (Unclear)
3) Exclude comment-only journals from "snapshots" i.e. making a copy of the current wp state