Skip to content
This repository has been archived by the owner on Apr 24, 2019. It is now read-only.

Issue when using transition #20

Open
marcodejongh opened this issue Sep 8, 2014 · 1 comment
Open

Issue when using transition #20

marcodejongh opened this issue Sep 8, 2014 · 1 comment

Comments

@marcodejongh
Copy link

When I try to transition a issue

jira -t PROJ-123

I get the following error:

TypeError: Object #<Object> has no method 'sort'
    at /usr/local/lib/node_modules/jira-cli/lib/jira.js:55:19
    at /usr/local/lib/node_modules/jira-cli/lib/jira-cli.js:154:18
    at Request._callback (/usr/local/lib/node_modules/jira-cli/node_modules/jira/lib/jira.js:1255:17)
    at Request.self.callback (/usr/local/lib/node_modules/jira-cli/node_modules/jira/node_modules/request/main.js:127:22)
    at Request.emit (events.js:98:17)
    at Request.<anonymous> (/usr/local/lib/node_modules/jira-cli/node_modules/jira/node_modules/request/main.js:767:16)
    at Request.emit (events.js:117:20)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/jira-cli/node_modules/jira/node_modules/request/main.js:729:14)
    at IncomingMessage.emit (events.js:1

Using the latest version in npm

@jrabek
Copy link

jrabek commented Dec 9, 2014

Seems the transition return type changed:
You can make the following change in /usr/local/lib/node_modules/jira-cli/lib/jira.js

transitionItem = function(issueId) {
    return jiraCli.listTransitions(issueId, function(transitions) {
      var allowedTypes, index, transition, _i, _j, _len, _ref, _results;
      transitions = transitions.transitions; // Add this line
      transitions.sort(dutils.itemSorter);
      for (index = _i = 0, _len = transitions.length; _i < _len; index = ++_i) {

Starefossen pushed a commit to Starefossen/jira-cli that referenced this issue Jan 28, 2015
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