Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How do I post a new issue that includes a custom field value?

tareq ahmed
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!
November 10, 2022

Hello

So I'm using Power Automate to help manage tickets from a different platform and posting new tickets on our JIRA project board.

I can POST a new issue with a summary and description using the HTTP nodes. For our project we have an additional custom field that I'd like to be able to assign a value when we create a issue; this custom field shows up in the Details panel. I'm not using the built in connector that comes with Power Automate as the node doesn't seem to have a field that let's me create an issue with a custom field value. Instead, I'm using Power Automate HTTP node to do a POST request

The following JSON is what I'm passing to the HTTP Body which let's me create a ticket

{
"fields": {
"project":
{
"key": "TJP"
},
"summary": "New JIRA Ticket.",
"description": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Test ticket"
}
]
}
]
},
"issuetype":
{
"name": "Task"
}
}
}

 

What do I need to add to the above to populate the custom field? If it helps, I think I've narrowed the custom field's attribute to customfield_10054 (is there a simpler way to reference this? Will this change between different projects?)

Thank you

1 answer

0 votes
tareq ahmed
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!
November 10, 2022

Nevermind, it seems like I was referencing the wrong customfield reference as well as using the wrong attribute within the customfield. My json body now looks like this:

{
"fields": {
"project":
{
"key": "TJP"
},
"summary": "New task with customfield set",
"description": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Setting the task's Technology to PowerBI"
}
]
}
]
},
"issuetype":
{
"name": "Task"
},
"customfield_10055": {
"value":"PowerBI"
}
}
}

Still, is it possible to retain the customfield attribute name between different projects? I notice that for one project, that field is customfield_10055 (in this case) but it becomes something different in another.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events