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"
Configuration
Setting the project property
Setting a project property can be done from project settings → Details
Give it a proper Name*, Key*, and Project type*
Set the Description with a valid expression, in this example we used the following expression: {sequenceNumber=0}
Adding multiple fields
When executing the transition, the current value of "sequenceNumber" is stored in an ephemeral field with the Read a project property post function.
Ephemeral fields are temporary fields that can be used within a transition, e.g. to cache temporary values. They're cleared when the transition is completed, unless a Inhibit ephemeral fields auto-clearance post function is added to the transition.
Increment the "sequenceNumber" by 1 by using the following formula:
{00058} + 1
Format the "sequenceNumber" by using the Update fields post function. The setting rules are:
[length(%{00058}) = 1]00%{00058}
[length(%{00058}) = 2]0%{00058}
[true]%{00058}
Compose the "Approval Code" with the Update fields post function.
Use the following expression in advanced mode:
%{00061} + "/" + %{10420} + "/" + toUpperCase(substring(%{10421}, 0, 3))
In Target Issues select Current issue for Issue Selection Mode.
Finally add the Set or create project property post function, to keep the "sequenceNumber" in sync.
Set the Property Name to sequenceNumber
Set the Value to be written to %{00058}
Check the option Create the property and assign the value option.
Once configured, the transition will look like this:
If you still have questions, feel free to refer to our support team.