How to use Request types in Workflow Conditions

Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.

Summary

When you want to make certain transitions available for only certain Request types, you can use the Workflow Conditions feature to do so. However, the default STRING comparison does not work for Request type names. 

Watch and follow the related bug here: JSDCLOUD-5701 - Condition does not work when comparing Request Type to a string

Solution

Find the request type keys

Use a current issue to find the  issue ID

  1. Navigate to an existing issue on the project.
  2. Choose the Action menu () in the top right corner and choose Export to XML
  3. Use the browser search function to find the value for key id. In my example this value is 10350

Jira Issue in XML format-example

Use the key ID to find the request type keys

  1. Update the following URL with your domain and the ID you gathered in the previous step:
    1. https://YOUR-DOMAIN.atlassian.net/rest/servicedesk/1/servicedesk/request/KEY-ID/request-types
  2. Load this URL in a browser window
  3. Find the request type you are looking for in this output and note down the following two values: portalKey and key
  4. In the example below I see that the Fix an Account problem Request type has the PortalKey jst and the request type key is accountproblem
  5. Similarly, the Get a guest wifi account Request type has the PortalKey jst and the key is guestwifi

  • The key is not always human-readable. Sometimes you will find a randomly generated string, such as 57f26069-ecc5-4328-9071-befd05758fb6
  • The request types returned by this endpoint are those that are associated with the issue type of the request. If the request type you are searching for is not present, confirm that the chosen request's issue type is associated with that request type

Configure the Workflow conditions

  1. Navigate to the Workflow transition where you want to use this condition.
  2. Add a condition with the following parameters:

Field: Request Type

Condition: =

Value: PortalKey/key

Comparison Type: Option ID


Make sure you publish the workflow after this modification.

The new transitions should be available now on my JST project, for issues with Fix an Account problem Request types.

JSDCLOUD-4917 - The REST API endpoint /rest/servicedeskapi/servicedesk/{serviceDeskId}/requesttype should include the request-type Key in the response


Last modified on Jan 22, 2025

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.