Adding custom fields to the info command

Posted on

Every Jirio user knows the “info” command that outputs a ticket information to Slack. What it does is simple: it queries JIRA for the issue status and prints most common fields as a response to Slack.

In most of the cases this information is sufficient for teams, but what to do if a team has a lot of custom fields that should also be rendered in Slack?

It was not possible to do much until now. Starting from today teams can specify a list of their custom fields right in the “info” command and these fields will be displayed in Slack window!

Let’s say a team has custom fields “foo” and “bar”. In this case, in order to see these custom fields in the “info” command response, the following command should be invoked:

/jirio info TLS-53 :foo :bar

The token is pretty simple here as well. A JIRA issue should be followed by field names prepended with colon.

/jirio info [issue] [:token1] [:token2] [:tokenN]

This command will print ticket information and also values of “foo” and “bar” fields.

Note, however, that only checkbox and dropdown kind of fields are supported at the moment.jira slack alias

Extra bonus – aliases

You may wonder if you really have to type token names all the time when you want to query a ticket information. No, you don’t! A simple alias has to be defined listing all tokens that need to be present in “info” command response. Please read more about aliases here.