Hello,
I am trying to create a calculated field that gives us the number of labels (from a custom label-type field) attached to the very same issue, but I am starting to doubt the possibility of it.
Any ideas of how I could go about it?
Thanks!
I'd use the script-runner add-on to populate the field with issue.getCustomFieldValue(cf).size()
I am using a calculated field to get the number of Labels, but if the value of custom field is null, it throws me an error "Target exception: java.lang.NullPointerException: Attempt to invoke method size on null value"
How do i overcome this error?
My formula:
<!-- @@Formula: ((issue.get("customfield_xxxx").size()).toString()) -->
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was able to manage null values.
Here is the formula:
<!-- @@Formula:
if (issue.get("customfield_xxxx")==null) return null;
return issue.get("customfield_xxxx").size(); -->
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.