Adds ticket confidentiality setting to Service Desk settings page
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). We also added 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.
This MR adds the checkbox New tickets are confidential by default
to the Service Desk section on the global settings page. The checkbox is disabled if the project is public and the value is always set to checked
. For private projects the checkbox is enabled. Depending on the state of the checkbox and project visibility the help text changes accordingly, so users know exactly the consequence of the setting.
Additionally, it adds two headlines to better group settings.
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.
Before
After
For a public project
For a private project
Checkbox checked (default)
Checkbox unchecked
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- If you haven't set up
incoming_email
orservice_desk_email
for email ingestion, please add this to yourgitlab.yml
file in thedevelopment:
section. Please restart GDK withgdk restart
:incoming_email: enabled: true address: "incoming+%{key}@example.com"
- Select a project (where you can change visibility) or create a new one.
- Navigate to the general settings page and expand the
Service Desk
section (e.g.http://127.0.0.1:3000/Commit451/lab-coat/edit
). You should see noTicket visibility
section. - Enable the feature flag for this project and set the visibility to public (you can also check this in a different order depending on the current visibility)
project = Project.find(5) Feature.enable(:service_desk_tickets_confidentiality, project)
- Reload the general settings page and you should see the
Ticket visibility
headline and theNew tickets are confidential by default
checkbox. If the project is public, the checkbox should be disabled and checked with the corresponding help text. - Now change the project visibility to
private
. - Reload the general settings page. The checkbox should be enabled and checked (by default). The corresponding help text should be visible.
- Now deselect the checkbox. The help text should change.
- Open the developer tools and select the network tab.
- Select
Save changes
. - You should see a request to the
/service-desk
endpoint and the payload should containtickets_confidential_by_default: false
. The response should contain the same field with the same value. - If you reload the page the checkbox should remain unchecked.
- If you don't use Service Desk in your project you can just leave the settings and feature flag state as is. Feel free to roll back he changes.