I have a favorite filter which expressly excludes a lot of extraneous information not needed for the result set, but when I pull issues with the getIssuesFromFilterWithLimit() call, the responses appear to contain the *entire* issue, whereas what I'm looking for is just the fields selected in the filter. I know the result set is large and I'm trying to tune the filter to present just what I need.
Is there a more suitable API? I don't see anything obvious in the JIRA SOAP Service documentation.
Thanks!
Community moderators have prevented the ability to post new answers.
Im not sure you can in SOAP, the limiting in the API call:
Will only limit relates to the number of issues that are pulled, as its a filter, the number could be large.
You can use REST eg the /rest/api/2/search call, with JQL direct.
Thanks for the response Andy.
I'll try and explain myself a little better. I have a filter that I expect to...
The hope was that knowing that I would be retrieving a large volume of issues, I could limit the retrieved issue fields to just what I need since 99% of what's stored in our issues I don't need for this specific purpose.
I used getIssuesFromFilterWithLimit() to retrieve a single issue (maxNumResults == 1) as a test, but the issue I got back had *everything* in it - not just the issue fields specified by the filter.
* - I'm hoping I don't have to filter out the unneeded fields on the client side. I had somehow setup the issue navigator to only display the columns/fields I wanted and I think I led myself to believe that was encoded in the filter, but perhaps its not.
Looks like there is expected to be better ongoing support in the REST APIs. I'll have a look to see if I can find what I'm after there.
If you happen to know of a REST API that could accomplish the above, by all means let me know. The right answer might be to switch from SOAP to REST as you suggest. That's totally OK for me as I've only just started experimenting and don't have anything to "port" yet.
Thanks again.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I looked but only saw queries for which you need to pass JQL, not a filter reference, perhaps I missed something.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey!
This looks very promising!
Query of issues whilst restricting the result's fields
I can just pull the JQL out of the filter and use it directly. I was just using a filter as kind of an indirect way to store a JQL query. I don't *require* being able to access this via a filter necessarily.
However! It looks like with http://example.com:8080/jira/rest/api/2/filter/favourite I can pull the JQL right out of the filter (expand the 200 response) and then supply it to http://example.com:8080/jira/rest/api/2/search supplying the JQL and the specific fields so I don't crush the server.
Hoping to try it out later today maybe (busy day ahead).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just an update...
Tinkered with jira-python and if it is able to support what I want to do, I don't see it yet.
I'm trying to access the REST API directly with urllib2, but I'm sure I'm doing something silly.
So, in short, no real update yet.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OK. Finally put aside an hour to revisit.
Significant headway with the jira-python module.
No doubt in my mind this is *the* way to do it.
I'm still sort of manually prototyping it here, but when I do a 1-sized REST 'search' using the search_issues method with maxResults=1, I get a single result with all the fields. When I additionally pass a field set string with fields='<my fields>', I get precisely those fields back. I can actually index it by incrementing startAt (not that I intend to).
I'm hardcoding JQL right now, but it also looks like I will be able to pull it out of a call to the 'filter/favourite' response with the favourite_filters method.
So I guess the real answer is stop using SOAP and take a REST. Groan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.