Details
-
Bug
-
Resolution: Fixed
-
Low
-
8.10.0, 8.12.1
-
None
-
8.1
-
Severity 2 - Major
-
Description
Issue Summary
After upgrading to Jira <8.10.0,8.12.1>, opening certain pages in Advanced Audit Log displays a warning message "There was a a problem loading audit events" and logs NullPointerException.
Cause:
Jira 8.8.0 introduces Advanced Audit Log feature. During application upgrade, before the feature is enabled, audit log entries are migrated from legacy tables into new one. Several events were migrated incorrectly, populating null value for AuditAttribute class fields. Displaying audit log entries fails when event with such empty value is on the paginated list of events.
Affected incorrectly migrated events:
ServiceDeletedEvent EmailQueueFlashedEvent JiraUpgradeStartedEvent JiraUpgradeCancelledEvent JiraUpgradeApprovedEvent JiraUpgradeFinishedEvent JiraUpgradeFailedEvent ServiceDeletedEvent FieldScreenFieldMovedEvent FieldScreenTabMovedEvent UserAnonymizationStartedEvent UserAnonymizationFinishedEvent
Steps to Reproduce
- On affected Jira version, upgraded from Jira 8.7.1 or older
- Navigate to "Audit Log" functionality
- Browse to pages with past audit entries that could contain one of above events.
Expected Results
Audit events are displayed properly
Actual Results
The below exception is thrown in the atlassian-jira.log file:
2020-08-03 05:21:34,043 ERROR [http-nio-7990-exec-3] admin @16EV92Ex321x1178x0 p0px85 172.29.141.177 "GET /rest/auditing/1.0/events HTTP/1.1 java.lang.NullPointerException: null at java.base/java.util.Objects.requireNonNull(Objects.java:221) at com.atlassian.audit.rest.model.AuditAttributeJson.<init>(AuditAttributeJson.java:31) at com.atlassian.audit.rest.utils.AuditEntitySerializer.toJson(AuditEntitySerializer.java:82) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) at java.base/java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1603)
Workaround
- If the error is already visible on the first page with audit entries, generate new entries by simply using the instance. Newly registered audit events should "push out" incorrectly migrated events to next pages unlocking general Advanced Audit Log view.
- Upgrade to Jira 8.12.2 or newer
- Contact Support in case none of above options is applicable.