Skip to content

Draft: Tickets as work items?

Sarah Yasonik requested to merge sy-service-desk-work-items into master

What does this MR do and why?

I accidentally put together the spike for #412055 (closed) while monkeying around with some other service desk stuff.

So what's this diff got going on?

  1. Adds a Request Work Item type with all of the exact same modules as the default issue, opting to render the Request type like an issue (like an incident)
  2. Customizes the created at header with the Work Item Type, but just defaults to the standard issue icon since the new ticket icon isn't available yet
  3. Allows Reporter+ to create Request work items via GraphQL API (using either issues or work items mutations/queries).
    • Alternative: Error when attempting to create Request items via API
    • Alternative: Allow Guest+ instead of Reporter+
    • Alternative: Allow anonymous API calls, but require an email address in the body, then create issue as Support Bot
    • Alternative: Allow project maintainers to configure a project token to use with their Service Desk and restrict API calls to only that token
  4. Swaps Service Desk view to include only Request type work items + ignores author
  5. Creates all incoming Service Desk emails as Requests

Notable exclusions

  1. Any tests
  2. Migration to change the type on issues created by Support Bot
  3. Verification of whether devopsplan is cool with adding a new work item type that also primarily inherits from issues rather than using the new UI exclusively

Related issue: Spike: Implement Service Desk Ticket using Work... (#412055 - closed)

Screenshots or screen recordings

Request via email Request via API Work item view
Screenshot_2023-05-19_at_5.15.11_PM Screenshot_2023-05-19_at_5.29.22_PM Screenshot_2023-05-19_at_5.41.02_PM

How to set up and validate locally

  1. Set up mailroom & service desk
  2. In rails console, run:
    Gitlab::DatabaseImporters::WorkItems::BaseTypeImporter.upsert_types
    Issue.where(author: User.support_bot).update_all(issue_type: WorkItems::Type::BASE_TYPES[:request])
  3. Send an email to the incoming address you configured or create a work item via API Screenshot_2023-05-19_at_5.25.50_PM
Edited by Sarah Yasonik

Merge request reports