Hi I'm a jira user, trying to get the count of number of items(strings) entered in a custom field in the issue. Each item or string is delimited by ";" So if i can get the number of ";", then just need to add 1 to get the total number of items. Is this possible in Jira? Any other solution to get the number of items also would be fine.
I am using Jira v8.5.3 and have the scriptrunner plugin. Installing any other plugin will not be possible (coz it will take ages for request to even go up the ranks to the people controlling the purse strings, before they decide whether they want to spend money on it or not)
Hi @Rob Mat
I have a question, where do you want that count? I mean, do you want to save it on another field or do you need it on a postfunction ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok.
You need to create a scripted field.
https://scriptrunner.adaptavist.com/5.0.4/jira/scripted-fields.html
After you create the scripted field,
let's say you save the value of your custom field in "test"
String[] testArray = test.split(";")
return testArray.size()
That way you can get the total number of items .
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.