Hi,
I am attempting to do a extract a lot of data relating to the projects, issues, changelog from a jira instance. However, I do not need any information relating to any of the custom fields (which make up the bulk of the output).
current query--> https://servername.com/rest/api/2/search?fields=*all&jql=project=NAME&startAt=0&maxResults=500&expand=changelog
I was hoping to exclude 'customfield' ... as in
possible query --> https://servername.com/rest/api/2/search?fields=*all,-customfield&jql=project=NAME&startAt=0&maxResults=500&expand=changelog
Not successful ...
Any advice or suggestions are appreciated... searched this database for possible solutions... but saw questions on how to include certain fields... but, I am looking for just about everything but customfields (project, issuetype, status, resolutiondate, timestimate, component, duedate....)
Regards,
I don't think you can exclude fields, however restricting the fields to the ones you want should be doable as in:
https://servername.com/rest/api/2/search?jql=project=NAME&startAt=0&maxResults=500&expand=changelog&fields=project,issuetype,created,updated,status,summary,resolutiondate,priority,reporter,assignee,duedate,resolutiondate,timeoriginalestimate,timeestimate,timespent,components
Malloy's suggestion of whitelisting fields works for me. I also noticed this in the documentation:
"A particular field can be excluded by prefixing it with a minus."
e.g.
-description
- include navigable fields except the description (the default is *navigable
for search)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For excluding custom fields, I wanted to do this also, but the only way I could figure it out was adding each of the custom fields as a "-". Loooong URL, but it works:
&fields=-customfield_13102,-customfield_13102,-customfield_13104
... and so on.
Was hoping &fields=-customfield_* would work, but it does not.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
quick update --> below are the 'fields' I am looking for
project
issuetype
created
updated
status
summary
resolutiondate
priority
reporter
assignee
duedate
resolutiondate
timeoriginalestimate
timeestimate
timespent
components
A lot of 'fields'... but none of the custom fields ... :)
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.