Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed fetch events bug #2308

Merged
merged 4 commits into from
Jan 6, 2024
Merged

fixed fetch events bug #2308

merged 4 commits into from
Jan 6, 2024

Conversation

Azad99-9
Copy link

@Azad99-9 Azad99-9 commented Jan 6, 2024

What kind of change does this PR introduce?

This PR fixes the event fetching bug in explore events page.

Issue Number:

Fixes #2307

Did you add tests for your changes?

Snapshots/Videos:

Screenshot_20240106-041619

If relevant, did you update the documentation?

Summary

Removed a field name registrants from the query which is not actually defined for the Collection Event in the database.

Does this PR introduce a breaking change?

No

Other information

Have you read the contributing guide?
Yes

Copy link

github-actions bot commented Jan 6, 2024

Our Pull Request Approval Process

We have these basic policies to make the approval process smoother for our volunteer team.

Testing Your Code

Please make sure your code passes all tests. Our test code coverage system will fail if either of these two conditions occur:

  1. The overall code coverage drops below the target threshold of the repository
  2. Any file in the pull request has code coverage levels below the repository threshold

The process helps maintain the overall reliability of the code base and is a prerequisite for getting your PR approved. Assigned reviewers regularly review the PR queue and tend to focus on PRs that are passing.

Reviewers

When your PR has been assigned reviewers contact them to get your code reviewed and approved via:

  1. comments in this PR or
  2. our slack channel

Reviewing Your Code

Your reviewer(s) will have the following roles:

  1. arbitrators of future discussions with other contributors about the validity of your changes
  2. point of contact for evaluating the validity of your work
  3. person who verifies matching issues by others that should be closed.
  4. person who gives general guidance in fixing your tests

Other

🎯 Please be considerate of our volunteers' time. Contacting the person who assigned the reviewers is not advised unless they ask for your input. Do not @ the person who did the assignment otherwise.

Copy link

codecov bot commented Jan 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6d95344) 92.37% compared to head (7eb0e54) 92.37%.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2308   +/-   ##
========================================
  Coverage    92.37%   92.37%           
========================================
  Files          158      158           
  Lines         7632     7632           
========================================
  Hits          7050     7050           
  Misses         582      582           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Azad99-9
Copy link
Author

Azad99-9 commented Jan 6, 2024

@noman2002 @Cioppolo14 @Kevoniat please assign reviewers for this PR.

Copy link
Member

@noman2002 noman2002 left a comment

Choose a reason for hiding this comment

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

Looks good.

@palisadoes palisadoes merged commit 0f20349 into PalisadoesFoundation:develop Jan 6, 2024
7 checks passed
@Dante291
Copy link

Dante291 commented Jan 6, 2024

@palisadoes @Azad99-9 @noman2002 This PR did solve the problem of Events not getting fetched but with the updated FetchOrgEvents Query we are not fetching information about attendees/registrants for the event.

That is this will always show zero even if there are registrants for the event

image

image

Also there is another bug in event info page where attendees are not getting fetched too

image

so I'm going to make a separate issue for this and work on it.

@Azad99-9
Copy link
Author

Azad99-9 commented Jan 6, 2024

@Dante291 please check there is no field called attendees/registrants in Event Collection. If it's there then definitely you can.

@Azad99-9
Copy link
Author

Azad99-9 commented Jan 6, 2024

@Dante291 I suggest, you can raise an issue in Talawa API asking for addition of fields

  1. Registrants.
  2. Event Image.

and any other if required to the Event Collection and then work on the previously mentioned issue.

So that not only the registrants but also the event Image bug also will be fixed. thanks.

@Dante291
Copy link

Dante291 commented Jan 6, 2024

@Dante291 I suggest, you can raise an issue in Talawa API asking for addition of fields

  1. Registrants.
  2. Event Image.

and any other if required to the Event Collection and then work on the previously mentioned issue.

So that not only the registrants but also the event Image bug also will be fixed. thanks.

@Azad99-9 I think registrants and attendees are basically same (I cross checked with admin portal too) so there is no requirement for registrant field for as we could fetch attendees by modifying the query.

about the event image part @palisadoes @noman2002 could you clarify whether it is needed or not?

@palisadoes
Copy link
Contributor

  1. Registrants are people who have expressed an interest in attending an event. This is useful when the event is housed in a venue with limited capacity.
  2. Attendees are those people who actually attended the event

If that distinction isn't present it will need to be.

@Dante291
Copy link

Dante291 commented Jan 7, 2024

  1. Registrants are people who have expressed an interest in attending an event. This is useful when the event is housed in a venue with limited capacity.
  2. Attendees are those people who actually attended the event

If that distinction isn't present it will need to be.

@palisadoes Currently we do not have any field like registrants in Event model of API, though there is query for fetching registrantsByEvent but it is not fetching registrants properly.

Also on admin portal we are considering registrants as attendees, and displaying data according to that I also checked there is no query like registrantsByEvent in Talawa-Admin to fetch registrants.

@palisadoes
Copy link
Contributor

I have created base issues for this.

What other issues will be necessary?

AVtheking pushed a commit to AVtheking/talawa that referenced this pull request Jan 8, 2024
* fixed events fetching bug

* fixed failing tests

* added comments to event_queries

* fixed failing test
palisadoes pushed a commit that referenced this pull request Jan 10, 2024
* written test for post_modal.dart

* written the missing test

* descriptive name to the key

* fix failing test

* created settings page (#2299)

* created settings page

* formatted the code

* fixed failing tests

* resolved requested changes

* fixed failing tests

* rebased

* descriptive name to the key

* Select contact test (#2301)

* Created Test

* Updated Formatting

* fixed fetch events bug (#2308)

* fixed events fetching bug

* fixed failing tests

* added comments to event_queries

* fixed failing test

* Refactor: Decouple ViewModel by Moving UI Logic to View (#2306)

* Refactor: Decouple ViewModel by Moving UI Logic to View

* refactoring app_settings_view_model and app_seetings_page

* writing test for missing lines

* fix: Removed all references to Google firebase (#2257)

* feature: Removed all references to Google firebase

* formatted firebase_mocks.dart

* removed ignore directive for custom lint rule

* formatted login_view_model file

* removal of commented code

* removed fcmToken test

* avoid dynamic calls check passed

* format check

* fixed linting issue

* added documentation for event_queries file

* format check

* Bump syncfusion_flutter_datepicker from 24.1.43 to 24.1.44 (#2315)

Bumps [syncfusion_flutter_datepicker](https://github.com/syncfusion/flutter-widgets/tree/master/packages) from 24.1.43 to 24.1.44.
- [Release notes](https://github.com/syncfusion/flutter-widgets/releases)
- [Commits](https://github.com/syncfusion/flutter-widgets/commits/HEAD/packages)

---
updated-dependencies:
- dependency-name: syncfusion_flutter_datepicker
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump url_launcher_platform_interface from 2.2.0 to 2.3.0 (#2314)

Bumps [url_launcher_platform_interface](https://github.com/flutter/packages/tree/main/packages/url_launcher) from 2.2.0 to 2.3.0.
- [Release notes](https://github.com/flutter/packages/releases)
- [Commits](https://github.com/flutter/packages/commits/url_launcher_platform_interface-v2.3.0/packages/url_launcher)

---
updated-dependencies:
- dependency-name: url_launcher_platform_interface
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump image_picker from 1.0.5 to 1.0.6 (#2313)

Bumps [image_picker](https://github.com/flutter/packages/tree/main/packages/image_picker) from 1.0.5 to 1.0.6.
- [Release notes](https://github.com/flutter/packages/releases)
- [Commits](https://github.com/flutter/packages/commits/image_picker-v1.0.6/packages/image_picker)

---
updated-dependencies:
- dependency-name: image_picker
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump video_player from 2.8.1 to 2.8.2 (#2317)

Bumps [video_player](https://github.com/flutter/packages/tree/main/packages/video_player) from 2.8.1 to 2.8.2.
- [Release notes](https://github.com/flutter/packages/releases)
- [Commits](https://github.com/flutter/packages/commits/video_player-v2.8.2/packages/video_player)

---
updated-dependencies:
- dependency-name: video_player
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump google_maps_flutter from 2.5.0 to 2.5.1 (#2316)

Bumps [google_maps_flutter](https://github.com/flutter/packages/tree/main/packages/google_maps_flutter) from 2.5.0 to 2.5.1.
- [Release notes](https://github.com/flutter/packages/releases)
- [Commits](https://github.com/flutter/packages/commits/google_maps_flutter-v2.5.1/packages/google_maps_flutter)

---
updated-dependencies:
- dependency-name: google_maps_flutter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* merged develop branch

* fix

* fix failing test

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Shaik Azad <120930148+Azad99-9@users.noreply.github.com>
Co-authored-by: Shivam Gupta <shivamggupta2604@gmail.com>
Co-authored-by: Parag Gupta <103507835+Dante291@users.noreply.github.com>
Co-authored-by: Abhishek Saini <78199221+Abhisheksainii@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
palisadoes pushed a commit to palisadoes/talawa that referenced this pull request Jan 10, 2024
* fixed events fetching bug

* fixed failing tests

* added comments to event_queries

* fixed failing test
palisadoes pushed a commit to palisadoes/talawa that referenced this pull request Jan 10, 2024
* written test for post_modal.dart

* written the missing test

* descriptive name to the key

* fix failing test

* created settings page (PalisadoesFoundation#2299)

* created settings page

* formatted the code

* fixed failing tests

* resolved requested changes

* fixed failing tests

* rebased

* descriptive name to the key

* Select contact test (PalisadoesFoundation#2301)

* Created Test

* Updated Formatting

* fixed fetch events bug (PalisadoesFoundation#2308)

* fixed events fetching bug

* fixed failing tests

* added comments to event_queries

* fixed failing test

* Refactor: Decouple ViewModel by Moving UI Logic to View (PalisadoesFoundation#2306)

* Refactor: Decouple ViewModel by Moving UI Logic to View

* refactoring app_settings_view_model and app_seetings_page

* writing test for missing lines

* fix: Removed all references to Google firebase (PalisadoesFoundation#2257)

* feature: Removed all references to Google firebase

* formatted firebase_mocks.dart

* removed ignore directive for custom lint rule

* formatted login_view_model file

* removal of commented code

* removed fcmToken test

* avoid dynamic calls check passed

* format check

* fixed linting issue

* added documentation for event_queries file

* format check

* Bump syncfusion_flutter_datepicker from 24.1.43 to 24.1.44 (PalisadoesFoundation#2315)

Bumps [syncfusion_flutter_datepicker](https://github.com/syncfusion/flutter-widgets/tree/master/packages) from 24.1.43 to 24.1.44.
- [Release notes](https://github.com/syncfusion/flutter-widgets/releases)
- [Commits](https://github.com/syncfusion/flutter-widgets/commits/HEAD/packages)

---
updated-dependencies:
- dependency-name: syncfusion_flutter_datepicker
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump url_launcher_platform_interface from 2.2.0 to 2.3.0 (PalisadoesFoundation#2314)

Bumps [url_launcher_platform_interface](https://github.com/flutter/packages/tree/main/packages/url_launcher) from 2.2.0 to 2.3.0.
- [Release notes](https://github.com/flutter/packages/releases)
- [Commits](https://github.com/flutter/packages/commits/url_launcher_platform_interface-v2.3.0/packages/url_launcher)

---
updated-dependencies:
- dependency-name: url_launcher_platform_interface
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump image_picker from 1.0.5 to 1.0.6 (PalisadoesFoundation#2313)

Bumps [image_picker](https://github.com/flutter/packages/tree/main/packages/image_picker) from 1.0.5 to 1.0.6.
- [Release notes](https://github.com/flutter/packages/releases)
- [Commits](https://github.com/flutter/packages/commits/image_picker-v1.0.6/packages/image_picker)

---
updated-dependencies:
- dependency-name: image_picker
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump video_player from 2.8.1 to 2.8.2 (PalisadoesFoundation#2317)

Bumps [video_player](https://github.com/flutter/packages/tree/main/packages/video_player) from 2.8.1 to 2.8.2.
- [Release notes](https://github.com/flutter/packages/releases)
- [Commits](https://github.com/flutter/packages/commits/video_player-v2.8.2/packages/video_player)

---
updated-dependencies:
- dependency-name: video_player
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump google_maps_flutter from 2.5.0 to 2.5.1 (PalisadoesFoundation#2316)

Bumps [google_maps_flutter](https://github.com/flutter/packages/tree/main/packages/google_maps_flutter) from 2.5.0 to 2.5.1.
- [Release notes](https://github.com/flutter/packages/releases)
- [Commits](https://github.com/flutter/packages/commits/google_maps_flutter-v2.5.1/packages/google_maps_flutter)

---
updated-dependencies:
- dependency-name: google_maps_flutter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* merged develop branch

* fix

* fix failing test

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Shaik Azad <120930148+Azad99-9@users.noreply.github.com>
Co-authored-by: Shivam Gupta <shivamggupta2604@gmail.com>
Co-authored-by: Parag Gupta <103507835+Dante291@users.noreply.github.com>
Co-authored-by: Abhishek Saini <78199221+Abhisheksainii@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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.

Explore Events page is failing to fetch Events.
4 participants