Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

Get JIRA issue field in Crucible/Fisheye in Custom Plugin Edited

Hi,

We have a custom add on report in Crucible/Fisheye, Now I want to add one JIRA issue field in it.

So we try to use Atlassian SAL to build commnunication between Crucible/Fisheye and JIRA. But I met error as below:

My code is

ReportResource.java

private CrucibleDataAccessor crucibleData;

public ReportResource(ReviewService reviewService,
ProjectService projectService,
SearchService searchService,
ApplicationLinkService applicationLinkService)
{
this.crucibleData = new CrucibleDataAccessor(reviewService, projectService, searchService, applicationLinkService);
}

 

CrucibleDataAccessor.java

private ReviewService reviewService;
private ProjectService projectService;
private SearchService searchService;
private ApplicationLinkService applicationLinkService;
private ApplicationLink appLink;

public CrucibleDataAccessor(ReviewService reviewService,
ProjectService projectService,
SearchService searchService,
ApplicationLinkService applicationLinkService) {
this.reviewService = reviewService;
this.projectService = projectService;
this.searchService = searchService;
this.applicationLinkService = applicationLinkService;
}

 

public String createRequest(com.atlassian.sal.api.net.Request.MethodType methodType,
java.lang.String url) {

String testResponse= "";
ApplicationLinkRequest request = null;
for(ApplicationLink applicationLink: this.applicationLinkService.getApplicationLinks(JiraApplicationType.class)){
if(applicationLink.getId().get().equalsIgnoreCase("JIRA")){
appLink = applicationLink;
}
}

ApplicationLinkRequestFactory requestFactory = appLink.createAuthenticatedRequestFactory();

try {
request = requestFactory.createRequest(Request.MethodType.GET,
"https://jira-dev.XXXXXX.cc/rest/reports/latest/reviewfindings?header=true&project=ITS&startDate=08/01/2017&endDate=08/11/2017");
testResponse = request.execute();

} catch (ResponseException e) {
e.printStackTrace();
} catch (CredentialsRequiredException e) {
e.printStackTrace();
}
return testResponse;
}

 

After atlas-run, I get jar file and upload to Crucible/Fisheye, when I try to run the URL to generate report https://fisheye-dev.XXXXXX.cc/rest/reports/latest/reviewfindings?header=true&showtext=true&showkey=true&showname=true&project=DEVOPS-CR&startDate=08/01/2017&endDate=08/31/2017.

In webpage it show error message

The requested resource cannot be found.

Not Found

 

In log, it show below error 

2017-09-13 05:09:08,059 ERROR [qtp502848122-185622 ] com.atlassian.plugin.servlet.DefaultServletModuleManager DefaultServletModuleManager-getInstance - Unable to create new reference LazyLoadedFilterReference{descriptor=com.XXXX.fecru.plugins.XXXXXX-reporting:XXXXXXXXReportsRest-filter (Provides XXXXXXX Reports services.), filterConfig=com.atlassian.plugin.servlet.filter.PluginFilterConfig@439b2acc}
com.atlassian.util.concurrent.LazyReference$InitializationException: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.XXXXXXX.fecru.plugins.ReportResource': Unsatisfied dependency expressed through constructor argument with index 3 of type [com.atlassian.applinks.api.ApplicationLinkService]: No qualifying bean of type [com.atlassian.applinks.api.ApplicationLinkService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.atlassian.applinks.api.ApplicationLinkService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:149) [atlassian-util-concurrent-3.0.0.jar:?]
at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:112) [atlassian-util-concurrent-3.0.0.jar:?]
at com.atlassian.plugin.servlet.DefaultServletModuleManager.getInstance(DefaultServletModuleManager.java:447) [atlassian-plugins-servlet-4.4.0.jar:?]

 

Could you help to give some suggestion about it or please suggest how to use SAL to build connection between Crucible and JIRA.

 

Thanks, Neo

1 answer

0 votes

Did you import the ApplicationLinkService component?

src/main/resources/atlassian-plugin.xml

<component-import key="applicationLinkService">
<interface>com.atlassian.applinks.api.ApplicationLinkService</interface>
</component-import>

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket Pipelines

Bitbucket Pipelines Runners is now in open beta

We are excited to announce the open beta program for self-hosted runners. Bitbucket Pipelines Runners is available to everyone. Please try it and let us know your feedback. If you have any issue...

373 views 8 8
Read article

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