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

Jira plugins importer class ExternalProject has a method which returns a null value

com.atlassian.jira.plugins.importer.external.beans.ExternalProject

Using the above Class method called getIssues()- I am trying to access the existing issues in my local jira instance but it returns a null value even if the project has Issues.  What can be the possible issue?

I am getting the following error:

[INFO] [talledLocalContainer] 2020-07-01 03:06:05,752 JiraTaskExectionThread-5 INFO admin 185x22132x1 1lfm2tj 0:0:0:0:0:0:0:1 /secure/admin/ImporterLogsPage%21import.jspa [c.a.j.p.i.i.importer.impl.AbstractDataImporter$1Thread[http-nio-2990-exec-10,5,main]] Only new items will be imported
[INFO] [talledLocalContainer] External ProjectExternalProject{id='null', key='XTP', externalName='project', name='XYZ Test Project'}
[INFO] [talledLocalContainer] exisiting issuesnull
[INFO] [talledLocalContainer] 2020-07-01 03:06:05,757 JiraTaskExectionThread-5 INFO admin 185x22132x1 1lfm2tj 0:0:0:0:0:0:0:1 /secure/admin/ImporterLogsPage%21import.jspa [c.a.j.p.i.i.importer.impl.AbstractDataImporter$1Thread[http-nio-2990-exec-10,5,main]] ------------------------------
[INFO] [talledLocalContainer] 2020-07-01 03:06:05,757 JiraTaskExectionThread-5 INFO admin 185x22132x1 1lfm2tj 0:0:0:0:0:0:0:1 /secure/admin/ImporterLogsPage%21import.jspa [c.a.j.p.i.i.importer.impl.AbstractDataImporter$1Thread[http-nio-2990-exec-10,5,main]] Finished Importing : Issues
[INFO] [talledLocalContainer] 2020-07-01 03:06:06,496 JiraTaskExectionThread-5 INFO admin 185x22132x1 1lfm2tj 0:0:0:0:0:0:0:1 /secure/admin/ImporterLogsPage%21import.jspa [c.a.j.p.i.i.importer.impl.AbstractDataImporter$1Thread[http-nio-2990-exec-10,5,main]] ------------------------------
[INFO] [talledLocalContainer] 2020-07-01 03:06:06,496 JiraTaskExectionThread-5 ERROR admin 185x22132x1 1lfm2tj 0:0:0:0:0:0:0:1 /secure/admin/ImporterLogsPage%21import.jspa [c.a.j.p.i.i.importer.impl.AbstractDataImporter$1Thread[http-nio-2990-exec-10,5,main]] Unexpected failure occurred. Importer will stop immediately. Data may be in an unstable state
[INFO] [talledLocalContainer] java.lang.NullPointerException
[INFO] [talledLocalContainer] at com.tadigital.jira.plugin.TACsvDataBean$2.apply(TACsvDataBean.java:99)
[INFO] [talledLocalContainer] at com.tadigital.jira.plugin.TACsvDataBean$2.apply(TACsvDataBean.java:1)

 

Here is the code snippet of data bean class :

@Override
public Set<ExternalProject> getAllProjects(ImportLogger log) {

final ExternalProject project = new ExternalProject(configBean.getProjectName("project"),
configBean.getProjectKey("project"));
project.setExternalName("project");
return Sets.newHashSet(project);
}

@Override
public Iterator<ExternalIssue> getIssuesIterator(ExternalProject externalProject, ImportLogger importLogger) {
return Iterables.transform(csvClient.getInternalIssues(), new Function<Issue, ExternalIssue>() {
@Override
public ExternalIssue apply(Issue from) {
final ExternalIssue externalIssue = new ExternalIssue();

List<ExternalIssue> getExistingIssues = externalProject.getIssues();

///

 

return externalIssue;
}
}).iterator();
}

1 answer

0 votes
Dario B Atlassian Team Jul 02, 2020

Hello @Aditya Sharma ,

 

Please notice that this is not the best place to get help on development related topics.

In case of no answer in here please refer to the resources listed in: https://developer.atlassian.com/resources. 

Specifically:

 

Cheers,
Dario

Hi @Dario B 

 

I will surely keep that in mind. Actually I am new to Jira and Jira related development. I usually don't approach like this but I was really stuck. Anyway, thanks for the heads up. I will refer to the links you have mentioned.

 

Happy learning!

Thanks and Regards,

Aditya

Like Dario B likes this
Dario B Atlassian Team Jul 03, 2020

You are very welcome @Aditya Sharma . Good luck with your project! :) 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS

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