Mattermost, Inc.

Issue in integration of Jira Cloud with Mattermost

We are running the mattermost in a EC2 instance. we want that to connect to our Jira Cloud.

we have successfully installed the Jira in the mattermost and mattermost app is also installed in our Jira Cloud. we have followed the steps below.

  1. Navigate to Settings > Apps > Manage Apps .
  • For older versions of Jira, navigate to Administration > Applications > Add-ons > Manage add-ons .
  1. Click Settings at bottom of page, enable development mode, and apply this change.
  • Enabling development mode allows you to install apps that are not from the Atlassian Marketplace.
  1. Click Upload app .
  2. In the From this URL field , enter: https://XXXXXXXX/plugins/jira/ac/atlassian-connect.json
  3. Wait for the app to install. Once completed, you should see an “Installed and ready to go!” message.
  4. Use the “/jira connect” command to connect your Mattermost account with your Jira account.
  5. Click the “More Actions” (…) option of any message in the channel (available when you hover over a message).

on using /jira connect command, we are navigated to our Jira Cloud page but we are getting App is not responding. Wait or [cancel] on the screen.

Anyone who has fixed this issue. can you post a solution for this.

Hi Vinod,

I have just performed this integration between Mattermost 5.18.0 and Jira 8.6.0 both running on a Ubuntu 18.04 T2.Small AWS instance. The integration into Jira has got a number of steps that need to be followed. I have just put a quick guideline of the high-level steps i have taken to perform the integration:

A. Under the System Console in Mattermost, Navigate to Plugins > Jira as an admin user.
Enable Jira Plugin there and allow users to attach/create Jira (depending on what you require)
Generate the Webhook secret (e.g. fTYdhyaHeiJEuObW8IhawVwfmrRJnBp_) and keep a note of it.

Test the Webhook secret in a browser:*http:// ecX-X-XX-X-XXX.us-east-2.compute.amazonaws.com:8065/plugins/jira/api/v2/webhook?secret=fTYdhyaHeiJEuObW8IhawVwfmrRJnBp_* 

(Response: Request: GET is not allowed, must be POST)

Test the Webhook secret in a putty session using CURL:
curl -i -X POST -H ‘Content-Type: application/json’ -d ‘{“text”: “Hello, this is some text\nThis is more text. :tada:”}’ WEBHOOK URL ABOVE

(Response: HTTP/1.1 200 OK
Date: Tue, 31 Dec 2019 12:48:21 GMT
Content-Length: 0) indicating the Webhook is enabled

B) In Jira, As a Jira System Administrator, go to Jira Settings > System > Advanced > WebHooks.
Create a new webhook:

  • Name Mattermost, Status enabled,
  • URL: WEBHOOK URL Above
  • Enable Issue, Project, User, Jira Software related events as required
  • Leave Exclude Body unchecked to receive JSON

C) Login to Mattermost as an admin user and you will see a Jirabot is automatically created
Navigate to the private channel you would like you would like to receive the Jira updates in.
Type in the command:
A) /Jira install server JIRA URL (Jira instance)
A set of instructions will appear to

  1. Navigate to Settings > Applications > Application Links in Jira
  2. Enter: MATTERMOST URL:8065 as the application link.
  3. In Configuration URL confirm the Mattermost URL
  4. In Link Apps set the following values:
    • Application Name: Mattermost (you can choose)
    • Application Type: Generic App
  5. Check the Create Incoming Link value and click continue
  6. In the following App link values, set the following options
    • Consumer Key: mattermost_http_ecX_X_XX_X_XXX_us_east_2_compute_amazonaws_com_8065
    • Consumer Name: Mattermost
    • Public Key: -----BEGIN PUBLIC KEY-----MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCr1XOEC80AK+U0v2sQsj95ZuGBqdh6WoUeeMgsuY0Cn1KFuBqjHPvvCucVVSwY8C0X3+h8ur+7HTPzqK4KWRCKVkhDQBSIRdDfCa4C3lJi/VliAYCaSpu06IFQwdPR9CslqQRqsNQDJFOb6bDzWeeap8FScT3iBhkDYeo02Lwy9QIDAQAB0-----END PUBLIC KEY-----
  7. Click Continue

B) /Jira Connect (this is where it is failing for you). After checking all of the above, Jira will connect to the Mattermost Webhook. The reason is your webhook doesn’t seem to have been setup correctly. You will receive a message:

The application Mattermost would like to have read and write access to your data on ecX-X-XX-X-XXX.us-east-2.compute.amazonaws.com. The application will be allowed to use your credentials to authenticate as you (Username) in the future. Click on the “Allow” button

C /Jira Subscribe. Select the project name, Event Types and Issues to be reported back to the Mattermost Channel. For different Mattermost Teams you can subscribe to different Jira projects to received updates.

Click on Set Subscription to finish

  • Test the integration by viewing an issue: /Jira view within the Team Channel. A form will open up
  • Ignore the gap between http and URL - due to posting rules. Ensure its a full URL
    If you have any further queries please post them here and i will try and compare it to my integration.
    Thanks and Happy New Year

Test Reply - Trying to just ensure a reply posts

Hello, @vinod

Based on the statement below:

  • May I know if you have already logged in to your JIRA Cloud instance prior to running /jira connect command?
  • Were you logged in to Mattermost using the same email address as the one you used to connect to JIRA Cloud?
  • Is the issue constantly reproducible whenever you try to connect?
  • Are there any other users who have tried to connect and run into the same problem?

Hai @ahmaddanial,

  • I have logged in to the Jira Cloud instance prior to running /jira connect

  • Yeah, I have logged into mattermost using the same email address.

  • I have tried almost like 10 times, I am getting the the screen as first loading after 10 sec or so we will get as App is not responding. wait or cancel?.

  • Yeah, we have tried with my colleagues accounts as well. we are getting the same issue.

Hi @jitenmajithia

We have mattermost instance hosted in a EC2 instance, but Jira we are using cloud version.

can you please help us in this regard.

Thanks Vinod. If Mattermost is installed on the EC2 cloud, please try the steps i have requested above. I followed the above and have managed to get the integration to work.
Is your Mattermost a HA setup or a single swimlane instance? Please confirm the version of Mattermost?

I didnt get what you meant by: “we have successfully installed the Jira in the mattermost and mattermost app is also installed in our Jira Cloud. we have followed the steps below”. Do you mean you have installed the plugin? Above you stated that Mattermost is installed in on AWS and hooks into the Jira SAAS offering? Is this correct?

Additionally watch this video? It may be with an older version of Mattermost but provides a good guide on getting the product installed and integrated with Jira Cloud. Let me know how you get on.

Can you also put Mattermost into DEBUG mode and let us know what the output of the log file is when performing these tests?

Hi @jitenmajithia,

I have done the steps A and B that you have mentioned. Got the same responses that you have got.

  • (Response: Request: GET is not allowed, must be POST)
  • (Response: HTTP/1.1 200 OK
    Date: Tue, 31 Dec 2019 12:48:21 GMT
    Content-Length: 0) indicating the Webhook is enabled

Even the step C, I have configured in my Jira Cloud. (Not Jira server)

The next step where I have to install Jira Cloud in the mattermost, I am using this command /Jira install cloud JIRA URL On entering that I got the instructions below to execute

  1. Navigate to Settings > Apps > Manage Apps .
  • For older versions of Jira, navigate to Administration > Applications > Add-ons > Manage add-ons .
  1. Click Settings at bottom of page, enable development mode, and apply this change.
  • Enabling development mode allows you to install apps that are not from the Atlassian Marketplace.
  1. Click Upload app .
  2. In the From this URL field , enter: https://XXXXXXXX/plugins/jira/ac/atlassian-connect.json
  3. Wait for the app to install. Once completed, you should see an “Installed and ready to go!” message.
  4. Use the “/jira connect” command to connect your Mattermost account with your Jira account.
  5. Click the “More Actions” (…) option of any message in the channel (available when you hover over a message).

In the 6th step when I am using the command /Jira connect I am getting the below screen. please check the attachment added.

can you please check and let us know if we are missing any.