Skip to content

Fix error when saving an Initiative title and description from Admin#6581

Merged
tramuntanal merged 1 commit intodevelopfrom
fix/initiative_form_empty_title
Oct 14, 2020
Merged

Fix error when saving an Initiative title and description from Admin#6581
tramuntanal merged 1 commit intodevelopfrom
fix/initiative_form_empty_title

Conversation

@andreslucena
Copy link
Copy Markdown
Member

@andreslucena andreslucena commented Oct 1, 2020

🎩 What? Why?

Please describe your pull request.

This PR fix an error when editing from admin an Initiative title and description.

It's well described at #5911 :

Create an initiative
Go edit on the admin side by deleting what's in the title and description fields
Update
See that the initiative is now empty and the form was OK validating this.

Thanks @virgile-dev for reporting this one!

I'm not sure if we should add a spec for this one, as there are lots of places where it's used translatable_presence and it seems like it only slipped in this form.

📌 Related Issues

Link your PR to an issue

Testing

Describe the best way to test or validate your PR.

  1. Create an initiative
  2. Go edit on the admin side by deleting what's in the title and description fields
  3. Update
  4. See that the initiative is now gives an error.

📋 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

Please add screenshots of the changes you're proposing

Before

image

After

image

♥️ Thank you!

Copy link
Copy Markdown
Contributor

@Leusev Leusev left a comment

Choose a reason for hiding this comment

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

Looks good for me @andreslucena
Altought there's a [CI] Surveys test failing... it's strange, 'cause doesn't seem related to this fix..
image
I launched all Surveys tests in local and all passed ok. I repeated with same seed and they worked too..
image

Maybe flaky? By the moment, I rerun the tests

@tramuntanal
Copy link
Copy Markdown
Contributor

It failed again but due to a different error...

Randomized with seed 18474
..................................................................................................................................................................................
1st Try error in ./spec/serializers/decidim/surveys/data_serializer_spec.rb:17:

expected: 0
     got: 3

(compared using ==)

We should analyze what's happening here

@tramuntanal tramuntanal merged commit a602cc7 into develop Oct 14, 2020
@tramuntanal tramuntanal deleted the fix/initiative_form_empty_title branch October 14, 2020 06:00
@mrcasals mrcasals added module: initiatives type: fix PRs that implement a fix for a bug and removed type: bug labels Feb 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in-review module: initiatives type: fix PRs that implement a fix for a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

On the admin side it's possible to delete title and description of my initiative and leave it empty

4 participants