Hi
We have one scripted custome Field with name Total Find. It causing the error when we do any operation on issues. Like creating task, modifying and updating
Error message in logs
2015-10-29 14:37:14,985 http-bio-8443-exec-13 ERROR <JIRAUSER> 877x1208085x1 1wgnvp8 10.90.11.51 /secure/WorkflowUIDispatcher.jspa [onresolve.scriptrunner.customfield.GroovyCustomField] Script field failed on issue: TEST-60, field: Total Find
groovy.lang.MissingPropertyException: No such property: totalFind for class: Script6
at Script6.run(Script6.groovy:14)
Does any one has any clue on it?
Script we are using as follows
import com.atlassian.jira.ComponentManager import com.atlassian.jira.issue.CustomFieldManager ComponentManager componentManager = ComponentManager.getInstance() CustomFieldManager customFieldManager = componentManager.getCustomFieldManager() def issueLinkManager = componentManager.getIssueLinkManager() def totalCollected = 0 if ( issue.issueTypeObject.name == "Task" ){ def OutlinkedIssues = issueLinkManager.getOutwardLinks(issue.id).findAll{it.issueLinkType.name == "Findings"}*.destinationObject totalFind = OutlinkedIssues?.size()?:0 def InlinkedIssues = issueLinkManager.getInwardLinks(issue.id).findAll{it.issueLinkType.name == "Findings"}*.destinationObject totalFind = totalFind + InlinkedIssues?.size()?:0 } return totalFind ? totalFind as Double : null
I think you intended to use the variable totalCollected, as you declared and initialized it before but never used. The code fails because in the return clause, you are doing an if and totalFind might not be even declared.
Maybe you meant to use totalCollected instead of totalFind ?
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.