On this page
Use case
Copy an excerpted value from the last comment using two delimiters when a new comment is posted and update a field with it.
Configuration
Create a new rule and name it appropriately.
Providing a description will help you to identify what the rule does but this step is optional.
Issue event
Add a Trigger → Issue event → Issue Commented
No further configuration is needed.
Boolean condition
Add a Condition → Boolean condition
Expression
Adjust the following expression to restrict the scope of the automation to the project of your choice.
%{trigger.issue.project.key} = "PKEY"
Update field action
Next to the boolean condition, add an Action → Update field
Field
For this use case, we will update the field Assignee.
Update to
Choose Value returned by parsed expression
Parser Expression
Set the mode to Advanced text and enter the following Parser Expression
first(findPattern(%{trigger.issue.lastComment}, "(?<=Assign to the user with ).*(?= username)"))
By replacing the texts "Assign to the user with " and " username" in the previous expression, you will be able to set different delimiters. The text between these delimiters will be copied.
Import the example
Import the JSON file below to get started in no time.
Related use cases
If you still have questions, feel free to refer to our support team.