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

fix(admin-tool): All Forms dropdown on the Donation Export only uses first ten forms #3303

Closed
4 tasks done
mathetos opened this issue May 31, 2018 · 0 comments
Closed
4 tasks done
Assignees

Comments

@mathetos
Copy link
Member

mathetos commented May 31, 2018

User Story

As a Give Admin, I want to be able to export my donations based on category regardless of how many forms I have an how many donations they have on them.

Current Behavior

Currently, if you have more than 10 forms in a category, and the first 10 forms don't have any donations yet, you can't run the export tool at all.

Expected Behavior

I expect that:

  1. The category and tag dropdowns will allow me to choose from ALL categories and tags, not just the most recent 10 categories and tags.
  2. That when I can choose from all cats and tags, that I'll get donation data from the forms

Steps to Reproduce

  1. Create 11 forms and add them all to a category
  2. Do a donation on the OLDEST form -- the 1st form
  3. Go to "Donations > Tools > Export Donation History"
  4. From there, choose the category and keep the form on "All Forms".
  5. Run the export and you'll get this error:
    image

This is because the All Forms dropdown is only applied to the first 10 most recent forms. That oldest form is excluded from the dropdown query so the export thinks there's no donations at all.

Possible Solution

"All Forms" needs to really mean "All Forms", not just the forms that the dropdown query returns. This might potentially be because of this line where we query using get_terms() but we don't designate the count argument. So I believe it defaults to "10". That's my best guess right now.

Tasks

  • Ensure all forms are returned correctly, when "All Forms" is chosen.
  • Ensure that all forms are returned in the dropdown regardless of category/tag
  • Ensure that all tags/categories can be returned, more than 10
  • Ensure that if we return all, that it doesn't take forever to make that happen. Make the new query smart and fast.

Related

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

No branches or pull requests

4 participants