Closed jefft closed 1 year ago
Suggested fix:
I don't think we need to change the interface. Your assumption about the original case was correct. I'll investigate why the congregationless person was incorrectly showing up.
Well, say someone does actually want, say, "5pm plus congregationless visitors". Right now they just check "5pm".
If you fix the bug, and suddenly the congregationless people disappear, how do they get the original behaviour back? That's where we'd need a 'no congregation' checkbox.
Ability to see "5pm plus congregationless contacts" would be a new feature, which somebody could request if they needed it :) Meanwhile there's an actual bug to fix first!
Oh right, I see what you mean - people might be relying on the current (erroneous) behaviour. But I doubt it. The explanatory text is pretty clear.
Diagnosis: Since https://github.com/tbar0970/jethro-pmm/commit/3e07f47b906c838b93b9d0abd7fa521873efcbc0#diff-0f35e6e15927e7239b1b988169fa734e54756c1174359534dbb3c188cc78a6b1R224 the person
view definition erroneously looked for a congregationid column in the account_group_restriction table. Mysql treated this as a reference to person.congregationid, which introduced entirely wrong logic.
Jethro allows accounts to be restricted in which persons they can view. For instance, this user should only be able to see members of the 'Musicians' group. They should not be able to see members of 9am and 5pm congregations:
However, what about persons not in any congregation, like visitors or members of youth groups?
I would have expected they would be invisible, but Jethro with the settings above shows them.
Demo
Attached (jethro_demosystem.sql.gz) is a sample Jethro database, containing Ben Churchgoer who attends 5pm, and his daughter Claire who is in no congregation but is member of 'Youth Group':
The
bandviewer
account is restricted to 'Musicians' as above, but can see not only the legitimate 'Musicians' members, but Claire too:(password for
demo
andbandviewer
accounts isdemo123123
)