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

Creating Automation and Setting Team in Separate Project

Jon Hayward-Crichton
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!
May 21, 2024

Hello,

I'm having issues with configuring a 'create a new bug' ticket.

The way we work is we have a TS (technical support) ticket in the TS project, which then will create a SD (Software Development) ticket in the SD project.

The problem I'm having is creating the new ticket and setting the 'Team'

This doesn't appear to be a new custom field. So I can't find anything but "Team[Team]" as to it's ID.

{
"update": {
"Team[Team]": {
"set": "team-id-string"
},
},
},
{
"fields": {
"environment": "Thanks for raising {{issue.key}}.",
"labels": [
"Finance & Integration",
"Bug Fix"
],
"Custom Field Name": {
"value": "red"
},
},
}

But for some reason I keep getting 'Error while parsing additional fields. Not valid JSON.'

I'm scratching my head, what am I missing when connecting between projects? 

1 answer

1 vote
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 21, 2024

Hello @Jon Hayward-Crichton 

Welcome to the Atlassian community.

Your first problem is that you JSON syntax is, in fact, not valid. You have left the sample text in the field.

Everything from line 8 to to bottom is the same text, and you need to remove it. You also need to review the comma at the end of line 7.

{
"update": {
"Team[Team]": {
"set": "team-id-string"
},
},
},
{
"fields": {
"environment": "Thanks for raising {{issue.key}}.",
"labels": [
"Finance & Integration",
"Bug Fix"
],
"Custom Field Name": {
"value": "red"
},
},
}

In the JSON editing you use either the "update" block or the "fields" block, not both.

 

If that doesn't completely solve your problems with setting the Team field, then refer to the answer on this post for details about how to set the Team field using advanced JSON editing:

https://community.atlassian.com/t5/Jira-questions/Is-it-possible-to-edit-the-quot-Team-quot-field-through-Jira/qaq-p/1648833

Jon Hayward-Crichton
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!
May 22, 2024

Hi Trudy,

Thank you for the link, it helped explain quite a lot. Especially how to get the custom field value as the other documentation I found used inspector on the page and that data has since been removed.

This solution worked and it succeeded!

{
"fields": {
"customfield_#####": "#################"
}
}

 The only other question I have is that in terms of automations, is the JSON update the only time you can modify the attached ticket, or is there another block you can use to update the attached ticket in the other project?

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 22, 2024

There are multiple Automation actions that can be used to modify issues, such as the Edit Issues and Comment Issue action. These can be used to modify the issue that triggers the rule or other issues, depending on how the rule is structured. It just depends on what you need to do.

Suggest an answer

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

Atlassian Community Events