I am trying to create Unique ID as the default key generated by Jira is not sufficient for my project.
If my Unique ID is based on two fields:
1) issue.key (the one generated by Jira)
2) Request Type (custom field created by me which has 6 to 7 dropdown values each value is a combination of TEXT and a Code). for example "Deployment Focus Training-DFT" here "Deployment Focus Training" is the text and "DFT" is the code.
so is Issue.key is MEA-15 and Request Type is "Deployment Focus Training-DFT"
My Unique ID should be "DFT-15"
for this I have written the following code in the Automation, but its now working:
{{issue.Request Type.split("-").last.concat(issue.key.split("-").last)}}
Kindly guide what am I doing wrong.
I have tried the below code as well, this also didn't work.
{{issue."Request Type".split("-").last.concat(issue.key.split("-").last)}}
Hi @Jithesh ,
have you tried without the concat function ? If you juste add both values like this it should work :
{{issue.Request Type.requestType.name.split("-").last}}-{{issue.key.split("-").last}}
Let me know if this helps,
--Alexis
The first part is not working: {{issue.Request Type.requestType.name.split("-").last}}
I also tried: {{issue.Request Type.name.split("-").last}}
Request Type is a single choice Custom field I have created. Just FYI
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I just saw that there is a system field with same name "Request Type"
so tried with changing the name of custom field and used the below code and it seems to be working.
{{issue.Training Request Type.value.split("-").last}}-{{issue.key.split("-").last}}
Thanks for guiding me to figure out this solution...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah great, I was wondering if you had actually created a new field with the same name or not.
Glad to know it's fixed, don't hesitate to mark this answer as accepted so that other users can find it later.
Have a nice day !
--Alexis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.