API-1014 : Invalid filter string ') and ( timePeriodFinish ' . Operator must have whitespace on left and right sides.
search cancel

API-1014 : Invalid filter string ') and ( timePeriodFinish ' . Operator must have whitespace on left and right sides.

book

Article ID: 271391

calendar_today

Updated On:

Products

Clarity PPM SaaS

Issue/Introduction

Some users are receiving “Could not export CSV” and the job log is showing “API-1014 : Invalid filter string ') and ( timePeriodFinish ' . Operator must have whitespace on left and right sides.” When trying to download the CSV from Timesheets grid.

Steps to reproduce:
1- Navigate to /pm/#timesheets/grid
2- Apply Filters - Status, Time Period End Date, Total, Resource OBS, Resource Manager, Employment Type, Resource Name, Resource ID, Is Adjustment
3- Click Export to CSV
4- Go to Reports and Jobs > Job log and notice Export Job Failed: 400
5- Return to MUX Timesheets grid page: /pm/#timesheets/grid
6- Refresh the page
7- Notice the same filters and try to Export to CSV again
Expected behavior: Filtering the data in Timesheets module and able to Export to CSV without refreshing the page
Actual Behavior: Could not Export to CSV
Workaround: Refreshing the page on same filters and Export to CSV works

Clarity Job Log Resource URL: /timesheets?filter=((status in (0)) and (( timePeriodFinish >= '2023-05-01T00:00:00' ) and ( timePeriodFinish <= '2023-07-28T23:59:59' )) and (actualsTotal > 0) and (resourceObsFilter in ((5047142), 'XXX'))) and (timePeriodIsOpen = true)&fields=hasNotes,resourceName,uniqueName,timePeriodStart,status,isAdjustment,actualsTotal,resourceManagerName&sort=resourceName asc,timePeriodStart asc&tsvParams=(workEffortUnit=fte)

Postman API:

Working: rest/v1/timesheets?filter=((status in (0)) and (( timePeriodFinish >= '2023-05-01T00:00:00' ) and ( timePeriodFinish <= '2023-07-28T23:59:59' )) and (actualsTotal > 0) and (resourceObsFilter in ((5047142), 'XXX'))) and (timePeriodIsOpen = true)&fields=hasNotes,resourceName,uniqueName,timePeriodStart,status,isAdjustment,actualsTotal,resourceManagerName&sort=resourceName asc,timePeriodStart asc&tsvParams=(workEffortUnit=fte)

Non-working: rest/v1/timesheets?filter=((status in (0)) and (( timePeriodFinish >= '2023-05-01T00:00:00' ) and ( timePeriodFinish &#60;= '2023-07-28T23:59:59' )) and (actualsTotal &#62; 0) and (resourceObsFilter in ((5047142), 'XXX'))) and (timePeriodIsOpen = true)&fields=hasNotes,resourceName,uniqueName,timePeriodStart,status,isAdjustment,actualsTotal,resourceManagerName&sort=resourceName asc,timePeriodStart asc&tsvParams=(workEffortUnit=fte)


Clarity BG-log:
ERROR 2023-07-31 14:53:16,788 [Dispatch Export to CSV Job : bg@server (tenant=clarity)] ppm.rest (clarity:user:Export to CSV Job) CustomerResourceHandler :: exception occurred while performing action:retrieve
com.ca.ppm.rest.exception.BadRequestException: API-1014 : Invalid filter string ') and ( timePeriodFinish ' . Operator must have whitespace on left and right sides.

Environment

Release : 16.1.2

Resolution

DE71358 - MUX Timesheets grid Export to CSV fails when filters are applied is Fixed in Clarity Build 16.2.0.

We validated the defect fix and Export CSV is working as expected with specified filters. The page refresh is not required and working as expected.