Jira integration with jobs

If your organization is using Altassian Jira and also uses the built-in jobs feature of P4 Server, you might want the Job link Jira integration, which provides more functionality than the Basic Jira integration by linking with jobs. A P4 Server job is a numbered (or named) work request managed by P4 Server. For an introduction to this built-in feature of the P4 Server, see the Jobs section in the P4 CLI Reference.

Overview of Jira integration with jobs

The P4 Code Review integration with Jira that supports job links includes the functionality of Basic Jira integration and adds functionality related to jobs.

In P4 Code Review:

  • Creates hyperlinks to Jira issues referenced in changelist descriptions, review descriptions, and review comments.

  • Creates hyperlinks to associated Jira issues on the P4 Code Review job page.

  • In the Issue Links section of the Jira issue:

    • Creates hyperlinks to the associated P4 Code Review job, changelist (commit), and review pages.

    • When a P4 Server job is created, creates a hyperlink to the P4 Code Review job page.

    • If a job is added to a review, creates a hyperlink to the review page.

    • For fixes (p4 fix) to a job, when the job_field is set, creates a hyperlink to the P4 Code Review changelist (commit) page.

    • When P4 DTG replication detects a change to an issue, creates a job link for the associated Jira issue if it does not already exist.

Job link workflow with P4V

This section describes the workflow for Jira integration and job links in Jira issues when you request a new review from the P4 Visual Client (P4V). The process for adding a job and creating a review differs for the other clients, but the P4 Code Review worker and P4 Defect Tracking Gateway (P4 DTG) workflow is the same.

  1. Create a new Jira issue in your Jira system. P4 DTG detects the new Jira issue and creates a new Perforce job for that Jira issue.
  2. Add the new Perforce job to a pending changelist in P4V. See Add a job to a pending changelist in the P4 Visual Client (P4V) Documentation.
  3. Request a new review for the pending changelist in P4V. See Request a review in the P4 Visual Client (P4V) Documentation.

    P4V passes the review request to the P4 Code Review worker queue. The review request is processed by the next available P4 Code Review worker, the new review is created. P4 Code Review checks its Jira configuration. If the job_field exists in the Perforce job, P4 Code Review adds a link to the new Perforce job in the Issue Links section of the Jira issue.

To check that these steps have been completed and to view the links:

  1. Open the new review. The associated Perforce jobs are displayed on the review page below the review description.
  2. Click the Perforce job link to open the job. The review link is displayed on the job page below the job description.
  3. Click the Details tab on the Perforce job page to view the DTG_DTISSUE field.
  4. Click the Jira link in the DTG_DTISSUE field to view the Jira issue. The review and Perforce job links are displayed in the Issue Links section of the Jira issue page.