It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to determine what to import

I'm looking at the following lines:

// Retrieve a specific Issue
EventIssueService.IssueResult issueResult = issueService.getIssue(null, issueKey);
MutableIssue mutableIssue = issueResult.getIssue();

which are from an Atlassian Developer page named "Perform Issue Operations" (https://developer.atlassian.com/server/jira/platform/performing-issue-operations/).

When I paste those lines into the Script Console, there are syntax errors.

On the first line, on the variable issueResult, the error is "unable to resolve class EventIssueService.IssueResult.  My first assumption is that I'm missing an import but I do not know how to determine which import file(s) I'm missing.  If I do a Google search on "EventIssueService", the search isn't specific enough to help.  If I search on "jira EventIssueService", no results are returned.

Is the problem that I'm missing an import and how do I determine which files I'm missing?

ty

1 answer

1 accepted

0 votes
Answer accepted

Hello! 

1) Not 

EventIssueService.IssueResult issueResult = issueService.getIssue(null, issueKey);

But

IssueService.IssueResult issueResult = issueService.getIssue(... 

2) Exact imports can be taken from the documentation https://docs.atlassian.com/software/jira/docs/api/8.4.1 

Search by "issueService" and add in code "import com.atlassian.jira.bc.issue.IssueService" or "import com.atlassian.jira.bc.issue.*"

Снимок экрана 2019-09-18 в 9.16.45.png 

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira

Demo Den Ep. 7: New Jira Cloud Reports

Learn how to use two new reports for next-gen projects in Jira Cloud:  Cumulative flow diagram and Sprint burndown chart. Ivan Teong, Product Manager, Jira Software, demos the Cumulative ...

303 views 1 3
Join discussion

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you