Hi guys,
can you please help me how to get the issue status in the <! @@Formula ?
When I use
issue.get("status").toString();
I get something like COM.ATLASSIAN.JIRA.ISSUE.STATUS.STATUSIMPL ...
While I was expectiong to get "Closed" or "Open". I also failed with syntax from JIRA dev documentation
issue.getStatusObject().getSimpleStatus().getName()
Many thanks,
Jarda
P.S.: is there any way how to debug the formula? In case it fails to compile I get the custom field empty which gives me no hint on what's wrong. Any log would help? Thank you
Hi,
as stated in the documentation (as of... now), you should look inside atlassian-jira.log for errors (look at the end of the file right after displaying the issue).
In your case, you want to use:
issue.get("status").getName();
See https://innovalog.atlassian.net/wiki/x/BYAbAg for details.
Hi, I've tried to find outwardlinks where status is not closed:
&& ! issueLink.getDestinationObject().get("status").getName().equals("Closed")
where issuelink is an outwardLink.
Could you help me please, how to deal with it?
Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is the whole code, if it helps:
<!-- @@Formula: import com.atlassian.jira.component.ComponentAccessor; import org.apache.commons.lang.StringUtils; DefectKeys = new ArrayList(); outwardLinks = ComponentAccessor.getIssueLinkManager().getOutwardLinks(issue.getIssueObject().getId()); for (issueLink : outwardLinks.iterator()) { if (issueLink.getIssueLinkType().getOutward().equals("is Parent of") && ! issueLink.getDestinationObject().getStatus().getName().equals("Closed") ) { DefectKeys.add(issueLink.getDestinationObject().getKey()); } } if (DefectKeys.isEmpty()) return "Empty"; StringUtils.join(DefectKeys, ","); -->
Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you look inside atlassian-jira.log for errors?
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.