Skip to content

Add questions and answers to elections#6129

Merged
microstudi merged 14 commits intodevelopfrom
feat/elections-questions-answers
May 28, 2020
Merged

Add questions and answers to elections#6129
microstudi merged 14 commits intodevelopfrom
feat/elections-questions-answers

Conversation

@leio10
Copy link
Copy Markdown
Contributor

@leio10 leio10 commented May 26, 2020

🎩 What? Why?

Adds questions and answers to the elections module and implements the admin zone for those models.

📌 Related Issues

📋 Subtasks

  • Add CHANGELOG entry
  • If there's a new public field, add it to GraphQL API
  • Add/modify seeds
  • Add tests

📷 Screenshots (optional)

Description

@leio10 leio10 changed the title Feat/elections questions answers Add questions and answers to elections May 26, 2020
@leio10 leio10 force-pushed the feat/elections-questions-answers branch from 8f7336b to 4e123fb Compare May 26, 2020 19:34
@leio10 leio10 force-pushed the feat/elections-questions-answers branch from 4e123fb to f294091 Compare May 27, 2020 07:28
agustibr
agustibr previously approved these changes May 27, 2020
Copy link
Copy Markdown
Contributor

@agustibr agustibr left a comment

Choose a reason for hiding this comment

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

👏 great work!

slickepinne
slickepinne previously approved these changes May 27, 2020
@leio10 leio10 dismissed stale reviews from slickepinne and agustibr via 9d43a33 May 27, 2020 14:21
# from the admin panel.
class DestroyAnswer < Rectify::Command
include ::Decidim::AttachmentMethods
include ::Decidim::GalleryMethods
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm just curious about what happens when you delete an answer that has images, images get also deleted? Where are they stored?

Copy link
Copy Markdown
Contributor Author

@leio10 leio10 May 27, 2020

Choose a reason for hiding this comment

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

All the attachments are in the decidim_attachments table, and that command behaviour is defined here. Those images are automatically deleted when the resource is deleted, and is tested here and here.

gchacart
gchacart previously approved these changes May 27, 2020
Copy link
Copy Markdown
Contributor

@gchacart gchacart left a comment

Choose a reason for hiding this comment

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

Excellent job!!

I got a rough idea of the architecture just because there are so many new things for me here, but the specific commits helped a lot for understanding!!!

🚀

@leio10
Copy link
Copy Markdown
Contributor Author

leio10 commented May 28, 2020

@decidim/core this PR was approved by Product, so it's ready to be reviewed!

@leio10 leio10 added the project: e-voting Barcelona City Council contract label May 28, 2020
@microstudi microstudi self-assigned this May 28, 2020
microstudi
microstudi previously approved these changes May 28, 2020
Copy link
Copy Markdown
Contributor

@microstudi microstudi left a comment

Choose a reason for hiding this comment

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

Excellent job @leio10. Pleased to see that the API is being taking into account!

@microstudi microstudi dismissed stale reviews from gchacart and themself via b6b3c9b May 28, 2020 21:04
@microstudi microstudi merged commit fe6cece into develop May 28, 2020
@microstudi microstudi deleted the feat/elections-questions-answers branch May 28, 2020 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in-review project: e-voting Barcelona City Council contract

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create new questions and answers for an election

5 participants