Skip to content

Adds configurable default Service Desk ticket visibility

What does this MR do and why?

Solves Customize Service Desk issue confidentiality (#33091 - closed)

Feature rollout issue: [Feature flag] Enable service_desk_tickets_conf... (#457181 - closed) (rolled out on production environments )

This MR removes the feature flag 🎏 service_desk_ticket_confidentiality and makes the feature "configurable default Service Desk ticket visibility" available by default.

Now Maintainers can configure whether Service Desk tickets should be confidential by default or not. For public projects this setting is disabled and new tickets are always confidential by default. There are two ways to create Service Desk tickets/issues:

  1. Via email using the Service Desk email generated for each project
  2. Via the UI using the /convert_to_ticket quick action (additional case: confidential issues should stay confidential even if the setting is unchecked)

I'll take care of an accessibility issue and improve the documentation in a follow-up MR. See this discussion if you're interested. This MR focusses on removing the flag.

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
image image

Just FYI: This is how the checkbox looks like for other cases:

Public project Private project unchecked
image image

How to set up and validate locally

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

This MR removes the feature flag for the above mentioned feature. If you want to test whether all functionality is available and works without the feature flag, please follow the steps below. Because it's already a long list we ignore the case where the project is public. Here the setting is disabled and all new Service Desk tickets are always confidential by default.

We need to walk through two cases:

  1. Create a Service Desk ticket via email (stubbed)
  2. Create a Service Desk ticket via the UI

Let's go 🏃

  1. If you haven't set up incoming_email or service_desk_email for email ingestion, please add this to your gitlab.yml file in the development: section. Please restart GDK with gdk restart:

    incoming_email:
      enabled: true
      address: "incoming+%{key}@example.com"

    This will allow you to see the Service Desk section in the settings and generate project-specific email addresses. You won't be able to ingest real emails, but we don't need that here.

  2. Select a private project (because tickets are always confidential by default for public projects)

    project = Project.find(5) # Use a PRIVATE project please
  3. Ingest a sample email which will create an issue in the selected project.

    service_desk_address = project.service_desk_incoming_address
    
    email_raw = <<~EMAIL
    To: #{service_desk_address}
    From: user@example.com
    Subject: Confidential SD issue
    
    This should create a new confidential issue.
    Thanks for your review. You are great!
    EMAIL
    
    EmailReceiverWorker.new.perform(email_raw)
  4. Now go to the selected project's issue list and find the newly created confidential Service Desk issue.

  5. Next create a new (not confidential) issue (name etc. doesn't matter) and then add a comment with the following content:

    /convert_to_ticket thanks@for.reviewing.it
  6. After applying the comment you should see a success message and a new internal comment from the support bot. Please reload the page. The issue should now be a Service Desk issue/ticket and confidential.

  7. Now go to the projects' general settings page and expand the Service Desk section. You should see the New tickets are confidential by default checkbox and it should be checked by default. Uncheck it and select Save changes.

  8. Go back to the console and ingest another sample email.

    service_desk_address = project.service_desk_incoming_address
    
    email_raw = <<~EMAIL
    To: #{service_desk_address}
    From: user@example.com
    Subject: Not confidential SD issue
    
    This should create a new not confidential issue.
    Thanks for your review again. You are great!
    EMAIL
    
    EmailReceiverWorker.new.perform(email_raw)
  9. In the issue list, you should see a new Service Desk issue/ticket that is not confidential. 🎉

  10. Now create again a new (not confidential) issue (name etc. doesn't matter) and then add a comment with the following content:

    /convert_to_ticket thanks@for.reviewing.it
  11. After applying the comment you should see a success message and a new internal comment from the support bot. Please reload the page. The issue should now be a Service Desk issue/ticket and not confidential.

  12. Now create a new (confidential!!) issue (by selecting the checkbox in the /new screen or making it confidential in the right sidebar) and then add a comment with the following content:

    /convert_to_ticket thanks@for.reviewing.it
  13. After applying the comment you should see a success message and a new internal comment from the support bot. Please reload the page. The issue should now be a Service Desk issue/ticket and confidential because we don't want to make a confidential issue not confidential (this should only happen on purpose).

  14. You made it to the end 😅 I appreciate your endurance 🏋 You're a rock star 🎸 (if you don't like that music, you can be something else 🎵 ) Thank you! 🙇

Edited by Marc Saleiko

Merge request reports