It's not the same without you
Join the community to find out what other Atlassian users are discussing, debating and creating.
We have found this issue during indexing. It points to a custom field that uses the Groovy Runner. The field is scripted as follows
def templateType = getCustomFieldValue("Template Type").value;
def multiplier = (templateType == "NEQL"
? 500
: (templateType == "N+"
? 100
: 0));
def estimate = multiplier * issue.getOriginalEstimate() / 3600;
return String.format( '%,d', estimate as int);
This is the error generated by the reindex process. Any pointers?
2015-07-22 12:55:23,775 JiraTaskExectionThread-1 INFO chapmar 775x103x1 mmgxax 127.0.0.1 /secure/admin/IndexReIndex.jspa [jira.util.index.CompositeIndexLifecycleManager] Reindex All starting...
2015-07-22 12:55:23,823 JiraTaskExectionThread-1 INFO chapmar 775x103x1 mmgxax 127.0.0.1 /secure/admin/IndexReIndex.jspa [action.admin.index.IndexAdminImpl] Re-indexing is 0% complete. Current index: Issue
2015-07-22 12:55:23,871 JiraTaskExectionThread-1 INFO chapmar 775x103x1 mmgxax 127.0.0.1 /secure/admin/IndexReIndex.jspa [jira.issue.index.DefaultIndexManager] Reindexing: {indexIssues=true, indexChangeHistory=true, indexComments=true, indexWorklogs=true}
2015-07-22 12:55:49,759 IssueIndexer:thread-2 INFO chapmar 775x103x1 mmgxax 127.0.0.1 /secure/admin/IndexReIndex.jspa [action.admin.index.IndexAdminImpl] Re-indexing is 1% complete. Current index: Issue
2015-07-22 12:55:52,690 IssueIndexer:thread-8 ERROR chapmar 775x103x1 mmgxax 127.0.0.1 /secure/admin/IndexReIndex.jspa [onresolve.scriptrunner.customfield.GroovyCustomField] *************************************************************************************
2015-07-22 12:55:52,694 IssueIndexer:thread-8 ERROR chapmar 775x103x1 mmgxax 127.0.0.1 /secure/admin/IndexReIndex.jspa [onresolve.scriptrunner.customfield.GroovyCustomField] Script field failed on issue: UDR-15, field: Estimated Cost
groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.lang.Integer#multiply.
Cannot resolve which method to invoke for [null] due to overlapping prototypes between:
[class java.lang.Character]
[class java.lang.Number]
at Script2.run(Script2.groovy:8)
.....
2015-07-22 13:31:55,467 IssueIndexer:thread-10 INFO chapmar 775x103x1 mmgxax 127.0.0.1 /secure/admin/IndexReIndex.jspa [action.admin.index.IndexAdminImpl] Re-indexing is 98% complete. Current index: Issue
Regards,
Roy
I'd change line 8 (approx) to:
def estimate = multiplier * (issue.getOriginalEstimate() ?: 0 ) / 3600
Your problem is the overloaded operator "*" can be applied to either Characters, Numbers or Strings etc, so if issue.originalEstimate is null groovy doesn't know which to pick.
The pitfalls of dynamic typing...
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.
Read moreIn this post you will discover more about the evolution of K15t software, some big topics they're currently focusing on in the app space, and a rare (not not funny!) photo of founders Mike Cannon-Bro...
Connect with like-minded Atlassian users at free events near you!
Find a groupConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.
Start an AUGYou're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.