i'm looking in to a way of finding all projects where a user has issues assigned to him/her
i found this nice and easy query:
search?jql=assignee=currentuser()&startAt=0&maxResults=100"
which works, but also includes issues set to 'done'
so i was trying to get this working, by filtering in the query, using:
search?jql=assignee=currentuser()&status=1234
but i seem to be missing something, since the result from my get request keeps returning the same amount of issues.
Does anyone know how to format this, and if it'ss even possible doing a get request? tnx in advance.
You should url encode the jql part as below.
assignee=currentuser() AND status=1234
Above encoded to below using https://meyerweb.com/eric/tools/dencoder/
assignee%3Dcurrentuser()%20AND%20status%3D1234
So the url will be
search?jql=assignee%3Dcurrentuser()%20AND%20status%3D1234
Thank you for your quick reply, but maybe i explained this wrong:
the first query i put there is working. I'm using a powershell script for this, so the full line would be something like:
invoke-restmethod -uri "https://mycompany.atlassian.net/rest/api/3/search?jql=assignee=currentuser()&startAt=0&maxResults=100" -Headers $headers -Method GET
what i'm missing is the correct way to filter this based on a status: cause we work in a scrum based method, and i only want the active issues to return, meaning in the backlog, in todo, in blocked, but not in done. it's possible that i can't do it like this, and need to work around it, by adding a filter in jira, or using a post method instead of get (i prefer get, less permissions)
I'm pretty new to jql, and atlassian products ( about 1 day of admin experience now) so i might be going the wrong way on this. The result i'm trying to get is a list of projects where a user has issues asssigned to him/her. I then want those user to be added to specific azure ad groups, based on the projects they work on, which manage membership to project specific resources and tooling.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I understand it now. Then the jql should be
assignee=currentuser() and status!=Done
You can try the jql on your jira web ui with the following url.
https://mycompany.atlassian.net/issues/?jql=assignee%3Dcurrentuser() and status!%3DDone
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i typed a very nice thank you reply here, but it seems to be lost between some bits and bytes.
In the end i had to use the javascript format for the url, to have the second argument accepted by jql like this:
$test = (invoke-restmethod -uri "https://mycompany.atlassian.net/rest/api/3/search?jql=assignee%3Dcurrentuser()%20AND%20status%20not%20in%20(Done%2COpgelost)" -Headers $headers -Method GET)
Hop[e this helps someone in the future
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.