Skip to content

Convert to ticket quick action respects default ticket confidentiality

What does this MR do and why?

Contributes to Customize Service Desk issue confidentiality (#33091 - closed)

We recently made the default confidentiality of Service Desk tickets configurable. It's still hidden behind a feature flag 🎏 service_desk_tickets_confidentiality which is enabled on gitlab.com.

Before Service Desk tickets were always confidential by default. Now if you uncheck that setting new Service Desk tickets are not confidential by default.

We have a quick action /convert_to_ticket user@example.com which allows you to convert a regular issue into a Service Desk ticket, which set the ticket to confidential. This MR aims to make this quick action respect the new default confidentiality setting. If the issue is already confidential the ticket should stay confidential.

So in a nutshell this change means the following for the confidentiality of a ticket:

  1. Stays confidential if already confidential
  2. Confidential if project is public
  3. Confidential if setting set (which is the default) and project is private
  4. Not confidential if setting is not set and project is private

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.

🚫 no visual change. Only functional change of existing behavior.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

There are many paths to check depending on the settings in the project and the issue itself. In this validation we'll only focus on the behavior that changed. We have new functionality behind the feature flag service_desk_tickets_confidentiality that allows you to configure the default confidentiality of Service Desk tickets. This has effects on the functionality of the /convert_to_ticket quick action if we want to respect that setting here. The rationale is "confidential issues should stay confidential. Then apply the rules from the new setting".

  1. Configure incoming_email with dummy settings so you can use Service Desk. In gitlab.yml in config/gitlab.yml add under the development key (approx. line 893) the following lines and restart GDK gdk restart.
      incoming_email:
        enabled: true
        address: "incoming+%{key}@example.com"
  2. Enable the feature flag using the console.
    Feature.enable(:service_desk_tickets_confidentiality)
  3. Open the general settings page of a private project and expand the Service Desk section.
  4. The checkbox New tickets are confidential by default should be selected. Uncheck it and select Save changes. This means new Service Desk tickets won't be confidential by default. this only works for non-public projects. Tickets are always confidential for public projects.
  5. Create a new issue (content and title doesn't matter). After creation, add a new comment with the following content, which converts the issue to a Service Desk ticket and adds the email address as the external author.
    / convert_to_ticket user@example.com
  6. You should see a new internal note and a success message. Reload the page so all widgets have fresh data. The ticket should not be confidential! (because you unchecked the setting).
  7. Now create another issue, but make it confidential (either by selecting the checkbox on the /new screen or by using the confidential widget on the right side after creation). Then again add a new comment with the following content:
    / convert_to_ticket user@example.com
  8. You should see a new internal note and a success message. Reload the page so all widgets have fresh data. The ticket should still be confidential! (because it was confidential before).
Edited by Marc Saleiko

Merge request reports

Loading