Create JIRA Ticket integration takes many minutes the first time

Summary

After apparently successful /jira connect, I tried the “Create JIRA Ticket” action on a post. It opens a dialog box which displays “Loading…” and never finishes Loading.

Steps to reproduce

  • Mattermost 5.13.2
  • JIRA plugin enabled and installed with JIRA server (not cloud) version v7.8.4
  • /jira connect, log in, apparently all successful
  • select “Create JIRA Ticket”

Expected behavior

Dialog box with JIRA issue fields

Observed behavior

I waited about 15 minutes but the dialog was still “Loading…”.

There is nothing in the mattermost logs at INFO level. There is almost no CPU usage on the mattermost server.

I wonder if it is trying to enumerate all JIRA projects or other metadata. That could take a while (we have a lot of JIRA projects).

@gubbins Thanks for the report. Can you help with the following information:

  1. Can you open the JavaScript console (instructions on various browsers can be found here), then try to create the Jira issue, and then paste the output of any errors here?
  2. Which browser or desktop app have you reproduced this on?
  3. How many JIRA projects do you have?

Update: it did eventually complete, and then the ticket creation worked… and a second attempt to create was then fast. I don’t know yet if all users will pay this initial cost.

FWIW I saw this via both Chrome and the desktop client on OSX. In answer to question 3, I am not sure, but I would say hundreds.

thanks @gubbins for the follow-up. We’ve made some performance improvements for the upcoming Jira plugin update, which might help here.

If you’re able to capture the JavaScript console next time this happens to you or another user, it will help our team investigate the potential cause and confirm the performance improvements we’ve made.

OK, will bear that in mind.

Another user saw the same delay on their first create. No errors in the console, sorry. I suspect it’s just taking a long time to query all the info it needs from the JIRA server.

By the way, the JIRA server is located in Chicago while the mattermost server is in Sydney, so the ping time between them can also be a contributor.

@gubbins Hey, how long did you have wait until the Loading gone? I’ve got the same problem but haven’t tried to wait longer than 2-3 minutes.

I believe it was around 20-30 minutes.