-
Notifications
You must be signed in to change notification settings - Fork 4
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
TP2000-885 Use quota origins and exclusions to populate geo data in create measure journey #1032
TP2000-885 Use quota origins and exclusions to populate geo data in create measure journey #1032
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #1032 +/- ##
=======================================
Coverage 92.71% 92.72%
=======================================
Files 453 453
Lines 33046 33085 +39
Branches 2527 2538 +11
=======================================
+ Hits 30639 30678 +39
+ Misses 1919 1918 -1
- Partials 488 489 +1
☔ View full report in Codecov by Sentry. |
Is this an either or scenario? Where if you add an order number and the geo area's are populated you cannot add more geo area's? |
That's right. Using an order number replaces selecting geo areas/exclusions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! just a couple minor comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch on the origins! LGTM!
TP2000-885 Use quota origins and exclusions to populate geo data in create measure journey
Why
There exists a requirement for quotas that geographical data (origins and exclusions) held on a quota order number must match geographical data associated with a measure. To save the user from having to manually select the geographical areas and exclusions, we can take the quota's origins and exclusions to populate automatically the geographical data for measures whenever a quota order number is selected in the create measure journey.
What
Moves away from
cleaned_data["geo_areas_list"]
andcleaned_data["geo_area_exclusions"]
to combinecleaned_data["geo_areas_and_exclusions"]
(list of dictionaries) to accommodate multiple pairs of geo areas and exclusions that can sometimes result from the geo data held on a quota order numberSets
cleaned_data["geo_areas_and_exclusions"]
either with geo data held on order number if one has been selected or with geo area form data inMeasureGeographicalAreaForm.clean()
Conditionally shows geo areas form or a summary of geo data that will be used to create measures depending if an order number has been selected
Adds and updates form and view unit tests
Amends help text on quota order number form page
Add help text to geo area form/summary page
Example of the summary page of geo areas/exclusions automatically populated from the selected quota order number in place of the geo areas form: