For the complete documentation index, see llms.txt. This page is also available as Markdown.

Use the HTTP step to set unsupported fields when creating Jira issues

Set unsupported Jira fields, such as cascading lists, when creating a Jira issue using the HTTP step.

This topic describes how to use the HTTP step to set Jira fields that Harness does not support, using a cascading list as an example.

By default, Harness does not support cascading lists and other custom field types. For the list of supported Jira fields, go to Add issue fields.

This topic shows how to set a cascading list using the HTTP step. This unblocks integration with Jira projects that mark such fields as mandatory.

What you will learn from this topic


Before you begin

The following prerequisites apply to this topic:

  • Custom stage: Create a pipeline with a Custom stage. You configure the steps in this topic under the Execution tab of the pipeline.

  • Jira connector: The Jira Update step requires a Jira connector. Go to Connect to Jira to create one.


Configure the HTTP step

In the HTTP step Step Parameters, configure the following fields:

  • URL: Enter your Jira server details. For example, https://<your_JIRA_domain>/rest/api/2/issue.

  • Method: Select the POST HTTP method.

  • Request Body: Enter the cURL command to create a task in project TES with a summary and cascading field with ID customfield_10500. Here is a sample:

  • Optional Configuration: Enter the following optional configurations.

    • Headers: Enter the following Key:Value information:

      • Content-Type: application/json

      • Authorization: Basic <authorization_key_to_your_Jira_server>

    • Output: Enter the variable name and value to get the Jira Issue Id from the pipeline output. For example:

      • Variable Name: <issue_key>

      • Value: Select the Expression input type and enter <+json.select("key", httpResponseBody)>


Configure the Jira Update step

Create a Jira Update step to update the Jira issue as a step during pipeline execution.

In the Jira Update step Step Parameters, configure the following fields:

  • Jira Connector: Select your Jira connector.

  • Issue Key: Enter the Jira issue key as an expression: <+pipeline.stages.testJiraCustomFields.spec.execution.steps.Http_1.output.outputVariables.issue_key>.


Sample pipeline YAML

The following sample pipeline combines the HTTP step and the Jira Update step:


View the cascading list in the Jira issue

After you configure the HTTP and Jira Update steps, run the pipeline. From the pipeline Output tab, copy the issue URL. In the Jira issue, you can see the cascading field as shown in the following image:

Cascading list field in the Jira issue

Next steps

Last updated

Was this helpful?