Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

  1. Hide Summary in Edit Fields configuration in Service Desk Project settings
    1. 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
  2. Enter the Workflow configuration
  3. Select Create transition (that first one with circle at the beginning) 
  4. Select Post Functions
  5. Click Add Post Function
  6. Select "Set field value (JMWE add-on)" and configure in following way
    1. Field: Summary
    2. Value Type: Constant or Groovy Template
    3. Value: 

      Code Block
      languagegroovy
      <%= issue.get("reporter")?.displayName %> | <%= issue.get("customfield_13918")?.name %> | <%= issue.get("customfield_14370")?.get(null)?.value %>

...

    1.  

    2. Leave all other checkboxes unchecked

Result

Instead of having randomly by user filled Summary

Image Added

you will got results similar to this one:

Image Added