Pull issues from a JIRA Project using the REST API
Create a service or job to robustly draw down all issues for a JIRA project using their REST API.
- Use installed
jira-ruby
gem; - Order issues by
created_at
or sequential ID; - Handle pagination, e.g. 100 issues per page, so that jobs can be run in parallel, and
- Ensure that issues that have been created since the job started are picked up.
Note It's important to use the jira-ruby
gem for predictable serialization of issues, so that work to map to GitLab issues can happen in parallel.
Questions to answer
-
Can issues be sorted by created_at or another sequential ID - yes, we can sort issues when pulling from jira by created at. Thank should give us a constant order of issues and we can then paginate through those.
-
Should pages be entered as Sidekiq jobs or one job per issue? Or other? (Affects #208917 (closed)) - I think it should be a combination of 2. If we would have to import 100K or more issues we would want to pull them in batches of say 1K and then have a import worker for each issue.
Edited by Alexandru Croitor