How do I add a line break inside the Edit Object automation node for a textarea attribute?

Josh Schoenick
Contributor
December 18, 2024

I have a Notes attribute on an object. It is presumed that this field already contains text.

Via automation I'm using a For AQL branching node to select the object from Assets

Then for that object I'm using the Edit Object node to edit the Notes attribute.

I have it working to add the value of a custom field and the previous Notes value.

{{issue.customfield_99999}} {{object.Notes}}

But no matter what I do, I cannot create a line break between the two to create a visual separation between the two.

For Edit Issue, you have a multi-line component which allows you to insert the line break manually in the Edit Issue node.

For Edit Object, it's rendered as a text component, not a multi-line component.

{{issue.customfield_99999}} /r/n {{object.Notes}} renders the /r/n literally
{{issue.customfield_99999}} <br> {{object.Notes}} renders as a space.

automation-linebreak.pngautomation-linebreak 2.pngautomation-linebreak 3.png

1 answer

1 accepted

0 votes
Answer accepted
Bill Sheboy
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.
December 18, 2024

Hi @Josh Schoenick 

For more context, please show images of your complete rule, the Edit Object action, and the audit log details showing the rule execution.

Kind regards,
Bill

Josh Schoenick
Contributor
December 19, 2024

Done. Thanks for the reminder Bill.

Bill Sheboy
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.
December 19, 2024

Thanks, Josh.

Perhaps try using \n instead, or concatenating on the newline:

{{issue.customfield_99999.concat("\n")}} {{object.Notes}}

 

Josh Schoenick
Contributor
December 19, 2024

The .concat("\n") works. The only trick is that you have to end the line with a smartvalue in order to apply the workaround.
---

[CODE]
{{now.mediumDateTime}} by {{initiator.displayName.concat("\n")}}Wireless Number was CHANGED from {{object.Wireless Number}} to {{issue.customfield_14058.concat("\n\n")}}{{object.Notes}}

 

[RESULT]
automation-fix1.png

Like Bill Sheboy likes this

Suggest an answer

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

Atlassian Community Events