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

Include area in initiatives export #7242

Conversation

oliverbarnes
Copy link
Contributor

@oliverbarnes oliverbarnes commented Jan 28, 2021

🎩 What? Why?

Includes an initiative's area name to the serialized Initiative fields, to be included when exporting initiatives from the admin.

Also adds overall test coverage to the initiative serializer.

📌 Related Issues

Metadecidim issue: https://meta.decidim.org/processes/roadmap/f/122/proposals/16199

Testing

  1. Go to https://decidim-staging.liquidvoting.io/ and log-in as admin@example.org / decidim123456

  2. Then go to https://decidim-staging.liquidvoting.io/admin/initiatives and click on "Export", then "Initiatives as CSV":

Screen Shot 2021-01-29 at 7 15 30 PM

You should see a confirmation message saying the email with the export was sent:

Screen Shot 2021-01-29 at 7 16 35 PM

You can view the email and download the exported zip at: https://decidim-staging.liquidvoting.io/letter_opener

And a sample exported zip file here: https://decidim-staging.liquidvoting.io/letter_opener/1611949506_9309008_b5bc353/attachments/initiatives-2021-01-29-71106.zip

📋 Checklist

🚨 Please review the guidelines for contributing to this repository.

  • CONSIDER adding a unit test if your PR resolves an issue.
  • ✔️ DO check open PR's to avoid duplicates.
  • ✔️ DO keep pull requests small so they can be easily reviewed.
  • ✔️ DO build locally before pushing.
  • ✔️ DO make sure tests pass.
  • ✔️ DO make sure any new changes are documented in docs/.
  • ✔️ DO add and modify seeds if necessary.
  • ✔️ DO add CHANGELOG upgrade notes if required.
  • ✔️ DO add to GraphQL API if there are new public fields.
  • ✔️ DO add link to MetaDecidim if it's a new feature.
  • AVOID breaking the continuous integration build.
  • AVOID making significant changes to the overall architecture.

📷 Screenshots

Nothing changes visually, but here's a screenshot of where to test this:

initiatives export

@oliverbarnes oliverbarnes changed the title Feature/add areas to initiatives export Include area in initiatives export Jan 28, 2021
@oliverbarnes oliverbarnes marked this pull request as ready for review February 3, 2021 12:04
require "spec_helper"

module Decidim::Initiatives
describe InitiativeSerializer do
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for including so many tests! ❤️

Copy link
Contributor Author

Choose a reason for hiding this comment

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

pleasure! :)

@mrcasals mrcasals merged commit 65858cb into decidim:develop Feb 3, 2021
@oliverbarnes oliverbarnes deleted the feature/add-areas-to-initiatives-export branch February 3, 2021 12:56
armandfardeau added a commit to OpenSourcePolitics/decidim that referenced this pull request Feb 4, 2021
armandfardeau added a commit to OpenSourcePolitics/decidim that referenced this pull request Feb 8, 2021
* Backport decidim#7242

* Fix offenses
@mrcasals mrcasals added module: initiatives type: feature PRs or issues that implement a new feature labels Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: initiatives type: feature PRs or issues that implement a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants