limiting fields including custom fields in response

Puneet Kumar June 14, 2018

Hi,

I am trying to fetch issues with limited fields using JIRA REST as:--

/rest/api/2/search?jql=project=D04047 and status not in (resolved,closed) &fields='[summary,assignee,fixVersions,issuetype,status,customfields_10112]'

but in response I am not getting the field summary and customFields.

Can you please assist in this how can I get all the mentioned fields?

And my next query if I am having project key like (D04047,D4047ABC,D04047BEN) then I need to use rest/api/2/project/D04047. (dot)to get  all of three mentioned project. Please correct if my understanding is wrong.

 

Thanks in Advance!

3 comments

Gavin McDonald June 15, 2018

You do not need the square brackets in the query; and using them is cutting off your first and last query.

 

Try instead

 

/rest/api/2/search?jql=project=D04047 and status not in (resolved,closed) &fields=summary,assignee,fixVersions,issuetype,status,customfields_10112

Gavin McDonald June 15, 2018

As for your other query, pretty sure project/ only accepts 1 project in the url.

 

You could try instead something like

 

rest/api/2/issue/createmeta?projectKeys=D04047,D4047ABC,D04047BEN

 

HTH

 

Gav...

Puneet Kumar June 15, 2018

Thanks Gravin for your reply!

if I use this
/rest/api/2/search?jql=project=D04047 and status not in (resolved,closed) &fields=summary,assignee,fixVersions,issuetype,status,customfields_10112,customfields_10441

still I am not able to get custom fields in the response.

and for second query only D04047 is fixed, appending text can vary from client to client.
Is there any way to get all the 3 projects, using D04047 only.

Gavin McDonald June 16, 2018

Ok I guess I'm not certain without seeing more of your setup.

The query works for me - here it is on our public jira :-

 

https://issues.apache.org/jira/rest/api/2/search?jql=project=INFRA%20and%20status%20not%20in%20(resolved,closed)%20&fields=assignee,summary,fixVersions,issuetype,status,customfield_12310220,customfield_12312521

Works fine as far as I can tell.

Puneet Kumar June 28, 2018

Thanks Gravin for your reply!

can you please also help me in this..

I have project keys as D04047,D4047ABC,D04047BEN

in which D04047 is fixed, appending text can vary from client to client.
Is there any way to get all the 3 projects, using D04047 only.

Like in case of summary we can use ~ which works  as like\contains operator.

Thanks!!!

Puneet Kumar July 5, 2018

Hi,

 

I have one more query.. actually my Jira issue summary is as follows - 'Work to jira'

in my JQL when I tried below searches

summary ~ 'work' -- working

summary ~ 'jira' -- working

summary ~ 'to' --  not working

I tried \to, to*etc.. but nothing seems to be working

could you please help me with how can I search using word 'to'.

 

Thanks!!!

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events