Forums

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

Automation that copy summary value to the custom field

izabela.majer September 5, 2024

Hi,

A little background on my problem: I am a Structure user. When I try to group issues by Epic in the structure, sub-tasks are shown as "epic-less" (there is no more Epic link, and it is replaced by Parent Link, there can only be one parent which in case of my sub-tasks is a story). So I thought I could have an automation that would push Epic summary info the custom fields. And then another automation would copy values of this custom link from it's parent.

I created atuoation for pushing summary to custom field like this:

{ "update": { "RobotName": [ { "set": { "value": "{{issue.fields.Summary.value}}" } } ] } }

 

I tried also:

 

{ "update": { "RobotName": [ { "set": { "value": "{{issue.fields.Summary.value.asJsonString}}" } } ] } }

And each time logs return an error:

 

 

AAAA-123 (Operation value must be a string (customfield_10050))

 

What am I doing wrong here? Do you maybe have another idea to "overcome" lack of epic link in sub-tasks?

1 answer

0 votes
Jim Knepley - ReleaseTEAM
Atlassian Partner
September 5, 2024

Maybe try "{{issue.summary}}" instead of "{{issue.fields.Summary.value.asJsonString}}" ?

ref: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/

 

izabela.majer September 6, 2024

Hi,

I also tried with this one, but the result remains the same. Seems to me like it does not see Summary as a string?

Jim Knepley - ReleaseTEAM
Atlassian Partner
September 6, 2024

Passing a list the way you are should work, but who knows?

Instead of;

{ "update": { "RobotName": [ { "set": { "value": "{{issue.fields.Summary.value.asJsonString}}" } } ] } }

Maybe try:

{ "update": { "RobotName": { "set": { "value": "{{issue.fields.Summary.value.asJsonString}}" } } } }

Note the removal of the [square brackets]; if it's being interpreted as a list instead of a string, that could explain the error, even though a list is supposed to be OK there.

izabela.majer September 9, 2024

Now it copies whole "code":

{ "update": { "RobotName": { "set": { "value": "{{issue.fields.Summary.value.asJsonString}}" } } } }

as a value in the fied

Suggest an answer

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

Atlassian Community Events