Removed labor meetings from participation history#1685
Removed labor meetings from participation history#1685Karina-Agliullova wants to merge 4 commits intodevelopmentfrom
Conversation
MImran2002
left a comment
There was a problem hiding this comment.
I don't think I have any changes in mind, this is a quick fix and I have talked to Karina that a long-term fixed would possibly be an attribute but for now I think it is a great fix.
app/logic/events.py
Outdated
| .join(EventParticipant) | ||
| .where(Event.isAllVolunteerTraining == True, | ||
| EventParticipant.user == user)) | ||
| EventParticipant.user == user, ~((Event.isLaborOnly == True) & excLaborMeeting), ~((Event.isTraining == True) & excLaborMeeting))) |
There was a problem hiding this comment.
All Volunteer is always All Volunteer, without other qualifiers. If they screw up the data entry, that's on them.
app/logic/events.py
Outdated
| .join(EventParticipant) | ||
| .where(EventParticipant.user == user, | ||
| Event.isAllVolunteerTraining == False, Event.deletionDate == None) | ||
| Event.isAllVolunteerTraining == False, Event.deletionDate == None, ~((Event.isLaborOnly == True) & excLaborMeeting), ~((Event.isTraining == True) & excLaborMeeting)) |
There was a problem hiding this comment.
We can simplify this by just excluding Labor Meetings. There aren't going to be other labor meetings that we want to put in this list.
app/logic/events.py
Outdated
|
|
||
| return eventsList | ||
|
|
||
| def excludeLaborMeeting(): |
There was a problem hiding this comment.
This function makes a clause that determines if the event IS a labor meeting, but is called excludeLaborMeeting
app/logic/events.py
Outdated
|
|
||
| return ( | ||
| eventName.contains("labor meeting") | | ||
| eventName.contains("celts labor meeting") | |
There was a problem hiding this comment.
redundant, because this would be caught be the first check.
app/logic/events.py
Outdated
| return ( | ||
| eventName.contains("labor meeting") | | ||
| eventName.contains("celts labor meeting") | | ||
| eventDescription.contains("labor meeting") |
There was a problem hiding this comment.
This could potentially catch too much. Let's not check event description.
Fixes #1683
There was a request to remove labor meeting events from the Participation history. And also, those labor meetings should be tracked in reports for each academic year per each term. The problem with removing it from participation history was inconsistency in naming of labor meetings and also filtering: sometimes they are named "CELTS labor meeting" or "Labor meeting(date)", so it was confusing to remove Labor only events as there are trainings that are also filtered the exact same way.
Changes
Testing