Skip to content

Remove duplicated error message in datetime_fields#7008

Merged
ivan-mr merged 1 commit intodecidim:developfrom
CodiTramuntana:fix/duplicate-error-dates
Dec 10, 2020
Merged

Remove duplicated error message in datetime_fields#7008
ivan-mr merged 1 commit intodecidim:developfrom
CodiTramuntana:fix/duplicate-error-dates

Conversation

@laurajaime
Copy link
Copy Markdown
Contributor

🎩 What? Why?

When you create a form with a pair of dates, for example, meetings, and this dates are:
end_time <= start_time , the validation error was duplicated in frontend.

The change is remove call to error_and_help_text because text_field put errors too. So, when date was wrong, the validation errors was put twice.

📌 Related Issues

Testing

Steps to test:

  1. Go to admin panel.
  2. Processes
  3. Select a participatory process
  4. Go to componentes -> meetings
  5. Create a new meeting.
  6. Complete the form where end_time <= start_time.
  7. Now, the validation error must show once.

📋 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

Error
Before
Fix
Now

♥️ 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.

In first place, welcome aboard @LauraJaimeC ! 😄
Good catch here ! 👍
Thanks for your work!

Copy link
Copy Markdown
Contributor

@ivan-mr ivan-mr left a comment

Choose a reason for hiding this comment

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

Great Job @LauraJaimeC. Thanks!

@ivan-mr ivan-mr merged commit 88cb967 into decidim:develop Dec 10, 2020
@ivan-mr ivan-mr deleted the fix/duplicate-error-dates branch December 10, 2020 22:53
laurajaime added a commit to gencat/decidim that referenced this pull request Dec 11, 2020
@mrcasals mrcasals changed the title Fix duplicated error in datetime_fields Remove duplicated error message in datetime_fields Feb 26, 2021
@mrcasals mrcasals added type: fix PRs that implement a fix for a bug and removed type: bug labels Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants