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

Could not able to issue Ticket assign command #39

Open arulvelu21 opened 7 years ago

arulvelu21 commented 7 years ago

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

joshinryz commented 6 years ago

This also does not seem to work, no error is reported - but the case does not update. Using a non-existing case # does throw an error that it doesn't exist.

joshinryz commented 6 years ago

I resolved this, appears the regex was not matching - this actual happens on most of the calls.

I removed the "Begins with" , as the script is actually receiving text like: "robotname ITH-100 assign @user" not "ITH-100 assign @user" when a user types "IT-100 assign @user"

original: regex: new RegExp "^((?:#{Config.projects.prefixes}-)(?:\d+))(?: (un)?assign)? @?([\w._-])\s$", "i"

Fixed: regex: new RegExp "((?:#{Config.projects.prefixes}-)(?:\d+))(?: (un)?assign)? @?([\w._-])\s$", "i"