-
-
Notifications
You must be signed in to change notification settings - Fork 572
5308 Audit CSV Export #5322
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
5308 Audit CSV Export #5322
Conversation
e683f90 to
505d25c
Compare
dorner
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the first draft!
61f6a07 to
ccff0fa
Compare
|
Can we re-run that spec-system test? Seems flakey. |
spec/models/audit_spec.rb
Outdated
| expect(csv_data).to eq( | ||
| <<~CSV | ||
| Audit Date,Audit Status,Storage Location Name,#{audit.line_items.first.name},#{audit_2.line_items.first.name} | ||
| #{audit.updated_at.strftime("%B %d %Y")},#{audit.status},#{sl.name},#{audit.line_items.first.quantity},0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please replace these with actual names, quantities, status etc. You can use freeze_time to hardcode the times as well. This will make the test less flaky and ensure we are asserting what we think we're asserting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated to a more hardcoded spec.
dorner
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good - over to @awwaiid for functional test.
|
Hello @awwaiid, do you have time to review my PR? |
|
Hey, @awwaiid, @janeewheatley and I completed functional testing and we're seeing that the export Audit button and the example export looks good (attached) |
|
Pending ticket: "Please wait" must not persist on the export button label after the export is complete |
|
@ruestitch Thank you for testing! |
|
@john-huang-121: Your PR |


Resolves #5308
Description
This feature adds the 'Export Audit' button to the Audits page. Similar to the Storage Location page except includes the audit date and status in the report.
Type of change
How Has This Been Tested?
I first had to create a new Audit before exporting the CSV file.
Once that's done, I clicked the button and was able to get the csv of the audit.
Screenshots
New Export Button
