acs-aem-commons icon indicating copy to clipboard operation
acs-aem-commons copied to clipboard

Replication Status is always rendered as NOT_ACTIVATED when downloading the Report as CSV

Open gquintillan opened this issue 3 years ago • 5 comments

Required Information

  • [X] AEM Version, including Service Packs, Cumulative Fix Packs, etc: AEM 6.5.12
  • [X] ACS AEM Commons Version: 5.0.14
  • [X] Reproducible on Latest? yes, tested also in 5.2.0

Expected Behavior

When downloading a report as CSV the "Replication Status Column" (documentation) must show the same value than in the HTML rendered report.

Actual Behavior

When downloading a report as CSV the "Replication Status Column" always shows the status "NOT_ACTIVATED"

image

After debugging the code this is what I found:

  • PageReplicationStatusModel -> getReplicationStatus() ignores the Resource that is passed as a parameter: https://github.com/Adobe-Consulting-Services/acs-aem-commons/blob/master/bundle/src/main/java/com/adobe/acs/commons/reports/models/PageReplicationStatusModel.java#L104
  • Instead it uses the resource that represents the Replication Status Column (the column definition).
  • ReplicationStatus is null and the default value "Status.NOT_ACTIVATED" is used. image

Steps to Reproduce

  1. Navigate to ACS Commons Reports: /apps/acs-commons/content/reports.html
  2. Open the sample Page Report: /editor.html/var/acs-commons/reports/sample-page-report.html
  3. Select the "Path" of a known site, for instance: /content/we-retail (make sure that there are published pages)
  4. Click on "Execute Report.
  5. Click on "Download Report"
  6. Compare the Replication Status Column.

Links

  • Report Builder, Replication Status Column documentation: https://adobe-consulting-services.github.io/acs-aem-commons/features/report-builder/configuring.html
  • ReportCSVExportServlet code: https://github.com/Adobe-Consulting-Services/acs-aem-commons/blob/master/bundle/src/main/java/com/adobe/acs/commons/reports/internal/ReportCSVExportServlet.java#L165
  • PageReplicationStatusModel code: https://github.com/Adobe-Consulting-Services/acs-aem-commons/blob/master/bundle/src/main/java/com/adobe/acs/commons/reports/models/PageReplicationStatusModel.java#L104

gquintillan avatar Apr 04 '22 11:04 gquintillan

Fixed with https://github.com/Adobe-Consulting-Services/acs-aem-commons/pull/2820

davidjgonzalez avatar Apr 08 '22 21:04 davidjgonzalez

Fixed with #2820

Thank you!

gquintillan avatar Apr 09 '22 03:04 gquintillan

Fixed in 5.3.0

davidjgonzalez avatar Sep 29 '22 13:09 davidjgonzalez

This issue still exists with version 5.3.0 - Can this task be re-opened ?

gouli avatar Jul 24 '23 21:07 gouli

Sure - can you PR a fix when you have a moment? Might be helpful to post your AEM version and ACS Commons version as well - since this was fixed before and now seems to have broken again; will be interesting to understand the cause a bit more.

davidjgonzalez avatar Jul 24 '23 22:07 davidjgonzalez