issuecount authName

Issue #20 resolved
Eric Putnam created an issue

when defining "authName" in a configuration for "issuecount", authName is not defined.

config snippet (full config file attached):

 "issuecount": {
      "interval": 120000,
      "title": "Blockers In The Last 14 Days",
      "jiraServer": "https://columbia.atlassian.net",
      "authName": "JIRA",
      "sections": [{
        "title": "JIRA",
        "counts": [{
          "label": "Issues",
          "jql": "project = \"RMP\""
        }]
      }]
    }

error:

 15:39:13.95 <error> executed with errors: ReferenceError: authName is not defined (in scheduler.js:37)
Call Stack:
    at handleError (/Users/eputnam/code/csc-dashboard/node_modules/atlasboard/lib/scheduler.js:37:29)
    at Scheduler.start (/Users/eputnam/code/csc-dashboard/node_modules/atlasboard/lib/scheduler.js:108:5)
    at null._onTimeout (/Users/eputnam/code/csc-dashboard/node_modules/atlasboard/lib/job-initialiser.js:50:27)
    at Timer.listOnTimeout (timers.js:92:15)

problem code (packages/atlassian/jobs/issuecount/issuecount.js:55-62) :

  // if authName is defined, use it.

  if (config.authName && (config.globalAuth && config.globalAuth[authName])) {
    options.headers = {
        "authorization": "Basic " + new Buffer(config.globalAuth[authName].username
          + ":" + config.globalAuth[authName].password).toString("base64")
      }
  }

Comments (4)

  1. Log in to comment