Hey all,
I am trying to capture information from the description and populate a custom field.
I am using the syntax below, but it is not working
{{issue.description.match("Slack Thread:(\d+).*")}}
The information on the description is:
Slack Thread: 1238787abceft
It seems you are on the right path by attempting to use smart values and regex (regular expressions) to extract specific parts of the text. However, if the provided syntax is not working as expected, let's review and adjust the approach:
```
{{issue.description.match("Slack Thread: ([a-zA-Z0-9]+).*")}}
```
This pattern `([a-zA-Z0-9]+)` is designed to match any combination of letters (`a-zA-Z`) and digits (`0-9`).
- Ensure that you are placing this syntax in the appropriate automation rule in Jira Cloud.
- In the rule, after capturing the value, you need to set the action to "Edit issue" and populate the custom field with the captured value. Make sure the custom field is designed to accept the type of data you're extracting (text string in this case).
- After implementing the adjusted regex, test the automation by creating or updating an issue with a description that includes a Slack Thread ID as described.
- Verify that the custom field is populated with the expected value.
- If the custom field is still not being populated, check the automation rule's audit log to identify any errors or warnings.
- Ensure that the automation rule has the necessary permissions to edit issues and modify custom fields.
Remember, regular expressions can be quite specific, and even minor discrepancies between the expected pattern and the actual text can cause mismatches. If further adjustments are needed, consider the exact format of the Slack Thread IDs you're working with and adjust the regex accordingly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.