On this page
Use case
In this example, a custom identifier "Approval Code" is added to issues by using a project property and different custom fields.
The code that will be created is a combination of a specific number (sequence number), the fiscal year (custom field), and the abbreviation of a department.
Configuration items needed:
- Project property "sequenceNumber"
- Custom Text Field "Department"
- Custom Text Field "Fiscal Year"
- Custom Text Field "Approval Code"
The final approval code might look something like this:2021/DEV/023
Prerequisites
In order to make this use case working, the project property sequenceNumber has to be set initially.
Configuration
Set the approval code
Add the Update or copy field values post function to the desired transition or create a new transition.
Target issue
Choose Current issue
Fields
Field
Select the field you want to write the approval code to.
Value
Choose Set field value manually
Expression
Add the following expression with mode set to Advanced text:
%{issue.cfaaaaa} + "/" + toUpperCase(substring(%{issue.cfbbbbb}, 0, 3)) + "/" + substring("000", length(projectProperty("sequenceNumber")), 3) + projectProperty("sequenceNumber")
The final approval code might look something like this:
2021/DEV/023
Field
In addition, select the Temporary number 1 field.
Value
Choose Set field value manually
Expression
Enter the following expression:
toNumber(projectProperty("sequenceNumber")) + 1
Update the "sequenceNumber" project property
Add the Set or create JWT project property underneath the previous post function.
Mode
Choose Create the property and assign the value
Property key
Enter
sequenceNumber
Property value
Enter
%{issue.temporaryNumber1}
Screenshots
Related use cases
Use case JWT feature Workflow function Parser functions Label Assign issue to the default user of a role Calculate custom sequence numbers Set custom IDs for each issue
If you still have questions, feel free to refer to our support team.