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: export members of organization #730

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

kaleabendrias
Copy link
Contributor

What does this PR do?

This PR introduces an endpoint that enables the export of organisation members to a CSV file. The endpoint will generate a CSV file containing details of all members in an organisation, including their ID, name, email, and role.

How to Test

Export Organisation Members to CSV:

  • Use the endpoint GET /api/v1/organisations/:org_id/members/export to export members of an organisation by their organisation ID.

Verify CSV Export:

  • Check if the CSV file is created with the expected headers (ID, Name, Email, Role) and member data.
  • Ensure that the file is downloadable and the data matches the organisation members' details in the database.

Edge Cases

  • Test whether the organisation exists before attempting to export members.
  • Test the behaviour of the system when trying to export members from an organisation that does not exist.
  • Test the export functionality for an organisation with no members.

Checklist

  • Implementing the /api/v1/organisations/:org_id/members/export endpoint for exporting members to a CSV file.
  • Validating the org_id parameter to ensure it refers to an existing organisation.
  • Using the csv-writer module to generate the CSV file.
  • Writing tests to validate the CSV export functionality and edge cases.

Copy link

github-actions bot commented Aug 8, 2024

Here are the latest updates on your deployment. Explore the action and ⭐ star our project for more insights! 🔍

Deployed By Status Preview URL Updated At (UTC)
PR Deploy Failed ❌ Visit Preview Aug 09, 2024 09:40PM

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

Successfully merging this pull request may close these issues.

1 participant