I am trying to read the standard Labels field to see if it is null. If the Label field is null I want to return a message saying that the "Client ID is required". I searched and tried many approaches but still no luck. Any suggestions would be greatly appreciated.
<!-- @@Formula:
import com.atlassian.jira.issue.label.Label;
if (label.getLabel() == null {
return "<b><font color=red>This change cannot be approved until a planned date is specified</b></font>";
}
-->
Try:
<!-- @@Formula:
if (issue.get("labels") == null || issue.get("labels").size() == 0) {
return "<b><font color=red>This change cannot be approved until a planned date is specified</b></font>";
}
-->
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.