Hi,
I want to be able to specify the order of the fields returned from my JQL query. Some fields are custom fields and by default, they return in order of ascending custom field ID, which I don't want. I'm trying to output this to a spreadsheet, so I would like certain fields containing multiple entries to output to the last column, which avoids shifting all the other columns around.
My command is:
$ (curl -u user:'password' -X GET 'url/rest/api/latest/search?jql=project=KEY&maxResults=200&fields=summary,customfield_11003,customfield_11001' | sed 's/{"expand":/\\\n/g') > output.csv
I want this to output:
summary, customfield_11003,customfield_11001 in that order, i.e., not ascending by field ID.
Instead it outputs:
summary,customfield_11001,customfield_11003.
I've tried simply inputting the desired order, using the order by command, using various delimiters, and various combinations of the field command. I'd like to avoid renaming the custom fields, as that is not a viable solution for our team.
Any help is appreciated - thanks!
Hello,
You can not specify an order. You should parse JSON programmatically and produce any order you need.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.