GSA / GEAR3

Next Iteration of the GSA Enterprise Architecture Reporting (GEAR) Portal
7 stars 3 forks source link

Search functionality on the FISMA report is not functioning #68

Closed hatfieldjm4 closed 1 year ago

hatfieldjm4 commented 1 year ago

When attempting to search on the FISMA system report, the search feature does not work-- it is unreactive when you type in a term. The same is true of the searching on individual fields option in the FISMA system report.

hatfieldjm4 commented 1 year ago

This seems to be an issue with the date formatter in the shared.service.ts file (line 188) in the src/app/shared/services/shared folder. It may have errored because Login.gov is the only system-level, active, fisma-reportable system that does not have a Renewal_Date because of it's ongoing FedRAMP authorization.

Troubleshooting steps taken:

Next steps:

hatfieldjm4 commented 1 year ago

I simply added an "else return null;" statement to the shared.service.ts file which made the search function properly again. I pushed this to the one-db-schema branch.

hatfieldjm4 commented 1 year ago

Looks like that fix did not end up fixing it. It seemed to fix it once, then reverted back to not working again. The same thing is happening on the IT Standards report when the expiration date is enabled.

hatfieldjm4 commented 1 year ago

I attempted to use DatePipe with the instructions here: https://stackoverflow.com/questions/40526102/how-do-you-format-a-date-time-in-typescript

While it formatted the date properly, it still broke when searching on the table.

hatfieldjm4 commented 1 year ago

I installed the moment npm package ("npm install moment"), and used the moment library to format the date with the instructions here: https://stackoverflow.com/questions/40526102/how-do-you-format-a-date-time-in-typescript

It formatted the date properly and enabled the search to function without error.

hatfieldjm4 commented 1 year ago

I realized moment.js will no longer be supported, so I determined a simple js Date object will fix it. I uninstalled moment and pushed to dev & dev1.