Zum Ende der Metadaten springen
Zum Anfang der Metadaten

Sie zeigen eine alte Version dieser Seite an. Zeigen Sie die aktuelle Version an.

Unterschiede anzeigen Seitenhistorie anzeigen

« Vorherige Version anzeigen Version 2 Aktuelle »

Here is an example of an Automation for adding the issue key with a hashtag to work logs synchronized to MOCO with advanced synchronization.

image-20240712-065123.png
  1. Trigger: Work was logged

  2. {{smart values}} condition:

    1. First value: {{worklog.comment}}

    2. Condition: does not match regular expression

    3. Regular expression: ^#.*$

  3. 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 )

    1. URL: {{baseUrl}}/rest/api/3/issue/{{issue.key}}/worklog/{{worklog.id}}

    2. HTTP-Method: PUT

    3. Web request body: Custom data

    4. Custom data:

      {
        "comment": {
          "content": [
            {
              "content": [
                {
                  "text": "#{{issue.key}} {{worklog.comment}}",
                  "type": "text"
                }
              ],
              "type": "paragraph"
            }
          ],
          "type": "doc",
          "version": 1
        }
      }
    5. Header

image-20240710-085748.png

With this Automation, every time work is logged, the issue key with a hashtag is added to the comment at the beginning if it does not already start with a hashtag.

  • Keine Stichwörter