Jira Automation - Auto Increment counter and assign issue field value when a new Issue is created
プラットフォームについて: Cloud のみ - この記事は クラウド プラットフォームのアトラシアン製品に適用されます。
要約
This documentation explains how we can use Jira Automation to maintain a counter in the Project and Automatically Increment it when a new issue is created and assign this count as the Issue Field Value.
We are going to use the Project Entity Property. Also, we are going to set the initial project counter as 10000 (This can be changed as per requirement).
ソリューション
1- Create a new Rule with 'Issue Created' as the Trigger
2. Add an If-Else Condition Block. Under the If section, add an Advanced Comparision Condition
We can use the smart variable {{project.properties.sequence}} to check if the current value is < 10000.
If {{project.properties.sequence}} is < 10000, we are going to Set the 'Project' Entity property 'sequence' to 10000.
3. In the Else section, increment the 'Project' Entity property 'sequence' using the smart variable
4. Use the Edit Issue Action and set the Issue custom Field current_count value using the smart value {{project.properties.sequence}} of the 'Project' Entity property 'sequence'.