I am using the Misc Custom Fields add-on and I want to access the name property of a project component. How do I get to the name?
<!-- @@Formula:
issue.get("components").iterator().next();
-->
First of all, you should protect your formula against the case when there is no components:
if (issue.get("components")==null || issue.get("components").isEmpty()) return null;
And then to return the component name:
return issue.get("components").iterator().next().getName();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.