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

Product drives name filter - to list names in alphabetical order #4150

Conversation

kannans5
Copy link
Contributor

@kannans5 kannans5 commented Mar 1, 2024

Resolves #4119

Description

Name filter on Product drives list page should be in alphabetical order, this will be helpful for banks having a long list.

Type of change

  • New feature - minor enhancement (non-breaking change which adds functionality)

How Has This Been Tested?

  1. Go to All Product Drives.
  2. Add product drives with different start date and end dates.
  3. Filter by name should list Product Drive name alphabetically now.
  4. However the list without filters should not be altered, they should be in reverse chronological order.

Browser tests have been modified to test this change.

Screenshots

Before

Screenshot 2024-02-29 at 11 41 57 PM

After

Screenshot 2024-03-01 at 11 00 15 PM

Copy link
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.

Looks good - had one small request.

@@ -10,6 +10,8 @@ def index
.class_filter(filter_params)
.within_date_range(@selected_date_range)
.order(start_date: :desc)
# to be used in the name filter to sort product drives in alpha order
@product_drives_name_filter = @product_drives.sort_by { |pd| pd.name.downcase }
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we rename this to @product_drives_alphabetical? It's a bit more obvious what's inside it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated.

@kannans5 kannans5 requested a review from dorner March 2, 2024 17:08
Copy link
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.

Looks good! Will wait till after release to merge.

@dorner dorner merged commit a46d781 into rubyforgood:main Mar 3, 2024
19 checks passed
Copy link
Contributor

@kannans5: Your PR Product drives name filter - to list names in alphabetical order is part of today's Human Essentials production release: 2024.03.17.
Thank you very much for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants