Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,363,188
Community Members
 
Community Events
168
Community Groups

limiting fields including custom fields in response

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

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

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...

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.

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!!!

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