Jira issue importer limits project selection to 100 results

Summary

With our latest release, when a user attempts to import issues from Jira, their project drop-down selection is limited only to 100 results. This means that users with a large amount of Jira projects may not be able to select their intended project to import issues from.

This was initially reported by a customer within this ticket (internal use).

Steps to reproduce

(How one can reproduce the issue - this is very important)

  1. Ensure you have more than 100 projects under a Jira account. This can be done on the free tier. Here's a simple bash script that will create 125 projects automatically:
Expand for script
#!/bin/bash
for ((i=1;i<=125;i++));
do
   echo $i
   curl -X POST https://YOUR_DOMAIN.atlassian.net/rest/api/3/project -u YOUR@EMAIL.COM:YOUR_API_KEY -H 'Content-Type: application/json' -H 'cache-control: no-cache' -d '{
      "key": "TEST'$i'",
      "name": "TEST'$i'",
      "projectTypeKey": "software",
      "projectTemplateKey": "com.pyxis.greenhopper.jira:gh-scrum-template",
      "description": "Example Project description",
      "leadAccountId": "YOUR_ACCOUNT_ID",
      "assigneeType": "PROJECT_LEAD",
      "avatarId": 10200
      }'
   echo "TEST$i"
   sleep 3
done
  1. Configure your Jira integration

  2. Use the Jira Issue Importer, and verify only 100 results are within the dropdown. I did this by comparing the populated HTML values within my browser's debugging tool.

What is the current bug behavior?

Only 100 of the available 125 projects are populated within the project selection drop-down.

What is the expected correct behavior?

All available projects are populated/usable within the project selection drop-down.

Relevant logs and/or screenshots

https://i.imgur.com/KYxXCjO.jpg

The left shows the HTML taken from the drop-down on GitLab.com, whereas the right shows the HTML taken from a self-managed instance running 13.0.0. Both use the same Jira user/integration options.

Output of checks

This bug occurs on GitLab.com as well as a self-managed instance running version 13.1+.

This bug did not occur on a 13.0.0 self-managed instance I had tested on.

(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes

Possibly introduced with this change.