> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/continuous-delivery/use-continuous-delivery/cd-building-blocks/cd-steps/ticketing-systems/create-cascading-fields-jira.md).

# 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](/continuous-delivery/use-continuous-delivery/cd-building-blocks/cd-steps/ticketing-systems/create-jira-issues-in-cd-stages.md#add-issue-fields).

This topic shows how to set a [cascading list](https://confluence.atlassian.com/jirakb/creating-dependent-cascading-lists-in-jira-server-datacenter-1142426572.html) using the [HTTP step](/continuous-delivery/use-continuous-delivery/cd-building-blocks/cd-steps/utilities/http-step.md). This unblocks integration with Jira projects that mark such fields as mandatory.

## What you will learn from this topic

* How to [configure the HTTP step](#configure-the-http-step) to create a Jira issue with a cascading field.
* How to [configure the Jira Update step](#configure-the-jira-update-step) to update the issue the HTTP step created.
* How to use the [sample pipeline YAML](#sample-pipeline-yaml) and [view the cascading list](#viewing-the-cascading-list-in-the-jira-issue) in the Jira issue.

***

## Before you begin

The following prerequisites apply to this topic:

* **Custom stage**: Create a pipeline with a [Custom stage](/harness-platform/use-harness-platform/pipelines/add-a-stage.md#add-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](/harness-platform/use-harness-platform/connectors/ticketing-systems/connect-to-jira.md) to create one.

***

## Configure the HTTP step <a href="#configure-the-http-step" id="configure-the-http-step"></a>

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:

  ```json
  {
  "fields": {
    "project": {
      "key": "TES"
     },
    "summary": "Testing select list (cascading)",
    "issuetype": {
      "id": "10003"
     },
    "customfield_10500": {
      "value": "Parent 1",
      "child": {
        "value": "P1 Child 1"
      }
    }
   }
  }
  ```
* **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 <a href="#configure-the-jira-update-step" id="configure-the-jira-update-step"></a>

Create a [Jira Update](/continuous-delivery/use-continuous-delivery/cd-building-blocks/cd-steps/ticketing-systems/update-jira-issues-in-cd-stages.md#add-a-jira-update-step) 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 <a href="#sample-pipeline-yaml" id="sample-pipeline-yaml"></a>

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

```yaml
pipeline:
  name: testJiraCustomFields
  identifier: testJiraCustomFields
  projectIdentifier: testNaman
  orgIdentifier: default
  tags: {}
  stages:
    - stage:
        name: testJiraCustomFields
        identifier: testJiraCustomFields
        description: ""
        type: Custom
        spec:
          execution:
            steps:
              - step:
                  type: Http
                  name: Http_1
                  identifier: Http_1
                  spec:
                    url: https://<your_JIRA_domain>/rest/api/2/issue
                    method: POST
                    headers:
                      - key: Content-Type
                        value: application/json
                      - key: Authorization
                        value: Basic <authorization_key_to_your_Jira_server>
                    inputVariables: []
                    outputVariables:
                      - name: issue_key
                        value: <+json.select("key", httpResponseBody)>
                        type: String
                    requestBody: |-
                      {
                        "fields": {
                          "project": {
                            "key": "TES"
                           },
                          "summary": "Testing select list (cascading)",
                          "issuetype": {
                            "id": "10003"
                           },
                          "customfield_10500": {
                            "value": "Parent 1",
                            "child": {
                              "value": "P1 Child 1"
                            }
                          }
                        }
                      }
                    assertion: <+httpResponseCode>==201
                  timeout: 10s
              - step:
                  type: JiraUpdate
                  name: JiraUpdate_1
                  identifier: JiraUpdate_1
                  spec:
                    connectorRef: jiraServer
                    issueKey: <+pipeline.stages.testJiraCustomFields.spec.execution.steps.Http_1.output.outputVariables.issue_key>
                    fields:
                      - name: Assignee
                        value: aut************@mailinator.com
                      - name: Description
                        value: This is updated description
                      - name: Priority
                        value: Medium
                    issueType: Task
                    projectKey: TES
                  timeout: 10m
        tags: {}

```

***

## View the cascading list in the Jira issue <a href="#viewing-the-cascading-list-in-the-jira-issue" id="viewing-the-cascading-list-in-the-jira-issue"></a>

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](https://3694223630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fy1JhZ4oKIppwY7d5AhPj%2Fuploads%2Fgit-blob-8244548bf727438fc53243ebe2a77c65d7833ede%2Fcascading-list-jira.png?alt=media)

***

## Next steps

* [Create Jira issues in CD stages](/continuous-delivery/use-continuous-delivery/cd-building-blocks/cd-steps/ticketing-systems/create-jira-issues-in-cd-stages.md): Create a Jira issue with the supported fields.
* [Update Jira issues in CD stages](/continuous-delivery/use-continuous-delivery/cd-building-blocks/cd-steps/ticketing-systems/update-jira-issues-in-cd-stages.md): Update a Jira issue from a pipeline step.
* [HTTP step](/continuous-delivery/use-continuous-delivery/cd-building-blocks/cd-steps/utilities/http-step.md): Configure the HTTP step in more detail.

{% @harness-feedback/feedback %}
