On this page
Use case
Issues can easily be identified by using their issue key. But some use cases also might require some custom IDs, which e.g. contain the current year and a custom number.
We will use project properties to store the current year and a custom number. With the help of the post functions, these two numbers will then be combined as an ID and added to the issue on creation.
This use case can perfectly be done using JWT's post functions in combination with project properties!
Prerequisites
To get this use case working, several post functions are needed to set up the configuration.
Configuration
Writing the ID to the issue
Add the Update or copy field values post function underneath the created post functions.
Target issue
Choose Current issue
Fields
Field
Choose the field you want to set with the ID
Value
Choose Parser expression and enter the following expression in advanced text mode:
projectProperty("currentYear") + "-" + substring("0000", length(projectProperty("counter")), 4) + projectProperty("counter")
Field
In addition, select Temporary number 1 field.
Value
Choose Parser expression and enter the following expression in numeric mode:
toNumber(projectProperty("counter")) + 1
We increase the Temporary number 1 by 1 to increase the counter project property (see below).
Increasing the counter
Add the Set or create JWT project property post function.
Property
Enter:
counter
Value
Enter:
%{issue.temporaryNumber1}
Action
Choose Create the property and assign the value
Screenshots
Related use cases
Use case | JWT feature | Workflow function | Parser functions | Label |
---|---|---|---|---|
Set custom IDs for each issue | ||||
Assign issue to the default user of a role | ||||
Calculate custom sequence numbers |
If you still have questions, feel free to refer to our support team.