tbar0970 / jethro-pmm

Jethro Pastoral Ministry Manager
GNU General Public License v3.0
36 stars 26 forks source link

More flexible headcounting options #200

Open tbar0970 opened 8 years ago

tbar0970 commented 8 years ago

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.

vanoudt commented 7 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'}

tbar0970 commented 7 years ago

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.

tbar0970 commented 7 years ago

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

vanoudt commented 7 years ago

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!

vanoudt commented 7 years ago

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)

tbar0970 commented 7 years ago

Sounds good!

tim-pearce commented 1 year ago

I'm interested in this too (accidentally raised a new issue!). Putting my comment here so I am associated with this issue.