Here is an example of an Automation for adding the issue key with a hashtag to work logs synchronized to MOCO with advanced synchronization.
...
Trigger: Work was logged
If-else condition
If the comment in the work log already starts with a hashtag, nothing will happen. Only the comment of the work log is logged.
Else, a {{smart values}} condition:
First value: {{worklog.comment}}
Condition: does not match regular expression
Regular expression: ^#.*$
A web request is executed that updates the work log (https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-worklogs/#api-rest-api-3-issue-issueidorkey-worklog-id-put )
URL: {{baseUrl}}/rest/api/3/issue/{{issue.key}}/worklog/{{worklog.id}}
HTTP-Method: PUT
Web request body: Custom data
Custom data:
Codeblock { "comment": { "content": [ { "content": [ { "text": "#{{issue.key}} {{worklog.comment}}", "type": "text" } ], "type": "paragraph" } ], "type": "doc", "version": 1 } }
Header
Key: Authorization
Value: Basic ******* (A Basic Authorization Token, preferably of an admin user, must be created here: https://developer.atlassian.com/cloud/jira/platform/basic-auth-for-rest-apis/
...