Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable subject editing #17546

Merged
merged 1 commit into from
Jan 8, 2025
Merged

Disable subject editing #17546

merged 1 commit into from
Jan 8, 2025

Conversation

NobodysNightmare
Copy link
Contributor

@NobodysNightmare NobodysNightmare commented Jan 7, 2025

Ticket

This PR covers two tickets:

What are you trying to accomplish?

Block users from changing subjects that were automatically set because of the WP type's configuration.

Screenshots

image

What approach did you choose and why?

Changing the schema response for writable dynamically, based on whether the WP type has a subject pattern defined or not. This is already respected by our own table views and also allows third party clients to recognize that the subject can't be changed.

Admittedly, I was unsure about how "deep" I should define the attribute as non-writable. I've now chosen the WorkpackageSchemaRepresenter, where my other options would have been to do it on the work package schema (probably SpecificWorkPackageSchema, because that one knows the type) or maybe even the create and update contracts.

Merge checklist

  • Added/updated tests
  • Tested Firefox

@NobodysNightmare NobodysNightmare force-pushed the disable-subject-editing branch 3 times, most recently from f254330 to f7f8f06 Compare January 7, 2025 15:28
Automatic subject generation should prevent users from
editing the subject directly. Instead it can only be updated
automatically, when other fields change in that case.
@NobodysNightmare NobodysNightmare force-pushed the disable-subject-editing branch from f7f8f06 to efa3f18 Compare January 8, 2025 08:52
@NobodysNightmare NobodysNightmare requested a review from a team January 8, 2025 08:53
Copy link
Contributor

@mereghost mereghost left a comment

Choose a reason for hiding this comment

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

LGTM. Nice work.

@NobodysNightmare NobodysNightmare merged commit df381fd into dev Jan 8, 2025
11 checks passed
@NobodysNightmare NobodysNightmare deleted the disable-subject-editing branch January 8, 2025 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants