Open tbar0970 opened 8 years ago
Some ideas for future reference:
For the settings:
INSERT INTO setting
(rank
, heading
, symbol
, note
, type
, value
) VALUES (98,"Attendance Recording","EXTRA_ATTENDANCE_CATEGORIES","","multitext_cm","Extras")
Will also add a column to the congregation_headcount table to store the values for the extra fields. I would recommend storing it as some sort of json string - so that changes to the configuration in the future don't invalidate past records. Something like {'tourists'->'4', 'local visitors'->'2', 'other'->'12'}
Rather than storing JSON I reckon it'd be better to add a new table headcount_type or similar, and add a column headcount_typeid to the headcount table. Then it's more queryable.
It's also worth noting that "total headcount" will INCLUDE everything else. Whereas "tourist headcount" sits WITHIN "total headcount" So a result might be something like TOTAL HEADCOUNT: 40 MARKED PRESENT: 20 MARKED ABSENT: 10 TOURISTS: 5 VISITING RELATIVES: 2 EXTRAS: 3 <-- this is the leftover once the categories above are subtracted from total headcount
Agreed - and that's exactly what I've been working on in #375 :-) Realised that if I do it with a new table, I can actually re-use a lot of the code that's already there for the current headcounting!
My current design is to have a congregation_category_headcount / persongroup_category_headcount table to store that information, and to have the total headcount table still include the TOTAL headcount (ie: all categorised extras, plus uncategorised extras, plus those marked present)
Sounds good!
I'm interested in this too (accidentally raised a new issue!). Putting my comment here so I am associated with this issue.
Currently when recording attendance we have a "total headcount" box. When attendance is displayed, the difference between "total headcount" and "total present" is labelled as "extras".
In practice, there are different types of "extra" you care about. An "extra" might be a member of another congregation, somebody's relative in town for the weekend, or a genuine newcomer with potential to become a member.
Given that different churches want to track different numbers (eg "tourist visitors" vs "local visitors") we'd need a flexible set of options.