Automation Rule to remove worklog

プラットフォームについて: Cloud のみ - この記事は クラウド プラットフォームのアトラシアン製品に適用されます。

要約

Setup an automation rule that can allow removing their work log on an issue by a respective user by putting 0 in the custom field(Number Type) from the respective issue.

環境

Jira Cloud

ソリューション

Here is the suggestion:
The components used in the rule are the following:

  • Trigger - When value changes (Trigger the automation rule when the required number customer field is altered for all issue operations.)
  • Condition - Issue fields conditions (Check that the custom field is equal to 0)
  • Action - Send web request (Get all work logs attached to the issue - GET /rest/api/3/issue/{issueIdOrKey}/worklog/)
  • Advanced branch - For each smart value (Iterate through the list of work logs, detecting the author and deleting if the display name is the same as the initiator of the rule.)
    {{webResponse.body.worklogs.id}} 
    • Action - Send web request  (Get the individual worklog details - GET /rest/api/3/issue/{issueIdOrKey}/worklog/{id})
    • Condition - Advanced compare condition (Check that the Initiator of the rule and the display name on this specific work log are the same.)
    • Action - Send web request ( Delete the individual work log record if the above condition is met - DELETE /rest/api/3/issue/{issueIdOrKey}/worklog/{id})

Note: At all times, it is vital as an administrator to ensure that deleting objects conforms with your organization's policy. 

最終更新日: 2025 年 1 月 30 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.