Integration Of Greenhopper with Jira soap Service to retrieve Rank for the Issues or for projects at programmtic level

I am trying to Use Greenhopper JiraUtil and RankService , RankIndex classes to retrieve the rank.But i am getting "RemoteIssue" object from JiraSoapService.How to convert the RemoteIssue object to Jira Issue object(com.atlassian.jira.issue ).

How to configure Greenhopper in Jira using SoapService.

We have Jira4.4.5 api jar.But we are not able to locate the following classes.

Ex: com.atlassian.jira.web.action.greenhopper.SetupGreenHopper

com.atlassian.jira.issue.managers.DefaultIssueManager

com.atlassian.jira.bc.issue.DefaultIssueService

Appreciate your help in this regard.

I am trying to do it programmatically using greenhopper5.8.jar and Jira-api4.4.5.jar.

5 answers

0 votes

I'm not clear on what you are doing here, sorry.

SOAP is a service that exposes *some* Jira stuff to external systems, so I don't understand why you are messing around with greenhopper and Jira api jar files. They're not going to do anything unless you're coding inside Jira (i.e. not using SOAP).

Could you explain the end goal (e.g. "my external system needs to read the ranking field for a range of issues")?

Also, I should mention that SOAP is deprecated, and it's worth looking at REST instead.

We have our own customized Jira Application.We are using JiraSoapService to manage issues.I want to display the Rank as shown below in my application.In the tabel below.Now we have started using REST service.We want to retrieve the Rank stored in Greenhopper database for that particular issue and show it on our application.

I'm not 100% sure what you're asking here. The Rank field is just another JIRA custom field, it can be queried for an issue using the REST interface in the same way as another field.

For example, here's the output of listing the custom fields using /rest/api/2/field from jira.atlassian.com:

[
   ...
   {
      "id":"customfield_11431",
      "name":"Rank",
      "custom":true,
      "orderable":true,
      "navigable":true,
      "searchable":true,
      "schema":{
         "type":"array",
         "items":"string",
         "custom":"com.pyxis.greenhopper.jira:gh-global-rank",
         "customId":11431
      }
   },
   ...
]

You can then just query that field for an issue, here's an example of using with the /rest/api/2/issue interface on issue GHS-5000 from jira.atlassian.com:

{
   "expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog",
   "id":"180088",
   "self":"https://jira.atlassian.com/rest/api/2/issue/180088",
   "key":"GHS-5000",
   "fields":{
      "description":"Error with dialog being undefined.",
      "customfield_11431":"128147"
   }
}

The 128147 is the global rank of the issue.

Hope that helps,
Shaun

Thanks for your help.Please let us know how to authenticate the REST uri.How to pass username and password to get a particular issue.

ex: "https://host:port/jira/rest/api/latest/user/"+"username";

Please check out the documentation for information on authenticating.

The very simplest approach is to use os_username and os_password query parameters in your URL.

Thanks,
Shaun

How can edit this rank relative to other issues?

See the answers above really.

I have an interface wherein a list of issues with their relative ranks are shown, and I want to add the functionality of moving an issue over another and on backend the relative ranks should change..

You'll need to query Jira for the ranks of the issues, work out the new values and post them back.

Thanks for ur help.I am able to retrieve the rank.

I am trying to pass jql to get the details for all issues for one project in single http request.is it possible?

I am getting only jira numbers but not all details.Please let me know how to retrieve all detais for multiple issues at one time.

Please consult the documentation, this is well covered.

To run a search use the /rest/api/2/search endpoint. Use the "fields" query parameter to specify which fields should be returned. Use the "expand" query parameter to specify which fields should be expanded.

You cannot normally get all results at once, the default is a maximum of 200 results for each query. Use the "startAt" and "maxResults" query parameters to get further results.

Thanks,
Shaun

i have gone through the documentation.

Currently we are using 4.4.5 Jira api.

I am trying retrieve fields for all issues under project test with priority "urgent".It just returns the self(Url for issue link) and the issue id.As per the documentation we need to use "fields" and expand query parameters to get the required fields.

But the URI is not giving any error,result.

As per the documentation only Jira 5.0 and above will support these parameters.Otherwise we need to fetch issue details in separate http requests which is very costly and slow in the application.

Please confirm that 4.4.5 doesnt provide any facility to get the details for multiple issues in one single request.

Thanks ,

Hema

I can't confirm that one way or another. The documentation seems to show that there is no way to do this. If you'd like to confirm I'd recommend that you download the JIRA source code and check it out. The JIRA source is available to all commerical licensees (i.e not $10 starter licenses) via their https://my.atlassian.com login.

Thanks,
Shaun

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Featured Groups

Tuesday tips & tricks: What is the Atlassian Community?

It's officially Tuesday, which means it's officially time for another tip to help you better navigate this space we call the Atlassian Community. 😄 I got a great question from community member, Sa...

127 views 6 8
View post

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