HI, sorry if this exists but i tried searching for it and i could not get the answer:
When i close the ticket, i want to save the last comment in a custom text field (my goal is to show this in a grid, its like a "closure comment" on the ticket:
i created a rule that updates the field using {{issue.comments.last.body}} or {{triggerissue.comments.last.body}}
It works! but it has 2 problems:
1. if the text is > 250, the rule returns an error. i can solve this with abbreviate:
{{triggerIssue.comment.last.body.abbreviate(255)}}
2. if the text is formatted, the saved text includes the formatting strings
{color:#1F497D}{color}....
Is there a way to directly save a plain text up to 255 characters of the last comment?
Hello @ariel_destefano
Welcome to the Atlassian community!
If you review the documentation on manipulating string/text smart values, you'll find information about "html renderer"
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/#html-render
The link in that section leads to this page:
Convert wiki markup to HTML or plain text in Jira automation
And that page says you can render Wiki as plain text by appending .text to the smart value, i.e:
{{issue.comments.last.body.text}}
welcome to the community!
I understand that you are planning to solve your use case using Automation, but just as food for thought: If you are open to solutions from the Atlassian Marketplace, there are apps that can help with this, too.
E.g., my team and I work on an app in which your use case would be easy to solve without any automation or scripting whatsoever, JXL for Jira.
JXL is a full-fledged spreadsheet/table view for your issues that allows viewing, inline-editing, sorting, and filtering by all your issue fields, much like you’d do in e.g. Excel or Google Sheets. It also comes with a number of so-called smart columns that aren’t natively available, including the last comment, along with many other comment-related columns.
This is how it looks in action:
As you can see above, you can easily sort and filter by the last comment; you can also use it across JXL's advanced features, such as support for (configurable) issue hierarchies, issue grouping by any issue field(s), sum-ups, or conditional formatting.
As said above, this just works - there is no automation or scripting whatsoever required.
Any questions just let me know,
Best,
Hannes
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.