-
Bug
-
Resolution: Won't Fix
-
Low
-
None
-
9.0.1
-
Severity 2 - Major
Issue Summary
A4J refers to "Automation For Jira"
Automation rules that were configured with a Webhook URL that has more than 255 characters while A4J was on a version lower than 9.0.1 disappear from the UI and do not execute after upgrading A4J to 9.0.1 or any higher version.
Impacted rules: Rules with actions supporting secrets and having Webhook URLs of more than 255 characters (which got automatically converted into "Secrets" after the A4J upgrade to 9.0.1 and any higher version).
This is reproducible on Data Center: Yes
Steps to Reproduce
- Create a rule with a Webhook URL that has more than 255 characters on A4J version lower than 9.0.1
- Upgrade A4J to version 9.0.1 or higher
Expected Results
The rule should remain accessible from UI and should execute as per defined triggers.
Actual Results
- Created rule disappeared from UI and is not getting executed.
- The disappeared rule does not seem to be causing any other issues, but it is present in database.
- The below exception is thrown in the application log file:
2024-11-08 16:32:54,246+0000 http-nio-8080-exec-84 WARN admin 992x40711x1 1ew541j 172.29.182.65,10.9.31.44 /secure/AutomationGlobalAdminAction!iframe.jspa [c.c.a.api.store.RuleConfigToBeanTransformer] Error while converting rule config: 3 Slack notification com.querydsl.core.QueryException: Caught PSQLException for insert into "public"."AO_589059_RULE_SECRET" ("KEY", "VALUE") values (?, ?) at com.querydsl.sql.DefaultSQLExceptionTranslator.translate(DefaultSQLExceptionTranslator.java:50) at com.querydsl.sql.Configuration.translate(Configuration.java:459)
Workaround
Recreate the disappeared rule after creating necessary secrets keys.
One way to identify why rules might have disappeared due to this bug is to query the Jira Database using the SQL query below:
SELECT r."ID" as "Rule Id", r."NAME" as "Rule name", t."TYPE" as "Rule trigger", (t."VALUE"::json)->>'webhookUrl' AS webhook_url, p.pkey as "Project Key", p.id as "Project Id", au.lower_user_name as "Rule author" FROM "AO_589059_RULE_CONFIG" r LEFT JOIN "AO_589059_RULE_CFG_COMPONENT" t ON t."RULE_CONFIG_ID" = r."ID" AND t."COMPONENT" = 'ACTION' LEFT JOIN "AO_589059_RULE_CFG_PROJ_ASSOC" rp ON rp."RULE_CONFIG_ID" = r."ID" LEFT JOIN project p ON concat(p.id, '') = rp."PROJECT_ID" LEFT JOIN app_user au ON au.user_key = r."AUTHOR_KEY" WHERE r."STATE" = 'ENABLED' AND t."TYPE" IN ('msteams.notification') AND LENGTH((t."VALUE"::json)->>'webhookUrl') > 255 AND ((t."VALUE"::json)->>'webhookUrl') NOT LIKE '{"key"%' ORDER BY r."NAME" ASC, p.pkey ASC;
Note that the SQL query above was only written and tested for PostgreSQL.
- relates to
-
JIRAAUTOSERVER-972 Automation secret keys can't exceed 255 characters
-
- Closed
-
- links to