gsingers / slack-jira-plugin

A Slack plugin that watches channels for messages about JIRA and acts accordingly
MIT License
252 stars 85 forks source link

No Title available. May not be able to find the JIRA. #35

Closed slarti-b closed 7 years ago

slarti-b commented 7 years ago

Been using this for a while but just updated as the version I had been using didn't support threads (just posted to the channel not the tread). That's working, but with the new version all messages posted by the bot have, following the message ID (correctly as a link to the issue) the text

No Title available. May not be able to find the JIRA. image

I want this to work for all projects, so I have only the default jira_url consifugred and a regex for projects: var slackbot = require('./lib/bot');

var config = {

  showIssueDetails: true,
  showDetailsByDefault: true,//if true, you don't need the '+' to get details
  bot_name: "Jira",//Provide the name to post under
  token: 'REMOVED',
  jira_urls: {
    "DEFAULT": {
      url: "https://REMOVED/browse/"
    },
  },
  search_cmd: "search",
  //Since search results can be verbose, you may not want to muddy the channel
  search_output_chan: "this",//if the value is "this", then the current channel will be used, else the name of a channel
  projects: ["[A-Z][A-Z0-9_]*"],
  post: false,
  verbose: true,
  custom_texts: {
    messagePrefix: "" //message you might like to prefix to JiraBot's post
  },
  emoji: ":jira:",
  link_separator: ", ",// use \n if you want new lines
  error_channel: 'tools-debug' //the id of the channel to send low level log errors.  If not defined, will use the current channel
};

//DO NOT EDIT BELOW HERE
var slackbot = new slackbot.Bot(config);
slackbot.run();

I really just want the functionality I had: just posting the message ID as a link to the message but in threads as well as channels. I could live with it adding the titles, but not this annoying message :)

The only thing I changed about the config when updating was to add the custom_texts block, since it wouldn't work without it. is this a config issue or a bug?

slarti-b commented 7 years ago

I think I've found the issue here. One was the new version needed a login (the old one didn't seem to) but I can solve that by giving a login to the default jira connection. However, I had also missed the issueDetailsToShow in the config when updating - if that is missing you get null reference exceptions and it doesn't work at all.