Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,361,617
Community Members
 
Community Events
168
Community Groups

Copying "Team" field from one JIRA project to another

Edited

I still don't understand why Atlassian "locked" the "Team" field and made it so complicated to use,  but that's besides the point. 

I am working on automation to create an issue in a project with the mandatory "Team" field, when some workflow transition happens in another project. The project field doesn't show on the list of the available fields in "Choose fields..." drop-down:

Copy Team.jpg

Is there another option (JSON?) to do so, similar to a cascading select list? I'd greatly appreciate community's help. Please let me know if you have any questions.

I've tried the below JSON option, but it doesn't work:

{
"update": {
"customfield_13600": [
{
"set": {
"value": "{{triggerIssue.fields.customfield_13600.value}}"
}
}
]
}
}

2 answers

I've tried it without [ ] and with the "field" syntax as well as setting up a Log Action. The {{customfield_13600}} came back empty, while it brought corresponding value when I used it for another "regular" field. My guess is the "Team" field acts differently from other fields and I'd need to wait for Atlassian to fulfill a long promised change to this field. Unless someone could prove me wrong, which I'd gladly accept.

0 votes

Hello @Gregory Kremer 

What is the output in the Audit Log for the rule when it executes?

Have you tried adding Log Actions to output the value of the custom fields before and after the update, for each issue?

From this post it looks like you need to use the numeric ID associated with the Team when setting the field. If you use the Log Action action to log the values to the audit log, you'll be able to confirm that you are getting the Team ID from the original field.

@Trudy Claspill ,

Thank you for your reply. The solution you've suggested wouldn't work for me as the premise is completely different from the case you have suggested. In that case they needed to automatically populate the "Team" field with a specific/single team. I, on the other hand, need to copy exact team name into a field in a different project. 

Oh, and the log file tells me that the automation didn't work because the "Team" field is mandatory, which means that my JSON either doesn't work (incorrect), or wouldn't work at all with the "Team" field.

Have you tried using Log Action actions to output the values to the rule Audit Log to confirm that you are actually getting values with the code you have used?

Have you tried removing the square brackets?

{
"update": {
"customfield_13600": {
"set": {
"value": "{{triggerIssue.fields.customfield_13600.value}}"
}
}
}
}

Have you tried the "fields" syntax?

{
"fields": {
"customfield_13600": "{{triggerIssue.fields.customfield_13600.value}}"
}
}

Unfortunately I have not yet found any posts where a user was trying to copy the value of the Team field from a trigger issue to a related issue in Automation. And I don't have access to a Premium subscription to experiment with this more myself.

The only other option I can think of would be to use the Send Web Request action to access the JIRA REST API to try to get the original value and post it into the other issue.

Sorry I could not provide better assistance.

Trudy,

Thank you for your time and effort. There is nothing to be sorry about - some things just don't work the way we want them to.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS

Atlassian Community Events