[MNT-13631] Audit: endpoint /alfresco/service/api/audit/clear/{application}?fromTime={fromTime}&toTime={toTime} returns a number with currency format. Created: 17-Mar-15  Updated: 06-Nov-15  Resolved: 30-Mar-15

Status: Closed
Project: Service Packs and Hot Fixes
Component/s: Auditing
Affects Version/s: 4.2.3
Fix Version/s: 4.2.5

Type: Service Pack Request
Reporter: Kazuyuki Kono Assignee: Closed Bugs (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0 minutes
Time Spent: 1 day, 1 hour
Original Estimate: Not Specified

Attachments: File clear.post.json.ftl     PNG File clear_post_current.png     PNG File clearpost_fixed.png    
Issue Links:
Related
relates to MNT-12682 Request to implement setNumberFormat ... Closed
Bug Priority:
Category 4
ACT Numbers:

00340355

Build Location: https://releases.alfresco.com/Enterprise-4.2/4.2.5/build-00135/

 Description   

[Step to reproduce]
1. Enable Audit
2. Issue more than 1000 audit activities such as creates contents, delete contents.
3. Run this POST query

  /alfresco/service/api/audit/clear/{application}?fromTime={fromTime}&toTime={toTime} 

For example;
http://localhost:8080/alfresco/service/api/audit/clear/alfresco-access?fromTime=1410809790000&toTime=1510809790000

[Actual Behaviour]
It returns a number with currency format as follows, please find the attached screenshot named "clear_post_current" for further assistance.

{ "cleared" : 1,005 }

[Expected Behaviour]
It should return a number without comma.

{ "cleared" : 1005 }

[Work Around]
add "?c" after the forward of "${cleared" in clear.post.json.ftl as follows, which will remove the comma.
I attached the fixed file, and the corresponding screenshots clearpost_fixed.png for further assistance.

{
"cleared" : ${cleared?c}
}


Generated at Sun Oct 25 11:01:53 GMT 2020 using Jira 7.13.15#713015-sha1:7c5ddd2c3e1709974ae9c48c17df8edd3919fe2c.