I am looking to update the description of an issue on a transition with a post function.
The goal is to replace a certain piece of the url with the {{issue.summary.charAt(2)}}
from the original ticket summary.
Example: Insert this into the description with the post function the value of the field set to: www.website.com/{{issue.summary.charAt(5)}}
/issue
The outcome I would expect from a Issue Summary: Test 3 would be www.website.com/3/issue
but the description is updated and does not convert the smart value. sting www.website.com/{{issue.summary.charAt(5)}}
/issue
Any ideas on how to make this execute and fill in the correct number from the summary or other workaround
Hi @FR Jira Dev - Welcome to the Atlassian Community!
What is it actually returning?
Hi John, I actually got it to return correctly with a less than ideal workaround using {{issue.summary.substringBetween("e","s")}} but it makes it so we cannot have spaces in the summary. What I really want is characters at 5,6 but only if they are numerical values of 1-9, ignore spaces.
The issue is when here is a single digit example 5 vs 12 it would return correctly. Is there a way to do this? Right now it is causing an error with a single digit because it returns a digit for char 5 but char 6 is a letter when a single digit.
Example - Size 1 Shirt would return www.website.com/1
/issue
But if it was Size 12 Shirt would return www.website.com/12
/issue
Using the above it has to have a summary of Size1 Shirt and Size12 Shirt is required.
Is there an approach to have spaces and only return digits?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @FR Jira Dev -- Welcome to the Atlassian Community!
What else is in your summary that you are pulling the value from?
Have you considered using a RegEx expression and the Match() function to pull the values out?
Best regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy probably has the best suggestion for this, using RegEx expression.
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.