Troubleshooting missing links between Builds and Issues

Problem

The integration between Jira Software (Cloud or Server) and Jenkins seems to be working, jobs and builds are synchronized from Jenkins to Jira but expected links between builds and issues are missing.

Solution

You can use the integration tester cli to check what information is parsed from job and build JSON responses from Jenkins and what texts are found that are considered for Jira issue matching.

  1. Download the CLI: integration-tester-cli-1.27.jar
  2. Download the Job and Build JSON files from Jenkins
    1. Either using your browser or a CLI tool like wget for cURL
    2. When using your browser, navigate to the root view of your job or build, for example: http://jenkins.example.com/job/my-ci-job for a job, or http://jenkins.example.com/job/my-ci-job/1/ for a build
    3. Append /api/json/ to the end of the URL in your browser, http://jenkins.example.com/job/my-ci-job/api/json/, this will show the JSON for the job.
    4. Save this JSON as file.
  3. Use the Integration Tester CLI to parse the Job and Build JSON files and use the -i or --identify-issues option to also identify any possible issue keys.


Parse Job JSON only for issue identification
$ java -jar integration-tester-cli-[version].jar parse-job --identify-issues --job-json path/to/job.json
Parse Build JSON only for issue identification
$ java -jar integration-tester-cli-[version].jar parse-build --identify-issues --build-json path/to/build.json
Parse Build JSON and include Job JSON for issue identification
$ java -jar integration-tester-cli-[version].jar parse-build --identify-issues --build-json path/to/build.json --job-json path/to/job.json