data-to-insight / csc-validator-be-cin

1 stars 1 forks source link

Bugfix 2885 #341

Closed WillLP-code closed 1 year ago

WillLP-code commented 1 year ago

closes #310

The following is being wrongly failed

              <Section47>
                    <DateOfInitialCPC>SAME DATE</DateOfInitialCPC>
                </Section47>
              <Section47>
              </Section47>
                <ChildProtectionPlans>
                    <CPPstartDate>SAME DATE</CPPstartDate>
                </ChildProtectionPlans>

It fails because there is an s47 module with no date, where if there is a module with a passing date, this child should pass and the no date s47 module should not matter.

The fix needed to fail CINdetails modules with children with no dates, and no correct dates, but allow modules with multiple s47s, some of which pass, to pass. This involves finding out is a CINdetails module has both s47 modules with, and without dates, and if that was the case, only testing the ones WITH dates. If these fail, the child still fails.

WillLP-code commented 1 year ago

okay oops, I switched branches using git siwtch -c branch name for this pr which messed up a little, as I forgot it takes work already done on the current branch...