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

People without any Forecast assignments are silently dropped #108

Closed
yongrenjie opened this issue Aug 21, 2023 · 0 comments
Closed

People without any Forecast assignments are silently dropped #108

yongrenjie opened this issue Aug 21, 2023 · 0 comments

Comments

@yongrenjie
Copy link
Contributor

(via @LevanBokeria, thanks for reporting! 😊)

whatwhat/lib/schedule.ml

Lines 199 to 215 in a2eaa53

(* In a first pass, we remove anyone who is not in REG (as determined by
roles) or who is only assigned to UNAVAILABLE, as we probably don't need to
care about these. *)
let is_available (fc_p : Forecast.person) =
(* Has REG role *)
List.mem "REG" fc_p.roles
&& (* Is currently assigned to something that isn't just UNAVAILABLE *)
List.exists
(fun (a : Forecast.assignment) ->
get_first_day a.allocation < CalendarLib.Date.today ()
&& get_last_day a.allocation > CalendarLib.Date.today ()
&& a.entity = Person fc_p
&& a.project.programme <> "UNAVAILABLE")
fc_assignments
in
let fc_all = List.filter is_available fc_people |> FcSet.of_list in
let gh_all = GhSet.of_list gh_people in

These lines drop anybody who simply doesn't have any assignments at all.

They should really be reported as 100% unassigned

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant