Automation Rules admin page is broken and displays a template error in Jira

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

    

Summary

The global Automation Rules admin page displays a template error and it's not possible to use it or even see the automation rules.

Example error:

Environment

Automation for Jira up to 7.2.8.

MS SQL Server database.


Diagnosis

Upon accessing the Automation Rule admin screen, a tem plate error is exhibited like:

com.google.template.soy.tofu.SoyTofuException: In 'print' tag, expression "$localeString" evaluates to undefined.

And in the atlassian-jira.log, prior to this error, there's a SQL error:

2021-03-17 18:07:01,345 http-nio-8080-exec-27 ERROR admin 869x15542657x3 13rfhg7 127.0.0.1 /secure/AutomationGlobalAdminAction!iframe.jspa [c.c.j.p.a.web.admin.AutomationGlobalAdminAction] Unexpected error loading global automation UI:
com.querydsl.core.QueryException: Caught SQLServerException for select "AO_589059_RULE_STATE_LATEST"."CURRENT_AUDIT_ID", "AO_589059_RULE_STATE_LATEST"."CURRENT_CATEGORY", "AO_589059_RULE_STATE_LATEST"."CURRENT_CREATED", "AO_589059_RULE_STATE_LATEST"."ID", "AO_589059_RULE_STATE_LATEST"."PREVIOUS_AUDIT_ID", "AO_589059_RULE_STATE_LATEST"."PREVIOUS_CATEGORY", "AO_589059_RULE_STATE_LATEST"."PREVIOUS_CREATED", "AO_589059_RULE_STATE_LATEST"."RULE_ID", "AO_589059_RULE_STATE_LATEST"."EXEC_COUNT"
from "dbo"."AO_589059_RULE_STATE_LATEST" "AO_589059_RULE_STATE_LATEST"
where "AO_589059_RULE_STATE_LATEST"."RULE_ID" in (?, ?, ?, ?, ........,?)
...
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The incoming request has too many parameters. The server supports a maximum of 2100 parameters. Reduce the number of parameters and resend the request.


Cause

This issue's caused because Automation for Jira queries the database passing every Automation Rule id as a parameter when building the admin screen. MS SQL Server has a limit of 2100 query parameters so when there are more than 2100 Automation Rules the admin screen breaks.

Automation Rules continue to run unhindered — it's "just" the admin screen that breaks.

JIRAAUTOSERVER-241 - Getting issue details... STATUS


Solution

Until JIRAAUTOSERVER-241 is fixed and Automation for Jira's updated to a fixed version in your instance, the only solution is to workaround it by deleting some Automation Rules directly on the database.

This KB on How to manually delete an Automation Rule on the database in Jira offers the step-by-step to accomplish that. You should delete enough rules so they count less than 2100:

select count(*) from "AO_589059_RULE_CONFIG";



Last modified on Mar 17, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.