Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Accessing ticket custom field (checkbox) value

Chaturanga Jayasinghe
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 22, 2023

Hi, 

I'm sending a web request from Jira to Azure to trigger a pipeline. In the web request I'm sending the issue key by simply using {{issue.key}}

I also want to send the value of the custom field "environment" which is a checkbox. The field have a value for the ticket I'm trying send. Note that I have two fields in my jira project as Environment. One field is a text field and the other is a checkbox. I want to access the checkbox field value. 


My request body is as follows:

{
"resources": {
"repositories": {
"self": { "refName": "refs/heads/main" }
}
},
"templateParameters": {
"testPlanKey": "{{issue.key}}",
"targetEnvironment": "{{issue.Environment.name}}"
}
}

 

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 22, 2023

Welcome to the Atlassian Community!

I am not sure I have understood the question, but https://library.adaptavist.com/entity/basics-updating-customfields-cloud?tab=cloud shows you how to set a custom field value.  For select lists and checkboxes, the value should be the name of the option you want to set  (If, for example, your checkboxes field for "colour" has options Red, Yellow and Blue, then send "Yellow" to get the tick next to the yellow option)

Chaturanga Jayasinghe
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 23, 2023

I'm triggering my Azure Pipeline from the Jira Automation rule. In this rule, I'm sending a Web Request using the Web Request Component in the rules. I'm triggering the automation rule from a Jira ticket. 

So in this web request ( I have posted the request body above) body, I'm sending the Jira Issue Key, which is working fine. The Jira issue/ticket also have a custom field named as "Environment". I want to pass the value of this field also in this request. I tried passing this value like in the web request I posted above. But it is not working.

TAGS
AUG Leaders

Atlassian Community Events