Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PIMS-2134 Export Tables with Dates #2722

Merged
merged 3 commits into from
Oct 11, 2024
Merged

Conversation

dbarkowsky
Copy link
Collaborator

@dbarkowsky dbarkowsky commented Oct 11, 2024

🎯 Summary

PIMS-2134

Request was to have the dates in exported spreadsheet be just the date format, not the ISO date strings we store.

Changes

  • Moved from 'node-xlsx' to the xlsx (really sheetjs) package we use in the backend too. This allowed for date formatting.
  • Created a function to handle and convert the date strings as needed for export
  • Reworked the export from tables to use the xlsx process for making and downloading spreadsheet. This way we can specify that fields are actually configured as dates that excel will just recognize.
  • Updated the export from bulk upload results to use the new package as well.

Testing

If you need to seed the bulk upload results but can't legitimately do so because of the upload bug, try uploading a file, let it fail, then update that row with this SQL:

UPDATE import_result set results = '[{"rowNumber": 1, "action": "uploaded", "reason":"good job"}]', message = 'wow', completion_percentage = 1 where id = 1;
  • Download spreadsheet from bulk upload results
  • Download spreadsheets from other tables and ensure that dates are formatted correctly

🔰 Checklist

  • I have read and agree with the following checklist and am following the guidelines in our Code of Conduct document.
  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation where required.
  • I have tested my changes to the best of my ability.
  • My changes generate no new warnings.

Copy link

🚀 Deployment Information

The React APP Image has been built with the tag: 2722. Please make sure to utilize this specific tag when promoting these changes to the TEST and PROD environments during the APP deployment. For more updates please monitor Image Tags Page on Wiki.

Copy link
Collaborator

@TaylorFries TaylorFries left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

table downloads now format date columns as columns. no other issues detected.

@dbarkowsky dbarkowsky merged commit 79a4792 into main Oct 11, 2024
11 checks passed
@dbarkowsky dbarkowsky deleted the PIMS-2134-Date-Export-Format branch October 11, 2024 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants