Skip to content

Participationtypes#1703

Merged
RueHaile merged 4 commits into
developmentfrom
participationtypes
May 4, 2026
Merged

Participationtypes#1703
RueHaile merged 4 commits into
developmentfrom
participationtypes

Conversation

@MImran2002
Copy link
Copy Markdown
Contributor

Issue Description

Fixes #1631

  • In participation history accordion on the user's page, there should be a participation type: volunteer, labor, attendee

Changes

  • Added participation type table in Sidebar > Search Student > User profile > participation History drop down
image
  • Refactored the getParticipatedEventsForUser(user) function to also add the column of event participant type and if the event is for volunteer the student participation type is volunteer, if the event is labor only it is labor else it is attendees.

  • Added test case for getParticipatedEventsForUser function and checked the returned participation types.

  • Rationale: This implementation can only be accurate if the eventParticiapant table has a new column which is participant type and we would need a script to populate it. However, this implementation is to give an approximation before the full implementation.

Testing

  • Switch to the participationType - git checkout participationType
  • Pull the changes - git pull & git fetch origin
  • Reset the test database - database/reset_database.sh test
  • Test the case - tests/run_tests.sh
  • Then reset the database - database/reset_database.sh from-backup
  • Run the application - flask run
  • Go to Sidebar > Search Student > User profile > participation History drop down to see the changes

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 2, 2026

View Code Coverage

Copy link
Copy Markdown
Contributor

@bakobagassas bakobagassas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code and the UI all look good to me! I am just still wondering about the Labor & Volunteer tag, as you cannot get paid for something you are volunteering for, but I guess that would be another issue. Good Job!

Copy link
Copy Markdown
Contributor

@RueHaile RueHaile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that we are using alias here which makes sense but it makes it merely a virtual column what do you think about making it a database column? As it seems like a good plus. It could be a new pr idea.
All looks good!

@RueHaile RueHaile merged commit 0a01840 into development May 4, 2026
5 checks passed
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

Successfully merging this pull request may close these issues.

Include participation type in participation history

3 participants