Adds tickets_confidential_by_default to controller and update service
What does this MR do and why?
Contributes to Customize Service Desk issue confidentiality (#33091 - closed)
service_desk_tickets_confidentiality
.
We received feedback that the first action agents perform on a Service Desk ticket is to mark it as non-confidential. We already added the DB field and logic in Select default Service Desk ticket visibility (!150025 - merged). This MR adds the tickets_confidential_by_default field to ServiceDeskController
and ServiceDeskSettings::UpdateService
. It also pushes the feature flag to the frontend on the project settings page.
Planned MRs for this feature
-
✔ Add DB field and logic -
🎯 Add field to API controller - Add field to frontend Service Desk settings
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
I added steps to validate ServiceDeskSettings::UpdateService
locally. If you'd like to have additional steps, please leave a comment.
- Select a project
project = Project.find(7)
- Now enable the setting
ServiceDeskSettings::UpdateService.new(project, User.first, tickets_confidential_by_default: false).execute
- Check whether the setting has been changed. It should be
true
(default), because the feature flag is disabledproject.reset.service_desk_setting.tickets_confidential_by_default
- Now enable the feature flag
Feature.enable(:service_desk_tickets_confidentiality, project)
- Repeat steps 2) and 3). The output should be
false
now. - (Optional) Use this to rollback the changes to your project
ServiceDeskSettings::UpdateService.new(project, User.first, tickets_confidential_by_default: true).execute Feature.disable(:service_desk_tickets_confidentiality, project)