GithubHelp home page GithubHelp logo

ndaversa / hubot-jira-bot Goto Github PK

View Code? Open in Web Editor NEW
61.0 61.0 43.0 267 KB

Lets you search for JIRA tickets, open them, transition them thru different states, comment on them, rank them up or down, start or stop watching them or change who is assigned to a ticket. Also, notifications for assignments, mentions and watched tickets.

Home Page: https://www.npmjs.com/package/hubot-jira-bot

License: MIT License

CoffeeScript 99.44% Shell 0.56%

hubot-jira-bot's People

Contributors

folex avatar jfreedman avatar jharlap avatar joedrew avatar kevinschmidt avatar ndaversa avatar stewyj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

hubot-jira-bot's Issues

Add note on buttons

For enabling buttons you need a verification token.
This is only possible if you create hubot as a custom app and don't select the "custom integration" option which already exists for hubot and appears if you search for hubot in the apps section.

This issue: slackapi/hubot-slack#316 is also relevant.

One thing to note is that button actions require the bot to be available on the internet, while without this option it can work behind a firewall with a http-proxy.

Could not able to issue Ticket assign command

Hi ,

I have been trying to integrate hubot with JIRA . With this integration i could able to create ticket , list ticket and create subticket. However when i try to assign ticket to some person. It is not getting assigned to assignee. Please let me know where i am going wrong. Your help will be much appreciated.

Thanks
Arul

TypeError: Cannot read property 'name' of undefined

Keep receiving this on various commands,

HUBOT_SLACK_TOKEN='xoexample slack tokenUl' HUBOT_JIRA_GITHUB_DISABLED='true' HUBOT_JIRA_PROJECTS_MAP='{"web":"WEB","ops":"OPS"}' HUBOT_JIRA_TRANSITIONS_MAP='[{"name":"new","jira":"New"},{"name":"ready","jira":"Ready"},{"name":"assessing","jira":"Assess"},{"name":"active","jira":"Active"},{"name":"testing","jira":"Testing"},{"name":"feedback","jira":"Feedback"},{"name":"done","jira":"Done"}]' HUBOT_JIRA_TYPES_MAP='{"story":"Story","bug":"Bug","task":"Task","epic":"Epic"}' HUBOT_JIRA_PRIORITIES_MAP='[{"name":"Blocker","id":"1"},{"name":"Critical","id":"2"},{"name":"Major","id":"3"},{"name":"Minor","id":"4"},{"name":"Trival","id":"5"}]' HUBOT_JIRA_URL='https://company.atlassian.net' HUBOT_JIRA_FIELDS='["project"]' HUBOT_JIRA_USERNAME='gregsharpe' HUBOT_JIRA_PASSWORD='password' ./bin/hubot --adapter slack

Installed all required npm modules. Can't think of what it could be. Any help?

Is there a way to access Jira classes from outside of JiraBot?

Hi,

More of a question than an issue. In my hubot script I am listening for the JiraWebhookTicketInReview. When the event fires, I'd like to use some of the classes you have under /jira to do some additional custom functionality.

I am pretty new to nodejs and hubot and haven't been able to find a way to make this work. Are those submodules (assuming my term is right) available for me to use via require or some other way?

Module.exports = (robot) ->
robot.on "JiraWebhookTicketInReview", (ticket, transition, room, includeAttachment = no) =>
console.log 'here'
bot = require('hubot-jira-bot')
#can't find a way to get access to jira classes from here

jira integration

Hellow!
Tell me, is there any program, which helps make easier the integration jira with another program?
For example, for creating issue it is enough to transmit issue parameters and call the procedure.

[jira],[jira api], [java], [integration]

Assign doesn't function or provide an error message

When talking to the bot via the gitter2 adapter, and assigning tickets like this:

@botname assign OB-82 @username

The bot responds by mentioning themselves, and then takes no action. No error or warning is printed in the logs.

E.g. the bot's response in this case would be:

botname: @botname

Error while trying with hubot-jira-bot

Hi,
I just wanted to create one project in jira and need to update the time sheet accordingly. Could you please tell me how to do this using this Hubot-jira plugin?
the following steps I did.. but I am stuck with some error.

I installed all the npm modules and downloaded the project and updated the config.cofee . in ubuntu OS
Ran the command 'sudo hubot project:Test' in terminal
I am getting some error like '/usr/bin/env: coffee: No such file or directory'
I am not sure the steps I followed is correct or not. I could find any step by step instructions to integrate it and create the projects through the hubot.
could you please advice me on this. I am new to hubot.
Thanks in advance

Unable to lookup users in jira, assigning tickets to bot user instead

Whenever an attempt is made to assign or add a watcher to a Jira issue, the plugin fails to find the jira user and assigns/adds a watcher for the bot user instead. It is attempting to look up the jira name based on the email of the user. I have verified that the email address in slack matches the email address in Jira.

Here's the versions:

  • hubot-jira-bot: 7.3.1
  • hubot-slack: 4.3.4
  • hubot: 2.19.0

At a glance, I believe the plugin may be assuming that the Jira username is an email address rather the querying the actual email field in Jira? In our Jira instance, usernames are not email addresses.

Installation and configuration

Hi

I'm trying to get this installed and configured on heroku.

I have followed the steps and I have the following in my heroku variables:

HUBOT_JIRA_URL: https://MYURL.atlassian.net:9090
HUBOT_JIRA_USERNAME: MY_USER 
HUBOT_JIRA_PASSWORD: MY_PASSWORD
HUBOT_JIRA_PROJECTS_MAP: {"test123":"TEST123"}
HUBOT_JIRA_TYPES_MAP: {"epic":"Epic"}

I have installed the script via npm: npm install hubot-jira-bot --save and added it to the external-scripts.json and pushed to heroku

When I type hubot help I don't see any commands relating to JIRA

Have I installed this correctly?

reason: self signed certificate in certificate chain

Friends,

Currently I am having a difficulty to resolve the following issues. I have spent considerable amount of time to find information around this issue. Tried number of options.

Ex:
npm config set strict-ssl false -g
npm config set cafile C:/Users/{Path}.{File Name}.pem
npm config set NODE_TLS_REJECT_UNAUTHORIZED=0 -g
npm config set ca=""
npm config set ca="-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----"

Any additional inputs are greatly appreciated.

C:\Users\xxx\WORK\DevOps\ChatOps\wrkspace\apprel>.\bin\hubot --adapter slack
[Mon May 22 2017 08:37:08 GMT-0500 (Central Daylight Time)] DEBUG Loading adapter slack
[Mon May 22 2017 08:37:09 GMT-0500 (Central Daylight Time)] INFO Logged in as devops of DevOps
[Mon May 22 2017 08:37:10 GMT-0500 (Central Daylight Time)] INFO Slack client now connected
[Mon May 22 2017 08:37:45 GMT-0500 (Central Daylight Time)] DEBUG Executing listener callback for Message 'devops jira search APF-3'
``
[Mon May 22 2017 08:37:45 GMT-0500 (Central Daylight Time)] DEBUG Fetching: https://jira.xxx.com/jira/rest/api/2/search
[Mon May 22 2017 08:37:45 GMT-0500 (Central Daylight Time)] ERROR { FetchError: request to https://jira.xxx.com/jira/rest/api/2/search failed, reason: self signed certificate in certificate chain
at ClientRequest. (C:\Users\xxx\WORK\DevOps\ChatOps\wrkspace\apprel\node_modules\node-fetch\index.js:133:11)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:188:7)
at TLSSocket.socketErrorListener (_http_client.js:309:9)
at emitOne (events.js:96:13)
at TLSSocket.emit (events.js:188:7)
at emitErrorNT (net.js:1281:8)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)

name: 'FetchError',
message: 'request to https://jira.xxx.com/jira/rest/api/2/search failed, reason: self signed certificate in certificate chain',
type: 'system',
errno: 'SELF_SIGNED_CERT_IN_CHAIN',
code: 'SELF_SIGNED_CERT_IN_CHAIN' }
``

UNEXPECTED INDENT ERROR

I tried to install a fresh hubot and tried to run it, it was working properly. But if add hubot-jira-bot module and run the bot, i am getting the below error. I tried to trouble shoot it with different ways. If I comment out the total index.coffee file, then I am not getting any error. The code was actually running good and suddenly this happened. I was actually thinking it maybe because of some tab-space issue, but I dont know how to solve this. It would be of great help if someone help me with this.

I am using rubymine for the project.

Below is my stack trace and the error:

ERROR Unable to load C:\Users\navaneethc\Downloads\wesleyTest\node_modules\hubot-jira-bot\src\index: SyntaxError: unexpected INDENT
at Object.exports.throwSyntaxError (C:\Users\navaneethc\Downloads\wesleyTest\node_modules\coffee-script\lib\coffee-script\helpers.js:197:13)
at Parser.parser.yy.parseError (C:\Users\navaneethc\Downloads\wesleyTest\node_modules\coffee-script\lib\coffee-script\coffee-script.js:265:20)
at Parser.parse (C:\Users\navaneethc\Downloads\wesleyTest\node_modules\coffee-script\lib\coffee-script\parser.js:537:22)
at compile (C:\Users\navaneethc\Downloads\wesleyTest\node_modules\coffee-script\lib\coffee-script\coffee-script.js:35:24)
at Object.loadFile (C:\Users\navaneethc\Downloads\wesleyTest\node_modules\coffee-script\lib\coffee-script\coffee-script.js:176:14)
at Module.load (C:\Users\navaneethc\Downloads\wesleyTest\node_modules\coffee-script\lib\coffee-script\coffee-script.js:211:36)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object. (C:\Users\navaneethc\Downloads\wesleyTest\node_modules\hubot-jira-bot\src\index.coffee:23:10, :8:12)
at Object. (C:\Users\navaneethc\Downloads\wesleyTest\node_modules\hubot-jira-bot\src\index.coffee:20:1, :591:4)
at Module._compile (module.js:652:30)
at Object.loadFile (C:\Users\navaneethc\Downloads\wesleyTest\node_modules\coffee-script\lib\coffee-script\coffee-script.js:182:19)
at Module.load (C:\Users\navaneethc\Downloads\wesleyTest\node_modules\coffee-script\lib\coffee-script\coffee-script.js:211:36)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Robot.loadFile (C:\Users\navaneethc\Downloads\wesleyTest\node_modules\hubot\src\robot.coffee:355:9, :224:20)
at C:\Users\navaneethc\Downloads\wesleyTest\node_modules\hubot-jira-bot\index.coffee:7:5, :13:22
at FSReqWrap.cb [as oncomplete] (fs.js:312:19)

101 Guide to Starting Up

I am trying to start this up in the most basic way possible but having some issues. The documentation around getting started isn't all that clear for me. Below is the startup command I am trying to run. Is there anything glaringly obvious I am missing here? For what it is worth, I'll contribute back to update with a getting started portion to the docs.
HUBOT_SLACK_TOKEN=xoxb-XXXXXXX-XXXXXXX HUBOT_GITHUB_ORG=hello HUBOT_GITHUB_TOKEN=there HUBOT_JIRA_GITHUB_DISABLED=true HUBOT_JIRA_PASSWORD=XXX HUBOT_JIRA_PRIORITIES_MAP=[{"name":"Blocker","id":"1"},{"name":"Critical","id":"2"},{"name":"Major","id":"3"},{"name":"Minor","id":"4"},{"name":"Trivial","id":"5"}] HUBOT_JIRA_PROJECTS_MAP={"sys":"SYS"} HUBOT_JIRA_TRANSITIONS_MAP=[{"name":"backlog","jira":"Backlog"},{"name":"devready","jira":"Selected for Development"},{"name":"inprogress","jira":"In Progress"},{"name":"done","jira":"Done"}] HUBOT_JIRA_TYPES_MAP=[{"story":"Story / Feature","bug":"Bug","task":"Task"}] HUBOT_JIRA_URL=https://XXX.atlassian.net HUBOT_JIRA_USERNAME=XXX.XXX HUBOT_SLACK_BUTTONS={"watch":{"name":"watch","text":"Watch","type":"button","value":"watch","style":"primary"},"assign":{"name":"assign","text":"Assign to me","type":"button","value":"assign"},"devready":{"name":"devready","text":"Dev Ready","type":"button","value":"selected"},"inprogress":{"name":"inprogress","text":"In Progress","type":"button","value":"progress"},"rank":{"name":"rank","text":"Rank Top","type":"button","value":"top"},"running":{"name":"running","text":"Running","type":"button","value":"running"},"review":{"name":"review","text":"Review","type":"button","value":"review"},"resolved":{"name":"resolved","text":"Resolved","type":"button","style":"primary","value":"resolved"},"done":{"name":"done","text":"Done","type":"button","style":"primary","value":"done"}} HUBOT_SLACK_PROJECT_BUTTON_STATE_MAP={"PLAT":{"inprogress":["review","running","resolved"],"review":["running","resolved"],"running":["resolved"],"resolved":["devready","inprogress"],"mention":["watch","assign","devready","inprogress","rank"]},"HAL":{"inprogress":["review","running","resolved"],"review":["running","resolved"],"running":["resolved"],"resolved":["devready","inprogress"],"mention":["watch","assign","devready","inprogress","rank"]},"default":{"inprogress":["review","done"],"review":["done"],"done":["devready, inprogress"],"mention":["watch","assign","devready","inprogress","rank"]}} HUBOT_SLACK_VERIFICATION_TOKEN=xoxb-XXXXXX-XXXXX ./bin/hubot --adapter slack

HUBOT_JIRA_GITHUB_DISABLED not parsed

Aside from the fact that there's no information on what is parsable from environment variables as opposed to only being picked up from ~/src/config, the HUBOT_JIRA_GITHUB_DISABLED does not seem to be acknowledged at all. I've set it in:

  1. env-wide for the user running hunot
  2. process-wide with the startup of hubot
  3. in the ./config file expected to be under ~/src, which is evidently the only place most other vars are picked up from

Still, on hubot startup I get errors on pull-req coffee for github tokens missing.

A simple explanation on what the default set of env vars required for starting up with jira only, withouth gitihub and anything else like statd would be highly appreciated.

The second thing is that statd is not optional at all, utils parsing fails without its relevant options being present in ./config, so it has to be removed with extreme prejudice from 2+ files to get the thing to start.

Additionally, there's undocumented options in the README.md versus what's under comments of config.

SyntaxError: Unexpected token w in JSON at position 1

This is how my current command looks:

HUBOT_SLACK_TOKEN=xoxb-163461access_tokenYdVltrhwrbUl HUBOT_JIRA_GITHUB_DISABLED=true HUBOT_JIRA_PRIORITIES_MAP={"name":"Blocker","id":"1"} HUBOT_JIRA_PROJECTS_MAP={"web":"WEB","android":"AN","ios":"IOS","platform":"PLAT"} HUBOT_JIRA_TRANSITIONS_MAP={"name":"triage","jira":"Triage"} HUBOT_JIRA_TYPES_MAP={"story":"Story / Feature","bug":"Bug","task":"Task"} HUBOT_JIRA_URL=https://mycompany.atlassian.net:9090 HUBOT_JIRA_USERNAME=gregsharpe HUBOT_JIRA_PASSWORD=MY_PASSWORD ./bin/hubot --adapter slack

Has anyone got any ideas?

Issue with assigning and transition tickets using the slack adapter

Hi there.

I am trying to assign and transition a ticket via slack using this hubot plugin. I can create the ticket without issue. However when I do either:

<ticket-number> assign <Username>
or 
<ticket-number> to resolve 

The bot does not return with any response in slack and the ticket is not updated. I see no errors in the logs so I am not sure why its not working. And help/debugging guidance would be greatly appreciated.

hubot-jira-bot commands don't work

my hubot dont't recognize hubot-jira-bot commands except jira help. i'm using mattermost, i just wanna test hubot-jira-bot commands to jira

[Mon May 14 2018 18:06:20 GMT+0000 (UTC)] DEBUG Message 'bot-jira jira help' matched regex //^\s*[@]?bot-jira[:,]?\s*(?:(?:help jira|jira help)(?: (.*))?)//; listener.options = { id: null }
[Mon May 14 2018 18:06:20 GMT+0000 (UTC)] DEBUG Executing listener callback for Message 'bot-jira jira help'
[Mon May 14 2018 18:06:20 GMT+0000 (UTC)] ERROR TypeError: Cannot read property 'increment' of undefined
at TextListener.callback (/home/ec2-user/bot-jira/node_modules/hubot-jira-bot/src/index.coffee:355:19)
at /home/ec2-user/bot-jira/node_modules/hubot/src/listener.coffee:65:12
at allDone (/home/ec2-user/bot-jira/node_modules/hubot/src/middleware.coffee:44:37)
at /home/ec2-user/bot-jira/node_modules/async/lib/async.js:274:13
at Object.async.eachSeries (/home/ec2-user/bot-jira/node_modules/async/lib/async.js:142:20)
at Object.async.reduce (/home/ec2-user/bot-jira/node_modules/async/lib/async.js:268:15)
at /home/ec2-user/bot-jira/node_modules/hubot/src/middleware.coffee:49:13
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)

OAuth support?

This jira bot is excellent. We are a little concerned though about having a plain-text password as part of the setup. Was looking into Jira's OAuth setup. Seems a bit more secure (can't use OAuth token for an interactive session). Has this been considered as a new feature? I'm considering trying to get it working and send back a pull request. Looking for any gotchas if you've already tried it.

Use api to get project, type, and transition data

Hard-coding project data into an environment variable is not a flexible way to store an agile company's project descriptions. Instead, use the jira rest api at startup to scrape the needed data.

invalid json response Unexpected token <

Hi,

I have successfully integrated the same, however on each command I get below error, can you please suggest what might be going wrong in this case, Thanks a lot...!!!

[Mon Jan 15 2018 18:24:22 GMT+0530 (IST)] ERROR FetchError: invalid json response body at https://XXX.XXX.XXX/jira/rest/api/2/search reason: Unexpected token <
at /home/gyadav/myhubot/node_modules/hubot-jira-bot/node_modules/node-fetch/lib/body.js:48:31
at process._tickCallback (node.js:369:9)

Parsing fails for Projects list

I have been unsuccessful in getting the bot to start properly. Always results in the following error and the Unexpected Token is the "E" in "Engineering"

[Thu Feb 16 2017 00:03:40 GMT+0000 (UTC)] ERROR Unable to load /vagrant/node_modules/hubot-jira-bot/src/index: SyntaxError: Unexpected token E
  at Object.parse (native)
  at /vagrant/node_modules/hubot-jira-bot/src/config.coffee:36:5, <js>:30:22
  at Object.<anonymous> (/vagrant/node_modules/hubot-jira-bot/src/config.coffee:21:1, <js>:197:5)
  at Object.<anonymous> (/vagrant/node_modules/hubot-jira-bot/src/config.coffee:21:1, <js>:201:4)
  at Module._compile (module.js:410:26)
  at Object.loadFile (/vagrant/node_modules/coffee-script/lib/coffee-script/coffee-script.js:182:19)
  at Module.load (/vagrant/node_modules/coffee-script/lib/coffee-script/coffee-script.js:211:36)
  at Function.Module._load (module.js:301:12)
  at Module.require (module.js:354:17)
  at require (internal/module.js:12:17)
  at Object.<anonymous> (/vagrant/node_modules/hubot-jira-bot/src/index.coffee:23:10, <js>:8:1

Below is the startup script I am using

#!/bin/bash
export HUBOT_GITHUB_ORG=none
export HUBOT_GITHUB_TOKEN=none 
export HUBOT_JIRA_GITHUB_DISABLED=true 
export HUBOT_JIRA_PASSWORD=XXXXXXXXX 
export HUBOT_JIRA_PRIORITIES_MAP=[{"name":"Highest","id":"1"},{"name":"High","id":"2"},{"name":"Medium","id":"3"},{"name":"Low","id":"4"},{"name":"Lowest","id":"5"}] 
export HUBOT_JIRA_TYPES_MAP={"story":"Story","feature":"Feature","bug":"Bug","task":"Task","subtask":"Sub-task","epic":"Epic"} 
export HUBOT_JIRA_URL=https://jira.............com 
export HUBOT_JIRA_USERNAME=YYYYYYYYYY 
export HUBOT_SLACK_BUTTONS={"watch":{"name":"watch","text":"Watch","type":"button","value":"watch","style":"primary"},"assign":{"name":"assign","text":"Assign to me","type":"button","value":"assign"},"devready":{"name":"devready","text":"Dev Ready","type":"button","value":"selected"},"inprogress":{"name":"inprogress","text":"In Progress","type":"button","value":"progress"},"rank":{"name":"rank","text":"Rank Top","type":"button","value":"top"},"running":{"name":"running","text":"Running","type":"button","value":"running"},"review":{"name":"review","text":"Review","type":"button","value":"review"},"resolved":{"name":"resolved","text":"Resolved","type":"button","style":"primary","value":"resolved"},"done":{"name":"done","text":"Done","type":"button","style":"primary","value":"done"}} 
export HUBOT_SLACK_PROJECT_BUTTON_STATE_MAP={"EN":{"inprogress":["review","running","resolved"],"review":["running","resolved"],"running":["resolved"],"resolved":["devready","inprogress"],"mention":["watch","assign","devready","inprogress","rank"]},"default":{"inprogress":["review","done"],"review":["done"],"done":["devready, inprogress"],"mention":["watch","assign","devready","inprogress","rank"]}} 
export HUBOT_JIRA_PROJECTS_MAP={"Engineering":"EN"}
export HUBOT_JIRA_DEFAULT_PROJECT=EN
export HUBOT_SLACK_VERIFICATION_TOKEN=xoxb-XXXXXX
export HUBOT_SLACK_TOKEN=xoxb-XXXXXX
export HUBOT_LOG_LEVEL=debug
./bin/hubot --adapter slack

package.json

{
  "name": "test-hubot",
  "version": "0.0.0",
  "private": true,
  "author": "Paul East <[email protected]>",
  "description": "A helpful robot",
  "dependencies": {
    "hubot": "^2.19.0",
    "hubot-diagnostics": "0.0.1",
    "hubot-google-images": "^0.2.6",
    "hubot-google-translate": "^0.2.0",
    "hubot-help": "^0.2.0",
    "hubot-heroku-keepalive": "^1.0.2",
    "hubot-jira-bot": "^7.3.0",
    "hubot-maps": "0.0.2",
    "hubot-pugme": "^0.1.0",
    "hubot-redis-brain": "0.0.3",
    "hubot-rules": "^0.1.1",
    "hubot-scripts": "^2.17.2",
    "hubot-shipit": "^0.2.0",
    "hubot-slack": "^4.3.1"
  },
  "engines": {
    "node": "0.10.x"
  }
}

assignment/comment/watch does not work

I can search and create issues, but watch/add comment/add label does not seem to work.
Example:

ec 11 2017 10:23:25 GMT+0000 (UTC)] DEBUG Received message: 'hubot TACJFRSR-172 watch' in channel: DM, from: david.karlsen
[Mon Dec 11 2017 10:23:25 GMT+0000 (UTC)] DEBUG Message 'hubot TACJFRSR-172 watch' matched regex //.*//; listener.options = { id: null }
[Mon Dec 11 2017 10:23:25 GMT+0000 (UTC)] DEBUG Executing listener callback for Message 'hubot TACJFRSR-172 watch'
[Mon Dec 11 2017 10:23:25 GMT+0000 (UTC)] DEBUG seen.add david.karlsen on D85T9F6Q5
[Mon Dec 11 2017 10:23:25 GMT+0000 (UTC)] DEBUG Executing listener callback for Message 'hubot TACJFRSR-172 watch'
[Mon Dec 11 2017 10:23:25 GMT+0000 (UTC)] DEBUG Fetching: https://test.fsjira.evry.com/rest/api/2/issue/TACJFRSR-172?expand=transitions&fields=issuetype%2Cstatus%2Cassignee%2Creporter%2Csummary%2Cdescription%2Clabels%2Cproject
[Mon Dec 11 2017 10:23:25 GMT+0000 (UTC)] DEBUG Fetching: https://test.fsjira.evry.com/rest/api/2/issue/TACJFRSR-172/watchers
[Mon Dec 11 2017 10:23:25 GMT+0000 (UTC)] DEBUG Supressing ticket attachment for TACJFRSR-172 in DM

but when I check the issue log no changes have been done / watchers have not been updated

Error while trying with hubot-jira-bot

Hi,
I just wanted to create one project in jira and need to update the time sheet accordingly. Could you please tell me how to do this using this Hubot-jira plugin?
the following steps I did.. but I am stuck with some error.

I installed all the npm modules and downloaded the project and updated the config.cofee . in ubuntu OS
Ran the command 'sudo hubot project:Test' in terminal
I am getting some error like '/usr/bin/env: coffee: No such file or directory'
I am not sure the steps I followed is correct or not. I could find any step by step instructions to integrate it and create the projects through the hubot.
could you please advice me on this. I am new to hubot.
Thanks in advance

Support specifying project via chat

As opposed to having a chatroom for each JIRA project, the case of having a single chatroom and specifying the JIRA project as an argument could be supported:

hubot bug ios WebView renders our login screen horribly
hubot task android Add intent handler for links

enabling buttons in slack question

Hi @ndaversa and all,

Thanks a lot for the plugin.
It works fine.

I have a question regarding enabling the buttons.
The buttons appear after I create a bug. But when one is clicked I get an error in the channel:
"Darn – that didn’t work. Only Slack Apps can add interactive elements to messages"

Is there a guide how to enable these buttons?

Thanks,

Yohay

Syntax error on install

[Fri Nov 27 2015 18:41:09 GMT+0000 (UTC)] ERROR Unable to load /app/node_modules/hubot-jira-bot/src/jira: SyntaxError: Unexpected token u 2015-11-27T18:41:09.832141+00:00 app[web.1]: at Object.parse (native) 2015-11-27T18:41:09.832143+00:00 app[web.1]: at module.exports (/app/node_modules/hubot-jira-bot/src/jira.coffee:36:29, <js>:23:18)

Utils.JiraBot.adapter.getUsers() not getting correct information

Hi ,

Noticing an issue when trying out the hubot with our JIra instance ( self hosted if that makes a difference)

alfred> alfred jira search test
alfred> Unable to search for `test` :sadpanda:
[Wed May 10 2017 14:29:41 GMT+0000 (UTC)] ERROR TypeError: Cannot read property 'email' of undefined
  at /home/ansible/workspace/alfred-hubot/alfred/node_modules/hubot-jira-bot/src/utils.coffee:61:69, <js>:115:36
  at Function.Utils.lookupUserWithJira (/home/ansible/workspace/alfred-hubot/alfred/node_modules/hubot-jira-bot/src/utils.coffee:61:5, <js>:120:11)
  at Ticket.toAttachment (/home/ansible/workspace/alfred-hubot/alfred/node_modules/hubot-jira-bot/src/jira/ticket.coffee:41:16, <js>:64:26)
  at /home/ansible/workspace/alfred-hubot/alfred/node_modules/hubot-jira-bot/src/index.coffee:392:24, <js>:440:36
  at /home/ansible/workspace/alfred-hubot/alfred/node_modules/hubot-jira-bot/src/index.coffee:392:9, <js>:443:13
  at process._tickCallback (internal/process/next_tick.js:109:7)

Added some debugging to see what it's seeing and what's being sent.

@lookupUserWithJira: (jira, fallback=no) ->
    users = Utils.JiraBot.adapter.getUsers()
    console.log(users)
    console.log(Config.jira.username)
    console.log(Config.jira.password)
    result = (users[user] for user of users when users[user].profile.email is jira.emailAddress) if jira
    if result?.length is 1
      return if fallback then result[0].name else "<@#{result[0].id}>"
    else if jira
      return jira.displayName
    else
      return "Unassigned"

which outputs

08:51 $ ./bin/hubot -a shell
alfred> [Thu May 11 2017 08:51:53 GMT+0000 (UTC)] INFO /home/ansible/workspace/alfred-hubot/alfred/scripts/sorry.coffee is using deprecated documentation syntax
[Thu May 11 2017 08:51:53 GMT+0000 (UTC)] INFO hubot-redis-brain: Using default redis on localhost:6379

alfred> alfred jira search test
alfred> { '1': User { id: '1', name: 'Shell', room: 'Shell' } }
SVC-JIRA
password1
{ '1': User { id: '1', name: 'Shell', room: 'Shell' } }
SVC-JIRA
password1
Unable to search for `test` :sadpanda:
[Thu May 11 2017 08:52:32 GMT+0000 (UTC)] ERROR TypeError: Cannot read property 'email' of undefined
  at /home/ansible/workspace/alfred-hubot/alfred/node_modules/hubot-jira-bot/src/utils.coffee:64:69, <js>:118:36
  at Function.Utils.lookupUserWithJira (/home/ansible/workspace/alfred-hubot/alfred/node_modules/hubot-jira-bot/src/utils.coffee:64:5, <js>:123:11)
  at Ticket.toAttachment (/home/ansible/workspace/alfred-hubot/alfred/node_modules/hubot-jira-bot/src/jira/ticket.coffee:41:16, <js>:64:26)
  at /home/ansible/workspace/alfred-hubot/alfred/node_modules/hubot-jira-bot/src/index.coffee:392:24, <js>:440:36
  at /home/ansible/workspace/alfred-hubot/alfred/node_modules/hubot-jira-bot/src/index.coffee:392:9, <js>:443:13
  at process._tickCallback (internal/process/next_tick.js:109:7)

Any ideas on what could be the issue? I can confirm the username and password are working on the instance

Search By JIRA NUMBER

Looks like we cant search by JIRA Number since jql is search for 'text' so adding 'key' in the fields is not working to perform search by JIRA Number. Ex: bot-name jira search ABC-4

https://jira.xxx.com/jira/rest/api/2/search
body is {"jql":"text ~ 'ABC-4'","startAt":0,"maxResults":5,"fields":["issuetype","status","assignee","reporter","summary","description","labels","project"]}

Any Suggestions please!!

Issue with help

Hi there.

I have installed the hubot jira bot and it works properly in slack in terms of functionality. However, the help is not available. If I type "jira help" I get no response from Hubot. If I type "help jira" i get "No available commands match jira." Not sure why the commands are not available when the commands themselves work.

Case insensitive check for email

It seems the bot is not able to recognize my id when attempting actions like watch. I noticed that the email address in slack is lowercase, while it is mixed case in jira - it would be nice if the matching was case-insensitive.

Support latest hubot-slack adapter

When running hubot jira help, I get the following error:

ERROR TypeError: this.robot.adapter.customMessage is not a function

I have tried to update npm and reinstalled this plugin, but no luck.

Any help or pointers welcome :)

Hubot-jira-bot calls api.github.com ?

Just discovered this hubot script calls github.com with the query string of the ticket you are looking for instead of just calling the JIRA instance you have defined.

I'm on github enterprise, none of my issues would be on github.com.

I discovered this via getting

[Mon Jun 27 2016 17:17:56 GMT-0400 (EDT)] ERROR Error: {"message":"API rate limit exceeded for 64.40.252.178. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)","documentation_url":"https://developer.github.com/v3/#rate-limiting"}
  at /home/sjakubowski/hubot2/node_modules/octokat/dist/node/requester.js:214:21
  at xhr.onreadystatechange (/home/sjakubowski/hubot2/node_modules/octokat/dist/node/requester.js:39:18)
  at dispatchEvent (/home/sjakubowski/hubot2/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:593:25)
  at setState (/home/sjakubowski/hubot2/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:612:14)
  at IncomingMessage.<anonymous> (/home/sjakubowski/hubot2/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:449:13)
  at emitNone (events.js:91:20)
  at IncomingMessage.emit (events.js:185:7)
  at endReadableNT (_stream_readable.js:934:12)
  at _combinedTickCallback (internal/process/next_tick.js:74:11)
  at process._tickCallback (internal/process/next_tick.js:98:9)

Nothing in the documentation mentions calling the github issues api?

https://www.npmjs.com/package/hubot-jira-bot

How can I disable this?

JSON.parse error

i'm trying to connect my jira hubot with mattermost. Below is the startup command I am trying to run
#ERROR /hubot-jira-bot/src/index: SyntaxError: Unexpected token u in JSON at position 0

export MATTERMOST_ENDPOINT=/hubot/incoming
export MATTERMOST_CHANNEL=bugs-jira
export MATTERMOST_INCOME_URL=XXXXXXXXXXXXXXXXXX
export MATTERMOST_TOKEN="XXXXXXXXXXX
export MATTERMOST_HUBOT_USERNAME=XXXXXXXXX
export HUBOT_JIRA_GITHUB_DISABLED=true
export HUBOT_JIRA_PASSWORD=XXXXXXXXX
export HUBOT_JIRA_URL=XXXXXXXXXXXXXX
export HUBOT_JIRA_USERNAME=XXXXXXXXXXX
export HUBOT_JIRA_MENTIONS_DISABLED=true
export HUBOT_JIRA_PRIORITIES_MAP='[{"name":"Blocker","id":"1"},{"name":"Critical","id":"2"},{"name":"Major","id":"3"},{"name":"Minor","id":"4"},{"name":"Trivial","id":"5"}]'
export HUBOT_JIRA_PROJECTS_MAP='{"web":"WEB","android":"AN","ios":"IOS","platform":"PLAT"}'
export HUBOT_JIRA_TRANSITIONS_MAP='[{"name":"triage","jira":"Triage"},{"name":"icebox","jira":"Icebox"},{"name":"backlog","jira":"Backlog"},{"name":"devready","jira":"Selected for Development"},{"name":"inprogress","jira":"In Progress"},{"name":"design","jira":"Design Triage"}]'
export HUBOT_JIRA_TYPES_MAP='{"story":"Story / Feature","bug":"Bug","task":"Task"}'
export HUBOT_JIRA_FIELDS='["issuetype", "status", "assignee", "reporter", "summary", "description", "labels", "project"]'
export PORT=8082
export NODE_TLS_REJECT_UNAUTHORIZED=0
export HUBOT_LOG_LEVEL="debug"

json error

When trying to install - I get this error message : (same as issue #4)

export HUBOT_JIRA_PROJECTS_MAP={"web":"WEB","android":"AN","ios":"IOS","platform":"PLAT"}
export HUBOT_JIRA_TYPES_MAP={"story":"Story","SupportIncident":"Support Incident","SupportTicket":"Support Ticket"}
export HUBOT_JIRA_PRIORITIES_MAP=[{"name":"Blocker","id":"1"},{"name":"Critical","id":"2"},{"name":"Major","id":"3"},{"name":"Minor","id":"4"},{"name":"Trivial","id":"5"}]

ERROR Unable to load /home/mkrish6/tars/node_modules/hubot-jira-bot/src/index: SyntaxError: Unexpected token w in JSON at position 1
at Object.parse (native)
at /home/mkrish6/tars/node_modules/hubot-jira-bot/src/config.coffee:36:5, :30:22
at Object. (/home/mkrish6/tars/node_modules/hubot-jira-bot/src/config.coffee:21:1, :197:5)
at Object. (/home/mkrish6/tars/node_modules/hubot-jira-bot/src/config.coffee:21:1, :201:4)
at Module._compile (module.js:570:32)
at Object.loadFile (/home/mkrish6/tars/node_modules/coffee-script/lib/coffee-script/coffee-script.js:182:19)
at Module.load (/home/mkrish6/tars/node_modules/coffee-script/lib/coffee-script/coffee-script.js:211:36)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (/home/mkrish6/tars/node_modules/hubot-jira-bot/src/index.coffee:23:10, :8:12)
at Object. (/home/mkrish6/tars/node_modules/hubot-jira-bot/src/index.coffee:20:1, :563:4)
at Module._compile (module.js:570:32)
at Object.loadFile (/home/mkrish6/tars/node_modules/coffee-script/lib/coffee-script/coffee-script.js:182:19)
at Module.load (/home/mkrish6/tars/node_modules/coffee-script/lib/coffee-script/coffee-script.js:211:36)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Robot.loadFile (/home/mkrish6/tars/node_modules/hubot/src/robot.coffee:355:9, :224:20)
at /home/mkrish6/tars/node_modules/hubot-jira-bot/index.coffee:7:5, :13:22
at FSReqWrap.cb [as oncomplete] (fs.js:257:19)

please suggest a sample config set for json that works.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.