ndaversa / hubot-jira-bot

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.
https://www.npmjs.com/package/hubot-jira-bot
MIT License
61 stars 43 forks source link

assignment/comment/watch does not work #48

Open davidkarlsen opened 6 years ago

davidkarlsen commented 6 years ago

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

davidkarlsen commented 6 years ago

It seems these command only work in context of a channel? I am having a hard time understanding https://github.com/ndaversa/hubot-jira-bot/blob/master/src/jira/comment.coffee clearly