Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-29297

String and Date workflow variables are not recorded in the audit trail

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 10.10
    • Fix Version/s: 10.10-HF32, 11.3, 2021.0
    • Component/s: Audit

      Description

      The Json writer incorrectly filter variables and keeps only primitive types which automatically exclude String and Date

      https://github.com/nuxeo/nuxeo/blob/2387c0ba417810c3b68fd8d51795b46cdee6f579/modules/platform/nuxeo-platform-audit/nuxeo-platform-audit-core/src/main/java/org/nuxeo/ecm/platform/audit/io/LogEntryJsonWriter.java#L156

            Map<String, Serializable> map = //
                          ((Map<String, Serializable>) value).entrySet()
                                                             .stream()
                                                             // keep primitive values
                                                             // blobs can be in WorkflowVariables for instance
                                                             .filter(entry -> entry.getValue() != null
                                                                     && ClassUtils.isPrimitiveOrWrapper(
                                                                             entry.getValue().getClass()))
                                                             .collect(Collectors.toMap(Entry::getKey, Entry::getValue));
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 30 minutes
                  1h 30m

                    PagerDuty

                    Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.