Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/uc-childcare-work-condition.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Fixed Universal Credit childcare work-condition eligibility so couples require all adults to be in work.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
person1:
in_work: false
is_adult: true
person2:
person2:
in_work: true
is_adult: false
output:
Expand All @@ -40,10 +40,27 @@
person1:
in_work: false
is_adult: true
person2:
person2:
in_work: true
is_adult: true
benunits:
benunits:
benunit:
members: [person1, person2]
output:
uc_childcare_work_condition: false

- name: Couple, both adults in work
period: 2024
absolute_error_margin: 0
input:
people:
person1:
in_work: true
is_adult: true
person2:
in_work: true
is_adult: true
benunits:
benunit:
members: [person1, person2]
output:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ def formula(benunit, period, parameters):
in_work = person("in_work", period)
adults_in_work = adult & in_work
# Benefit unit must not have any adults not in work.
return benunit.any(adults_in_work)
all_adults_in_work = benunit.all(in_work | ~adult)
return benunit.any(adults_in_work) & all_adults_in_work