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
Benunc opened this issue Sep 27, 2018 · 7 comments

Comments

Projects
None yet
5 participants
@Benunc
Copy link
Member

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

This comment has been minimized.

Copy link

commented Oct 2, 2018

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

This comment has been minimized.

Copy link
Member

commented Oct 3, 2018

@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

This comment has been minimized.

Copy link
Contributor

commented Oct 4, 2018

@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

This comment has been minimized.

Copy link
Contributor

commented Oct 4, 2018

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

@simeonrowsell

This comment has been minimized.

Copy link

commented Oct 4, 2018

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

This comment has been minimized.

Copy link
Contributor

commented Oct 4, 2018

@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

Merge pull request #3732 from impress-org/issue/3709
feat: include custom columns in donor export CSV #3709
@ravinderk

This comment has been minimized.

Copy link
Collaborator

commented Oct 9, 2018

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

@ravinderk ravinderk closed this Oct 9, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.