24 Commits

Author SHA1 Message Date
Klaus Zanders 8830d33e51 Add proper dirty tracking for has_details_table 2026-04-16 18:10:36 +02:00
Klaus Zanders 5339185d0a Add forwarding for boolean predicate methods 2026-04-14 09:58:04 +02:00
Klaus Zanders deb5288836 Generalize HasPrincipalDetails to HasDetailsTable cocnern 2026-03-18 09:02:18 +01:00
Klaus Zanders f3e5a3b397 Implement dup method to also copy over details 2026-03-16 18:04:52 +01:00
Klaus Zanders 4c61f81fd0 Fix has_principal_details for the first usage of the class 2026-03-16 17:16:26 +01:00
Klaus Zanders e12a11c559 Skip using the *Detail class and implicitly define it 2026-03-16 15:42:28 +01:00
Klaus Zanders 31a2536f51 Implement has_principal_details concern and use it for the group 2026-03-16 15:42:27 +01:00
Kabiru Mwenja 8dbac61c57 Add project-scoped configuration API [OP#70979]
Adds `GET /api/v3/projects/:id/configuration` endpoint that returns
all global configuration properties plus project-specific settings.

This allows client apps to check both enterprise token features
(availableFeatures) and project settings (enabledInternalComments)
in a single API call.
2026-01-29 10:32:29 +03:00
Kabiru Mwenja b8fe97296c Set a default hash value in grouped emoji reactions by reactable
Attempt to establish a consistent data structure, where a hash key read always returns a Hash
2025-05-27 14:06:42 +03:00
Kabiru Mwenja 98ce241beb Restructure emoji reactions queries to be independent of the Reactable assoc mixin
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
2025-05-27 14:06:39 +03:00
Kabiru Mwenja 1a66f36577 Use work_package.add_journal method to avoid validity clashes 2025-05-21 17:47:20 +03:00
Kabiru Mwenja 079d8033ff Add unit tests for Reactable.grouped_work_package_journals_emoji_reactions 2025-05-21 17:24:51 +03:00
Kabiru Mwenja 4b874d8494 Use consistent naming for Journal emoji reactions convenience method 2025-05-21 17:02:40 +03:00
Kabiru Mwenja c93e0ec577 Use internal comment scope when quering emoji reactions 2025-05-21 17:00:40 +03:00
Jan Sandbrink 0b87e7543f Freeze string literals in specs
Rolling out frozen string literals further by freezing all
string literals in core specs.
2025-05-05 09:29:55 +02:00
Alexander Brandon Coles 7a5124522c Fix typo in user_format: s/coma/comma/ 2025-02-14 07:27:08 -03:00
Kabiru Mwenja b466fba10c [#59433] Define database model for reminders
https://community.openproject.org/work_packages/59433
2024-11-19 16:31:00 +03:00
Kabiru Mwenja 80cea6e41e chore[Op#40437]: improve var naming; make less generic 2024-10-25 15:08:15 +03:00
Kabiru Mwenja 232df803f5 fix[Op#40437]: remove support for emoji reactions timeslicing
Emoji Reactions should always be returned in their current state, timeslicing will yield incorrect results.
At any given time, we ONLY need to know what reactions a Journal has. Further, EmojiReactions are never updated, rather created
and destroyed.

Retain timeslicing only for the journal render- where that is relevant to find updated journals
2024-10-25 11:55:22 +03:00
Kabiru Mwenja e6aed59bbe fix[Op#40437]: ensure emojis and user reactions are ordered in asc order 2024-10-25 11:48:20 +03:00
Kabiru Mwenja 30b831faa8 chore[Op#40437]: ensure emoji reactions returns empty hash when no reactions 2024-10-25 10:55:08 +03:00
Kabiru Mwenja 65c2aa2a21 chore[Op#40437]: add timestamp spec 2024-10-24 18:19:52 +03:00
Kabiru Mwenja 29f0155d98 feat[Op#40437]: define emoji reactions aggregation in index component
Pass it down the component chain. TODO: reduce allocation bloat by extracting it to a lazy memoized helper
2024-10-24 13:52:06 +03:00
Kabiru Mwenja 9f08b83e7c feat[Op#40437]: Introduce single emoji reactions aggregation query to avoid n+1 calls on journals 2024-10-23 20:12:47 +03:00