Adobe-Consulting-Services / acs-aem-commons

http://adobe-consulting-services.github.io/acs-aem-commons/
Apache License 2.0
453 stars 600 forks source link

ACS Reports - Page replication status always NOT_ACTIVATED when downloading report as csv #2509

Open Semperdecus opened 3 years ago

Semperdecus commented 3 years ago

Required Information

Expected Behavior

When I use ACS reports to build a new report and use the replication status component in the report columns, I get correct replication status when exporting to csv.

image

Actual Behavior

When I use ACS reports to build a new report and use the replication status component in the report columns, I do NOT get correct replication status when exporting to csv. The status us always "NOT_ACTIVATED"

image

The webpage works fine:

image

Steps to Reproduce

The issue can be replicated in vanilla AEM and latest ACS with a custom report to check for any property value and that has replication status as a report column. The replication status is always NOT_ACTIVATED.

Links

Reported previously, but always auto-closed:

https://github.com/Adobe-Consulting-Services/acs-aem-commons/issues/2333 https://github.com/Adobe-Consulting-Services/acs-aem-commons/issues/2115 https://github.com/Adobe-Consulting-Services/acs-aem-commons/issues/1399

Concerning this class: https://github.com/Adobe-Consulting-Services/acs-aem-commons/blob/master/bundle/src/main/java/com/adobe/acs/commons/reports/models/PageReplicationStatusModel.java

Possible solution

In PageReplicationStatusModel.java line 71 the path is always the same and does not use the proper resource. A dirty fix is to change the getValue (line 103) method in PageReplicationStatusModel.java:

From:

  @Override
  public String getValue(Object result) {
    return getReplicationStatus();
  }

To:

  @Override
  public String getValue(Object result) {
    resource = (Resource) result;
    return getReplicationStatus();
  }
DasAnk commented 2 years ago

This issue is reproducible on 5.0.6 (version I checked with). If the possible solution above is the fix, could this be baked into the product?

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.