Skip to content

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)

This feature is hidden behind the feature flag 🎏 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

  1. Add DB field and logic
  2. 🎯 Add field to API controller
  3. 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.

🚫 backend only

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.

  1. Select a project
    project = Project.find(7)
  2. Now enable the setting
    ServiceDeskSettings::UpdateService.new(project, User.first, tickets_confidential_by_default: false).execute
  3. Check whether the setting has been changed. It should be true (default), because the feature flag is disabled
    project.reset.service_desk_setting.tickets_confidential_by_default
  4. Now enable the feature flag
    Feature.enable(:service_desk_tickets_confidentiality, project)
  5. Repeat steps 2) and 3). The output should be false now.
  6. (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)
Edited by Marc Saleiko

Merge request reports