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

Unit style percentages can exceed 100% #306

Open
atomtay opened this issue Nov 16, 2020 · 0 comments
Open

Unit style percentages can exceed 100% #306

atomtay opened this issue Nov 16, 2020 · 0 comments
Labels

Comments

@atomtay
Copy link
Contributor

atomtay commented Nov 16, 2020

Describe the bug
Users can input more units via Unit Styles than present in Unit Types, and there are no validation checks to prevent this. As a result, it is possible to input impossible values ("200% of units in this development are studios")

Steps to reproduce
Walk us through how you revealed the bug.

  1. Go to 'Create a development'
  2. Scroll to "development type" and select Residential
  3. Enter 1 in each of the four Unit Type fields
  4. Enter 5 into one of the three Unit Style fields
  5. See that the percentage for that field is 125% (5 units out of 4)

Expected behavior
The percentages for Unit Styles should add up to 100%, and users should not be able to write in more units in the Unit Styles than they have in the above Unit Types section.

Screenshots
Example of what should be an invalid input:
invalid state

Example of what could be a valid input:
valid state

Desktop (please complete the following information):

  • OS: MacOS Catalina
  • Browser Firefox
  • Version 82.0.03

Additional context
The denominator should always be the number of units dictated in the Unit Type section. The numerator (the total number of units accounted for in Unit Styles) should not be able to exceed this for the math to work out.

@atomtay atomtay added the bug label Nov 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant