Misc Custom field script issue

Hi team,

We are using Misc custom field generated calculated text field in on eof our project in JIRA.

We are using a script in its its Description, script is as below:

<!-- @@Formula:

import com.atlassian.jira.ComponentManager;
import com.atlassian.jira.issue.link.IssueLink;
import com.atlassian.jira.issue.link.DefaultIssueLinkManager;
import com.atlassian.jira.issue.link.IssueLinkManager;
import com.atlassian.jira.issue.IssueConstant;
import com.atlassian.jira.issue.IssueType;
import com.atlassian.jira.issue.Issue;
import java.util.concurrent.TimeUnit;


String getTotalRemaining(uniqueIssues) {

//Long totalOriginalEsitmate = new Long(0);
Long totalRemainingEsitmate = new Long(0);

for (Issue myIssue : uniqueIssues)
{

if (myIssue.getEstimate() != null)
{
totalRemainingEsitmate = totalRemainingEsitmate + myIssue.getEstimate();
}

}

// uses calculateTime method from TotalEsitmated script
return calculateTime(totalRemainingEsitmate);


}

// uses getUniqueIssues method from TotalEstimated script
getTotalRemaining(getUniqueIssues(issueObject.getId(),issue.get("issuelinks")));
-->

 


There is some issue with the script as when we run the re-index, its showing below issue:

2016-05-26 10:01:13,710 NodeReindexServiceThread:thread-1 ERROR [innovalog.jmcf.fields.CalculatedTextField] CalculatedTextField: error evaluating formula of field "Total Remaining" of issue NEOWMA-9351:
Sourced file: inline evaluation of: `` import com.atlassian.jira.ComponentManager; import com.atlassian.jira.issue. . . . '' : Command not found: getUniqueIssues( java.lang.Long, java.util.ArrayList ) : at Line: 35 : in file: inline evaluation of: `` import com.atlassian.jira.ComponentManager

 

Can you please let me know the issue here? also the impact of it on JIRA

1 answer

This widget could not be displayed.

You haven't defined getUniqueIssues anywhere.  Do you think it's a function somewhere?  Or were you aiming to write it in your script?

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

165 views 2 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you