Auto-generated Summary for Queues in Service Desk
The problem
Were you ever wondering why you queues looks so confusing?
Every user writing their request in their own way?
Not clear from the summary what the ticket is about?
This is the solution!
The solutions
Whole solutions is based on hiding Summary in customer portal and filling the value during Create transitions post-functions.
This example will automatically format the Summary in the way "Reporter Name | Customer Request Type | Custom Field Value"
Used Fields in scripts
issue.get("reporter")?.displayName
Returning the "nice" name of user, who submitted the request
issue.get("customfield_13918")?.name
- Custom Field 13918 is Customer Request Type. With the name parameter, script will return the name of the Request Type
issue.get("customfield_14370")?.get(null)?.value
- Custom Fields 14370 is Single Choice drop down with the major value, provided by requestor from the portal
- This field MUST be mandatory in field configuration or portal field settings!
Step by step
- Hide Summary in Edit Fields configuration in Service Desk Project settings
- As you have to provide some predefined value, use for example "temp_value", as this text will exist for hundredth of second, it doesn't really matter what you will use
- Enter the Workflow configuration
- Select Create transition (that first one with circle at the beginning)
- Select Post Functions
- Click Add Post Function
- Select "Set field value (JMWE add-on)" and configure in following way
- Field: Summary
- Value Type: Constant or Groovy Template
Value:
<%= issue.get("reporter")?.displayName %> | <%= issue.get("customfield_13918")?.name %> | <%= issue.get("customfield_14370")?.get(null)?.value %>
- Leave all other checkboxes unchecked
- Set the post-function order JUST before the re-index an issue step!
- JMWE will warn you, that this should be before Create this issue originally, but trust me. It wont work
Result
Instead of having randomly by user filled Summary
you will got results similar to this one:
Pro Tip
You can use different naming rules by using "Run this post-function only if the following condition is true:"
In my case, I do have different Summary scripts for Debit vs. Credit cards, whose are using different custom field to be put into the Summary.
Conditions are based on checking true|false if the value for Debit, or the value for Credit is present.
This will of course result into two post functions with two conditional executing.