Skip to content

Feature/COMMS-1025: Label contracts, services and query filter - #25401

Merged
akabiru merged 4 commits into
implementation/comms-1025-labels-feature-flagfrom
implementation/comms-1025-labels-services-and-contracts
Sep 17, 2026
Merged

akabiru merged 4 commits into
implementation/comms-1025-labels-feature-flagfrom
implementation/comms-1025-labels-services-and-contracts

Conversation

@akabiru

@akabiru akabiru commented Sep 17, 2026 •

Copy link
Copy Markdown
Member

https://community.openproject.org/wp/COMMS-1025

Adds the non-UI layer the labels administration builds on: contracts and BaseServices services for creating, renaming and deleting labels (work package editors may create, the author is the acting user, renaming and deleting stay with global admins, locked users are rejected), a Queries::Labels::LabelQuery with a name filter, and whitespace normalisation of names.

@akabiru akabiru self-assigned this Sep 17, 2026
@akabiru akabiru changed the title Feature/COMMS-1025: Label contracts, services and query [COMMS-1025]: Label contracts, services and query Sep 17, 2026
@akabiru
akabiru added this pull request to stack #25402 September 17, 2026 05:52
@akabiru akabiru changed the title [COMMS-1025]: Label contracts, services and query Feature/COMMS-1025: Label contracts, services and query Sep 17, 2026
@akabiru akabiru changed the title Feature/COMMS-1025: Label contracts, services and query Feature/COMMS-1025: Label contracts, services and query filter Sep 17, 2026
@github-actions

Copy link
Copy Markdown

Warning

Flaky specs

  • rspec ./spec/features/notifications/navigation_spec.rb[1:1:1]
🤖 Ask Copilot to investigate

Copy 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.

@copilot The following spec(s) are flaky in CI (first seen on PR #25401, linked for reference only):

- `rspec ./spec/features/notifications/navigation_spec.rb[1:1:1]`

Treat this as a standalone task, unrelated to PR #25401. Create a new branch from origin/dev and open a new pull request targeting dev — do not stack it on PR #25401 or reuse that branch.

Follow the playbook in docs/development/testing/handling-flaky-tests/README.md to find the root cause and fix the underlying race — do not skip, delete, or weaken the spec to make it pass; disabling is a last resort per the playbook, and only with a bug ticket. Verify the fix by running the spec(s) repeatedly (e.g. `script/bulk_run_rspec --run-count 10`).

If you cannot reproduce the flake or are not confident in a fix after reasonable investigation, do not fabricate a change or skip the spec to force CI green. Instead, leave the pull request in draft and document what you tried, the suspected cause, and any leads in its description, then assign @akabiru to take over.

Once the fix is verified, title the PR after the spec(s) it fixes, and use the PR description to explain the root cause, how the change resolves it, and the before/after results. Label the PR `flaky-spec`, assign @akabiru, and request a review from @akabiru.
On every commit, set @akabiru as the sole co-author with a `Co-authored-by:` trailer (use their GitHub no-reply email so it links to their account), so it is traceable who dispatched the fix.

@akabiru
akabiru marked this pull request as ready for review September 17, 2026 07:26
@github-actions

Copy link
Copy Markdown

Caution

The provided work package version does not match the core version

Details:

Please make sure that:

  • The work package version OR your pull request target branch is correct

@akabiru
akabiru requested review from a team and brunopagno September 17, 2026 07:27
Admins will manage labels from a dedicated page. The usage count moves
to a correlated subquery so will_paginate keeps a scalar total, and the
name filter only advertises the operators it implements.
Surrounding whitespace is stripped and inner runs collapsed so that
"  Machine   Learning " and "Machine Learning" are the same label,
matching how project names are treated.
The epic grants label creation to anyone who may edit work packages,
while renaming and deleting stay with global admins. Locked users are
rejected on every operation.
@akabiru
akabiru force-pushed the implementation/comms-1025-labels-services-and-contracts branch from fd2e48b to eb573d3 Compare September 17, 2026 07:28
@github-actions

Copy link
Copy Markdown

Warning

Flaky specs

  • rspec ./spec/features/notifications/navigation_spec.rb[1:1:1]
🤖 Ask Copilot to investigate

Copy 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.

@copilot The following spec(s) are flaky in CI (first seen on PR #25401, linked for reference only):

- `rspec ./spec/features/notifications/navigation_spec.rb[1:1:1]`

Treat this as a standalone task, unrelated to PR #25401. Create a new branch from origin/dev and open a new pull request targeting dev — do not stack it on PR #25401 or reuse that branch.

Follow the playbook in docs/development/testing/handling-flaky-tests/README.md to find the root cause and fix the underlying race — do not skip, delete, or weaken the spec to make it pass; disabling is a last resort per the playbook, and only with a bug ticket. Verify the fix by running the spec(s) repeatedly (e.g. `script/bulk_run_rspec --run-count 10`).

If you cannot reproduce the flake or are not confident in a fix after reasonable investigation, do not fabricate a change or skip the spec to force CI green. Instead, leave the pull request in draft and document what you tried, the suspected cause, and any leads in its description, then assign @akabiru to take over.

Once the fix is verified, title the PR after the spec(s) it fixes, and use the PR description to explain the root cause, how the change resolves it, and the before/after results. Label the PR `flaky-spec`, assign @akabiru, and request a review from @akabiru.
On every commit, set @akabiru as the sole co-author with a `Co-authored-by:` trailer (use their GitHub no-reply email so it links to their account), so it is traceable who dispatched the fix.

@brunopagno brunopagno left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, another one 👍

@akabiru
akabiru merged commit fe67c1c into dev Sep 17, 2026
14 checks passed
@akabiru
akabiru deleted the implementation/comms-1025-labels-services-and-contracts branch September 17, 2026 12:26
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants