Hello,
In our Summaries, there is an internal number in this format:
AAA-B-CC-DD-EEEE-FFF-XXXX-G
I need to create a custom scripted field that returns the four X's toward the end. I know I need to use a substring to return characters 21-25 of that string. Like this:
substring(21,25)
...Which should show just the XXXX in the custom field.
However, I don't know how to call up the Summary and code that whole thing. Can anyone help me? Thank you!
Well, that was easier than expected. I have figured it out only moments after post, but maybe this will help someone.
issue.summary.substring(21,25)
Hi @Megan,
Could you please share all of the code you used to achieve this?
Or the procedure you used.
That helps me understand how the scripted field has been created.
Thanks,
Allena
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @ramyaallena ,
Sure. I'm using Jira Server with the 8.19.1 version of the software.
The steps to accomplish this were:
issue.summary.substring(#,#)
${issue.getcustomField(com.atlassian.jira.component.ComponentAccessor.getCustomFieldManager().getCustomFieldObject(CUSTOMFIELDNUMBER)).substring(#,#)}
Hopefully that helps.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.