Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

IntelliJ won't recognize the imports!

celbadaoui March 16, 2020

Hello, we are currently using Jira Software Server (version 8.7.1), we have tried running our code in the Script Console on IntelliJ but it seems to have a problem recognizing the imported classes although we made sure to specify the correct directory for it to import them. We are at loss here and we would really appreciate your help! Thanks!

This is the type of error we get while running the code in IntelliJ:

C:\Users\Administrator\IdeaProjects\jira_863239\inline\src\main\java\Test.groovy: 27: unable to resolve class com.atlassian.jira.bc.issue.IssueService
@ line 27, column 1.
import com.atlassian.jira.bc.issue.IssueService;
^

C:\Users\Administrator\IdeaProjects\jira_863239\inline\src\main\java\Test.groovy: 5: unable to resolve class com.atlassian.jira.issue.Issue
@ line 5, column 1.
import com.atlassian.jira.issue.Issue;

Also, for more information:  Scriptrunner version: 5.7.1.1-p5 and JDK 1.8.0_241

1 answer

0 votes
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 17, 2020

Hello @celbadaoui ,

Welcome to the Atlassian Community!

I might not be the best person to help in here, but I notice that the error message says:

unable to resolve class com.atlassian.jira.....

And indeed looking at the documentation those are not classes:

 

Now, can you kindly try to change your imports as below and see if this solves the issue:

import com.atlassian.jira.bc.issue;
import com.atlassian.jira.issue;

 

In case this won't work and further help is needed, you might want to get in touch with the add-on vendor by using the resources listed in the support tab of the markteplace listing for Scriptrunner:

 

I hope this helps.

 

Cheers,
Dario

celbadaoui March 18, 2020

Hello @Dario B , actually i already contacted Scriptrunner and as it turns out that they officially deprecated the IntelliJ IDEA plugin, also known as the Adaptavist Power Editor. That's why it wouldn't work the way we wanted it to. I was wondering if there was any other way to run the script in intelliJ and have the same results that would be displayed in Scriptrunner console?

Kind regards,

Chaimaa

celbadaoui March 18, 2020

Also, to answer your question, replacing those didn't work out unfortunately!

Like Dario B likes this
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 19, 2020

Hi @celbadaoui ,

Thanks for letting me know.

At this point, if the vendor dropped support for this, I am afraid there is not much I can do to help. 

You might want to go try your luck in the developers community but I am not sure you are going any different answer: https://community.developer.atlassian.com/

 

Cheers,
Dario

Suggest an answer

Log in or Sign up to answer