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

Categories are still shown when properties of the legislation process are changed #3868

Conversation

andrewcameronsims
Copy link
Contributor

@andrewcameronsims andrewcameronsims commented Nov 24, 2019

References

Closes #3558 : "Keep categories being shown when change proposal phase date on colaborative legislation processes"

Notes

In the issue, it is mentioned that date changes to the legislation process cause the categories of the process to be deleted. I discovered that this bug occurs when any change whatsoever is made to the process from the administrator view, not just date. That was because in the update action it calls set_tag_list even when there are no tags in the parameters, and this causes the tag list to be set to empty. The fix for this is to make the set_tag_list call to be conditional on the presence of tags in the parameters. I have also added to one of the existing specs to have confidence to know if this bug reoccurs. This spec fails now without my change, and passes with it. Hope it's ok!

@andrewcameronsims andrewcameronsims changed the title #3558 Categories are still shown when properties of the legislation process are changed Categories are still shown when properties of the legislation process are changed Nov 24, 2019
@andrewcameronsims andrewcameronsims marked this pull request as ready for review November 24, 2019 04:52
@javierm javierm added this to Reviewing in Roadmap via automation Nov 24, 2019
@javierm javierm added the Bug label Nov 24, 2019
These changes fix a bug that causes categories
of a legislation process to be wiped on update
of the process. It also adds a regression test
for this fix.
Copy link
Member

@javierm javierm left a comment

Choose a reason for hiding this comment

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

Great! 😄 Thank you so much! 🎉

Roadmap automation moved this from Reviewing to Testing Nov 25, 2019
@javierm javierm merged commit 2435929 into consuldemocracy:master Nov 25, 2019
Roadmap automation moved this from Testing to Release 1.1.0 Nov 25, 2019
@andrewcameronsims andrewcameronsims deleted the legislation_categories_persist branch November 25, 2019 20:37
smarques pushed a commit to venetochevogliamo/consul that referenced this pull request Apr 29, 2020
…ation_categories_persist

Fix categories being removed when a legislation process is changed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Roadmap
  
Release 1.1.0
Development

Successfully merging this pull request may close these issues.

Keep categories being shown when change proposal phase date on colaborative legislation processes
2 participants