You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
There is no REST resource that returns ONLY the count, but you can use /rest/api/2/search?jql=YOUR_JQL_QUERY and then look at the result object. It will contain an attribute "total" which is the count you want.
Straight from the api doc:
{ "expand": "names,schema", "startAt": 0, "maxResults": 50, "total": 1, // <- you want this value "issues": [ { "expand": "", "id": "10001", "self": "http://www.example.com/jira/rest/api/2/issue/10001", "key": "HSP-1" } ] }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Setting "maxResults=0" only returns the metadata without the rows if you're only interested in the total:
rest/api/2/search?jql=project=YOUR_PROJECT&maxResults=0
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.
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.
Save the filter and look at it - most of the ways of viewing a filter will give you totals.
Note that JQL is NOT SQL, and it doesn't have anything to say about the results it pulls back. All it does is give other parts ofthe system list of issues to work with.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Nic.
Would you suggest an alternate way to get only count via any REST API method?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Run the filter and then write some code that adds up the totals in whatever application is you've written the REST code into
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well you can could just do a normal JQL query
issuetype = 'Test' and TestRunStatus = "pass" and assignee = <UserName>
Then tools will give a count for the query
A bit of a bodge but does tell you what you need to know
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you want to get issue count output you can setup query using generate api
for example if you want project base issue count then you can apply this rest api for that
URL :- "/rest/gadget/1.0/stats/generate.json?projectOrFilterId=jql-ORDER+BY+created+DESC&statType=project&includeResolvedIssues=true&sortDirection=desc&sortBy=total"
Hear in "projectOrFilterId" you can set your jql query and "statType" as like a groupBy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I need to count of tickets for each project. I tried above mentioned API but it's returning me error
Invalid JQL query specified for chart \'ORDER+BY+created+DESC\'
I tried with another API wherein projectOrFilterId=jsql-create+>+created and I got same issue again.
API works if I give a hardcoded project id though.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Execute a CURL command for your project specifically like this on command line and pipe more. The first line shows "total" issues in your project
e.g
COMMAND
D:\curl -D- -u username:password -X GET -H "Content-Type: application/json" http://localhost:8081/rest/api/2/search?jql=project='ABC' | more
OUTPUT
...
...
100 501k 0 501k 0 0 501k 0 --:--:-- --:--:-- --:--:-- 892k
{"expand":"schema,names","startAt":0,"maxResults":50,"total":219,"issues":[{"expand":"operations,versionedRepresentations,editmeta,changelog,renderedFields"
....
....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I need to get the record count and then show it on confluence - is this possible?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are in luck @namrata singhal for confluence this is built in.
1: When editing add "Jira Issue/Filter"
2: After you have made your filter. Select "Display Options" and the "Total Issue Count"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is there a way to change the font type/size of the displayed count in confluence?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.