Skip to content
This repository has been archived by the owner on Jul 23, 2020. It is now read-only.

Using Search 'fields' option returns undefined #2

Closed
griojas opened this issue Mar 17, 2015 · 2 comments
Closed

Using Search 'fields' option returns undefined #2

griojas opened this issue Mar 17, 2015 · 2 comments
Assignees

Comments

@griojas
Copy link

griojas commented Mar 17, 2015

Whenever i call the search method and pass along jql and fileds, i get a undefined.

Here the call:

jira.search.search({jql: 'issuetype in(Story,Bug,Issue) AND status not in("Resolved","Closed") AND sprint in openSprints()', fields: 'summary,status' }, function(err, res) { console.log(res);});

Whenever i omit the 'fields' option, it works like a charm.

@floralvikings
Copy link
Owner

The fields parameter is actually an array, rather than a comma separated string; that's probably what's causing the issue.

Try using this, instead:

jira.search.search( {
    jql: 'issuetype in(Story,Bug,Issue) AND status not in("Resolved","Closed") AND sprint in openSprints()', 
    fields: ['summary', 'status']
  }, 
  function(err, res) { console.log(res); }
);

@floralvikings floralvikings self-assigned this Mar 19, 2015
@floralvikings
Copy link
Owner

@griojas Did using an array instead of the comma separated string fix your problem?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants