Retrieve Issue Details Using the Jira Query Language (JQL)

The Jira Adapter enables you to define a Jira Query Language (JQL)-based query to send a request to query and retrieve issue details from the Jira application. This use case describes how to use the Jira Adapter to send a JQL query and write the response to a target file location.

In this use case, an FTP Adapter is used to write the data that you receive from Jira to a file. However, you can also use other applications.

  1. Create a scheduled orchestrated integration.
  2. Drag and drop an assign action into the integration canvas and create three variables:
    • $startAt=”0”
    • $Max=”2”
    • $Flag=”false”
  3. Drag a while action and specify the condition as follows:
    $Flag!=”true”
  4. Drag a Jira Adapter inside the while action and configure it with the JQL operation.
    1. On the Basic info page, provide an endpoint name, and click Next.
    2. On the Action page, select Query, and click Next.
    3. On the Operations page, select Jira Query Language (JQL).
    4. Select a project, an issue type, and enter or paste a query.
    5. If required, add a binding parameter in the query, click Refresh, and enter a value for the parameter in the text box.
    6. Click Test Query to validate the query, then click Next.
    7. On the Summary page, review your selections, and click Done.
  5. In the mapper, map the $maxResults variable to maxResults and the $startAt variable to startAt.
  6. Drag an FTP Adapter and configure it to write the data that you receive from Jira.
    1. On the Basic info page, provide an endpoint name.
    2. On the Operations page, select Write File from the Select Operation list.
    3. Select Binary from the Select a Transfer Mode list.
    4. Provide the output directory and file name pattern.
    5. On the Schema page, select No.
    6. On the Summary page, review your selections, and click Done.
  7. Perform the required mapping.
  8. Drag a switch action and specify the following IF condition.
    issues != ""
  9. Drag an assign action to update the specified $startAt variable as follows:
    startAt + $Max
  10. Drag an assign action into the Otherwise branch of the switch action to update the specified variable as follows:
    $Flag="true"
  11. When complete, save and activate the integration.
    The completed integration looks as follows.
    This integration consists of a schedule, an assign action, a while action, a mapper, a Jira Adapter, a mapper, an FTP Adapter, a switch action with two branches, and an end icon.

  12. After successful activation, you can submit the integration and monitor the runtime behavior in Oracle Integration. The integration keeps running until it completes all cycles of fetching results, respectively, to each page in the FTP location.
    Further in your orchestration, you can add adapters and actions as per your business requirement.