Hi Community.
Right now I'm using Service Management free plan. I would like to create a custom field with an auto generated value for my issues. The value I want is a series of number combined with the date and the number of issue key.
I want to value would be YYMMXXXX (Y=year, M=month, XXXX=number part of the issue key). For example, today is Oct 2023 and the issue key of the newly created issue will be ABC-5, then the value in the field will be 23100005.
Is it possible to be created? (even with JQL or other programming method)
Thank you.
Hi @Dearka Chan
You can du this with Automation and apply this to your custom field
{{now.format("yyMMdd")}}{{issue.key.split("-").last}}
Here is an example of such rule. Notice I used the Summary field, but you shuld change that to your customfield.
The result will be like this:
I now see that you don't want the day. Simply remove "dd", so it is like this:
{{now.format("yyMM")}}{{issue.key.split("-").last}}
Notice MM must be capitalized.
TimK
Thank you, it really helps a lot. By the way, if I want to recalculate the issue number in the start of every month, can the last part of the value changed from the number part of issue key to the issue number of this month?
For example, the next issue is the 6th issue in this month, can the value be 23100006?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Dearka Chan
I see. Change the rule as shown below.
You will need to find all issues created in this month and then use lookupIssues which will contain those issues. Then you can use the smart value function size to fetch this "counting number". Adjust the smart value formula to this:
{{now.format("yyMM")}}{{lookupIssues.size}}
TimK.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.