Hello there,
I'm quite new to Jira postfunctions.
I'd like to do nothing in an if condition if the linked issue if of type Bug(Customer) and the linked issue status is new. I have the below code:
linkManager.getLinkCollectionOverrideSecurity(issue).getAllIssues().each { linkIssue->
if (issue.getProjectId() == linkIssue.getProjectId() && linkIssue.issueType.name == 'Task') {
releaseName = linkIssue.getCustomFieldValue(releaseNameField)?.toString()
} else if ((linkIssue.issueType.name == 'Bug (Customer)') && (linkIssue.getStatusId().equals("1")) ) {
log.warn("Doing nothing here")
log.warn ("The link issue status is" + linkIssue.getStatusId())
} else {
linkedIssues.add(linkIssue)
}
}
However, nothing happens. I think the problem is with "linkIssue.getStatusId().equals("1"))
One more question. When I use log.warn messages, where do they show up? In the console? Or somewhere else?
Thanks for all your help
Which app are you using? ScriptRunner ? JMWE ?
Thanks David for the quick reply :)
I'm using a ScriptRunner post-function.
I found this online:
def destIssue = link.getSourceObject();
if(!destIssue.getStatusId().equals("10000")){ //Ex Status id of DONE
passesCondition = false;
But was hoping to get it done in one step.
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.