Skip to content

4981 adjuments export with item changes#5173

Merged
dorner merged 8 commits into
rubyforgood:mainfrom
cyang-el:4981-adjuments-export-with-item-changes
May 23, 2025
Merged

4981 adjuments export with item changes#5173
dorner merged 8 commits into
rubyforgood:mainfrom
cyang-el:4981-adjuments-export-with-item-changes

Conversation

@cyang-el
Copy link
Copy Markdown
Contributor

Resolves #4981

Description

We want to allow user to be able to see the changes for all items in each adjustment.

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update
  • Documentation update

How Has This Been Tested?

  1. Locally with bundle exec rake.
  2. Manually tested exporting csv file to verify, the new exported csv format looks like:

Adjustments-2025-04-29.csv

@cyang-el cyang-el changed the title [WIP ] 4981 adjuments export with item changes [WIP] 4981 adjuments export with item changes Apr 29, 2025
@cyang-el cyang-el marked this pull request as draft April 29, 2025 18:50
@cyang-el cyang-el marked this pull request as ready for review April 29, 2025 18:58
@cyang-el cyang-el changed the title [WIP] 4981 adjuments export with item changes 4981 adjuments export with item changes Apr 29, 2025
@cyang-el cyang-el marked this pull request as draft April 29, 2025 18:59
@cyang-el cyang-el force-pushed the 4981-adjuments-export-with-item-changes branch from a7b1d73 to c8a01d2 Compare April 29, 2025 19:02
@cyang-el cyang-el marked this pull request as ready for review April 29, 2025 19:02
@cielf cielf requested review from cielf and dorner April 29, 2025 19:45
Copy link
Copy Markdown
Collaborator

@cielf cielf left a comment

Choose a reason for hiding this comment

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

Thank you!
This checks out with my manual testing. Over to @Dorer for a technical look-see.

@cielf
Copy link
Copy Markdown
Collaborator

cielf commented Apr 29, 2025

@cyang-el Oh -- the rubocop linter pass is failing, so you'll want to check into that. Thanks!

Comment thread app/services/exports/export_adjustments_csv_service.rb Outdated
Comment thread spec/controllers/adjustments_controller_spec.rb Outdated
Comment thread spec/controllers/adjustments_controller_spec.rb Outdated
Comment thread spec/services/exports/export_adjustments_csv_service_spec.rb Outdated
@cyang-el cyang-el requested a review from dorner May 2, 2025 22:48
Copy link
Copy Markdown
Collaborator

@dorner dorner left a comment

Choose a reason for hiding this comment

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

Really minor request, otherwise this looks good!


it "includes appropriate headers and data" do
csv = <<~CSV
Created date,Storage Area,Comment,# of changes,#{item1.name},#{item2.name}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We know the name, can we put the hardcoded value in here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

good point, let me quickly change that :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@dorner should I squash this and the last change to a single commit and then force push? to not create too much commit noise

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@cyang-el no, that's what merge commits are for. 😄 Force push causes havoc with existing comments.

@cyang-el cyang-el requested a review from dorner May 9, 2025 21:33
Copy link
Copy Markdown
Collaborator

@dorner dorner left a comment

Choose a reason for hiding this comment

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

@cyang-el all looks good but lint is failing. Can you fix?

@cyang-el
Copy link
Copy Markdown
Contributor Author

cyang-el commented May 16, 2025

@dorner it seems that the lint errors are due to ItBlocks, and it's triggered by files not touched in this PR. I am guessing we might run into the same error if we run linter on main branch as well (could be due to rubocop version upgrade I guess), I can fix it here in this PR or another one (seems like a better option to me), what do you think?

Copy link
Copy Markdown
Collaborator

@dorner dorner left a comment

Choose a reason for hiding this comment

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

Merged main branch in and everything passes.

@dorner dorner merged commit 7030ad3 into rubyforgood:main May 23, 2025
17 of 18 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 1, 2025

@cyang-el: Your PR 4981 adjuments export with item changes is part of today's Human Essentials production release: 2025.06.01.
Thank you very much for your contribution!

GiovannyCordeiro pushed a commit to GiovannyCordeiro/human-essentials that referenced this pull request Jun 6, 2025
* Add specs for adjusment csv export

* Add service for csv exporting adjustments

* Change header to comply with existing documentation

* Lint the specs

* Move adjustment export format tests into requests spec

* Adapt adjustments specs to test csv export text and use module method

* Hardcode adjustments_requests spec strings

---------

Co-authored-by: Daniel Orner <daniel.orner@flipp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve adjustments export -- actually have the item changes in it

3 participants