Automation rule| Automation rule to monitor Issue Limits on Jira issues.
Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.
Summary
As Atlassian has announced changes: Upcoming changes: Introducing per issue limits for list fields in Jira Issues it would be nice to have an automated approach to monitor the approaching limit on issue and notify the respective stakeholder. We can have this monitoring with the automation rule.This article will aid in setting up the automated notification, mentioned on the Feature request : Monitor Jira Issue Limits. We will be utilizing API rolled out as part of the Feature Request in automation rule.
Environment
Jira cloud
Solution
Trigger : Scheduled (Set schedule as per your feasibility)
Send Webrequest :
https://YOURSITENAME/rest/api/3/issue/limit/report?isReturningKeys=true
HTTP Method: Get
Web Request Body: Custom Body
Custom Data :
{"issuesApproachingLimitParams": {"comment": 4500, "attachment": 1600, "issuelinks": 1600, "remoteIssueLinks": 1600, "worklog": 9000}}
Enable : Delay execution of subsequent rule actions until we've received a response for this web request
Authorization : Basic <encoded to base64 USERNAMEANDTOKEN>
Rest API Call details
Please refer to this article for more details on Encoding to Base64 and how to use web request in automation rule : https://community.atlassian.com/forums/Jira-articles/Automation-for-Jira-Send-web-request-using-Jira-REST-API/ba-p/1443828
If Block:
Conditions :Smart Value condition
{{webResponse.body.issuesBreachingLimit}}
Condition: doesnot equal to
Second Value : {}
OR
{{webResponse.body.issuesApproachingLimit}}
Condition: doesnot equal to
Second Value : {}
Send email:
To : <Desired USER>
Subject: Alert for Issue Limit
Hi Team,
Please find the issues reached limit
Issues Approaching Limit : {{webResponse.body.issuesApproachingLimit}}
Issues Breaching Limit : {{webResponse.body.issuesBreachingLimit}}
Please note that this rule will trigger the email to the user before reaching the limit :
"comment": 4500,
"attachment": 1600,
"issuelinks": 1600,
"remoteIssueLinks": 1600,
"worklog": 9000
While actual limit on Issue by Atlassian are :
Comments are limited to 5000 per issue.
Worklogs are limited to 10000 per issue.
Attachments are limited to 2000 per issue.
Linked issues are limited to 2000 per issue. This does not include child issues.
Remote links are limited to 2000 per issue
You can adjust the alerting limit as per your requirement.