human-essentials icon indicating copy to clipboard operation
human-essentials copied to clipboard

#4593 Fix distribution export, item columns in alphabetically order

Open auliafaizahr opened this issue 1 year ago • 2 comments

Checklist:

  • [x] - I have performed a self-review of my own code,
  • [x] - I have commented my code, particularly in hard-to-understand areas,
  • [x] - I have made corresponding changes to the documentation,
  • [x] - I have added tests that prove my fix is effective or that my feature works,
  • [x] - New and existing unit tests pass locally with my changes ("bundle exec rake")

Resolves #4593

Description

Reorder item-related columns in the distribution export to be in lower-case alphabetical order.

Type of change

  • [x] Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • [x] Automated tests have been added to confirm that item-related columns are now exported in lower-case alphabetical order.
  • [x] Manual testing was conducted by exporting distributions and verifying the order of columns.

Screenshots

before image image image

after image image image

as can we see in before image the last column was "Kit" after "Wipes" which "wipes" should be at last column if we order it alphabetically, which I try to fix to reorder it alphabetically and the result was in after images ("wipes" was in the last order)

At first I was confused because the title of the issue is "items columns are no longer in alphabetical order", but after dig deeper it was never in alphabetical order since first (found the discussion here https://github.com/rubyforgood/human-essentials/pull/4070, it is said that it sorted by "created_at" column).

Look forward for feedback, thankyou.

auliafaizahr avatar Aug 29 '24 13:08 auliafaizahr

FYI The complaint from the business was that they were no longer in alpha order. That may be because the original items everyone starts out with happen to be in alpha order, but any they added would be showing at the end if they were in created order.

cielf avatar Aug 29 '24 13:08 cielf

ah I see, after seeing the header at first I also think it was already in alphabetical order unless seeing the last column, and after dig deeper I kinda confused bcs it was order by created_at, sorry for some inconvenience in my wording, thankyou.

auliafaizahr avatar Aug 29 '24 14:08 auliafaizahr

@auliafaizahr: Your PR #4593 Fix distribution export, item columns in alphabetically order is part of today's Human Essentials production release: 2024.09.08. Thank you very much for your contribution!

github-actions[bot] avatar Sep 08 '24 14:09 github-actions[bot]