Dear ALL,
I would like to implement an automation rule in order to append the last comment of an issue to the multi line text field of this issue without overwriting the existing lines.
My syntax is:
{ "update": { "customfield_27200": [{"set":"{{issue.comments.last.body}}"}] } }
but it doesn't work.
I have also tried with "set" (instead of "add") and it doesn't work either.
Can you please let me know?
I use Jira DC version 9.12.12.
Thanks in advance, Vincenzo.
In you automation rule, select the field where the comment needs to be added.
place first the smart value {{issue.,name of the custom field}}
Then add extra line (enter), twice.
On the second new line set the smart value {{issue.comments.last.body}}
Thanks @Marc - Devoteam.
Not sure I fully understand.
Do you mean from "Edit issue" to select my multi line text field and then to add {{issue.comments.last.body}} as for below:
Cheers, Vincenzo.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes the Edit action and select the multiline field
But add :
{{issue.For Information}} or {{issue.customfield_27200}}
{{issue.comments.last.body}}
The first smart value is to retina the original content.
Check which smart value you need to retain the original field value the name or custom field ID
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Marc - Devoteam,
tried out both cases and it didn't work for me.
I have logged the value of either
{{issue.For Information}} and {{issue.customfield_27200}}
and the log is empty actually.
Thanks, Vincenzo.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Then crate a variable first based on the custom field and then the edit.
Then use the variable instead of the
{{issue.For Information}} or {{issue.customfield_27200}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Marc - Devoteam,
thank You very much, now it works.
What about clearing up a specific line from the mutli-line text field?
Is this possible? I would like to clear a specific line up and NOT all the lines from the field.
Thanks, Vincenzo.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That would be tricky, as searching for text is fuzzy in Jira.
I would not do this in any case
Log all information (text) from the field and then edit the text field using an array so smart values.
Check:
The Replace or ReplaceAll functions:
Smartvaluestextfields-replace-Stringtarget-Stringreplacement
Smartvaluestextfields-replaceAll-Stringregex-Stringreplacement
But still if the text is not consistent the smart value clause would cause issues as they cloud remove or replace text you don't want to remove or changed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.