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

feat: include custom columns in donor export CSV #3709

Closed
8 tasks done
Benunc opened this issue Sep 27, 2018 · 7 comments
Closed
8 tasks done

feat: include custom columns in donor export CSV #3709

Benunc opened this issue Sep 27, 2018 · 7 comments
Assignees

Comments

@Benunc
Copy link
Member

Benunc commented Sep 27, 2018

User Story

As a third party developer, I want to add custom meta to the donor, and then be able to include that custom column on the user interface at Donations > Tools > export so that the end user can conditionally select the columns added to the CSV.

This requires a new filter to add that column to the user interface.

Visuals

screen shot 2018-09-27 at 12 43 31 pm

Possible Solution

Add a filter here: https://github.com/WordImpress/Give/blob/master/includes/admin/tools/export/class-batch-export-donors.php#L217

Acceptance Criteria

  • Research on best possible implementation.
  • Implement a new function get_default_columns to handle default columns list for export.
  • Add a filter give_export_donor_get_default_columns to the fn get_default_columns
  • Make the fn get_default_columns accessible in the view file html-admin-page-exports.php.
  • Populate the checkbox using the fn get_default_columns so that the opt-in donor fields and fields added via filter are loaded dynamically
  • Ensure that if custom meta field is added and checked then the same details are reflected in CSV with its related data.
  • Create a snippet to ensure it works properly.
  • Testing the snippet with the export functionality

Related

@simeonrowsell
Copy link

This is a feature requested by myself so just giving it the thumbs up! My clients have various custom donor meta (phone number for example), and being able to add these into the CSV they export would be hugely beneficial. Thanks

@kevinwhoffman kevinwhoffman changed the title feat: add capability to include custom columns on the donor export CSV feat: include custom columns in donor export CSV Oct 3, 2018
@kevinwhoffman
Copy link
Contributor

@simeonrowsell Thanks for checking in. We are going to add this to our current sprint and get that filter in place for you.

@mehul0810 Please make sure once you add the filter to Give core, you also update the snippet to show how to use the filter so that the custom donor fields appear in the export screen. This has been defined in acceptance criteria above.

@mehul0810
Copy link
Contributor

@kevinwhoffman I've investigated on this issue and it is not a quick fix. You can check call summary below for more information. Also, to add, I'll require more time to fix this issue so I would recommend if we can bump this issue to 2.3.0. I'll research more and add the updated Acceptance Criteria before starting work on this issue.

Slack Call Summary

Participants: @mehul0810 @ravinderk
Topic: Discussion on the extendability of Export API
Result: I've discussed with @ravinderk to improve the Export API as it is not extendible due to hardcoded HTML for donor columns in this issue. Also, after adding the filter we won't be able to achieve the fix for this issue. So, we need to improve Export API in order to fix this issue.

@mehul0810
Copy link
Contributor

mehul0810 commented Oct 4, 2018

Added the updated Acceptance Criteria based on further investigation in the description of the issue.

@simeonrowsell
Copy link

Thanks all! I have another project using Give starting in a month or so which I know this will be useful for too. Looking forward to the update :)

@mehul0810
Copy link
Contributor

@kevinwhoffman I've created a PR for release/2.2.6 as this issue is fixed now and we can release it in 2.2.6. Let me know your thoughts.

ravinderk added a commit that referenced this issue Oct 5, 2018
feat: include custom columns in donor export CSV #3709
@ravinderk
Copy link
Collaborator

@mehul0810 I think this issue resolved, so closing this.

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

5 participants