JQL to return limited columns

How can I create a JQL script that will return only specified columns from the view?

3 answers

1 accepted

This widget could not be displayed.

You don't.

JQL is for *finding* issues. It has nothing to say about how you look at the information on them.

The results from JQL are a simple list of issues, which you then give to a display function. The display function then decides what and how to display it. The issue navigator is one function, each gadget is a different display function, reports are more, and so-on.

I suspect what you want is a "saved filter", because you can save a set of columns with such a filter. This is nothing to do with the JQL, it's done by the issue navigator, and only the issue navigator and excel output will use the saved columns (handing the columns to most other functions is complete nonsense), but I think that's what you're looking for.

Thank you Nic. I appreciate it.

It's a reasonable question though, as other notable query languages (such as SQL) do not simply retrieve data but also allow modification of the output in a convenient format.

Yup, that's why I have a canned response for these questions - people assume equivalence from similarity, which is perfectly natural and instinctive, no matter how wrong.

This widget could not be displayed.

You can use the following code:

function main() {
   return Events({
      from_date: 'YYYY-mm-dd',
      to_date: 'YYYY-mm-dd',
      event_selectors: [
         {event: 'event1'},
         {event: 'event2'}
      return {


This will extract specific events (event1, event2: such as 'Visit' or 'App Opened') that occured in specific dates (from_date, to_date) and will retrieve only the columns specified after the .map step. You can also use 'new Date(event.time)' instead of only retrieving event.time to get a date format for the time of the event.

No, that's utterly wrong.  Please re-read the first two lines of the answer.

This widget could not be displayed.

https://docs.atlassian.com/jira/REST/server/#api/2/search-searchUsingSearchRequest shows a way to limit the fields that come back from a search.  You can supply both the JQL to find your matching issues as well as a list of fields (and start date and limit the results to some maximum number).

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted yesterday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

66 views 1 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you