Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Statutory sick pay calculator bugfix #1998
Currently when calculating sickness duration the calculator does not take into account employee's usual work days, it simply subtracts the dates, which is incorrect. In order to fix this issue we first need to move the question that collects information about employees working days pattern earlier in the process.
Unfortunately this used to be the last question of the flow that carried all the logic to decide the outcome node.
Removing this question from it's position means this logic has to be used in three different questions leading to those outcomes. This has been achieved by extracting the decision logic into an inner class,
Having moved the question, we then need to take the user's working pattern into account when calculating the number of days worked in the linked sickness period. The last few commits are an attempt at doing that.
referenced this pull request
Oct 12, 2015
I've force-pushed up my latest work on this. I still have some uncertainty about the effect of the changes I've made and I've asked @lutgendorff for help by email. I'm going to add the "before" & "after" visualisations of the flow which I've captured to the PR description. Pending feedback from Liz, this is still not ready to merge.