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

fix: Favoriting room through rooms page #31554

Merged
merged 13 commits into from
Feb 5, 2024

Conversation

shivang-16
Copy link
Contributor

@shivang-16 shivang-16 commented Jan 26, 2024

Proposed changes

Fixed a bug where the favorite field in the save room settings payload was being overridden by the favorite field returned from the getDirtyFields function. Consequently, this resulted in always sending the favorite field as undefined to the back-end. Deleting the field before building the payload solved the issue.

Demo gif:
rooms_favorite_regression

Issue(s)

Closes #31545

Steps to test or reproduce

Introduced here: #28318

  1. Go to > Home > Customise > Rooms
  2. Click on any room > try to update favourite setting

WM-225

@shivang-16 shivang-16 requested a review from a team as a code owner January 26, 2024 22:11
Copy link

changeset-bot bot commented Jan 26, 2024

🦋 Changeset detected

Latest commit: 8fa6543

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 30 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/gazzodown Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/api-client Patch
@rocket.chat/license Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/ddp-client Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/models Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/instance-status Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@shivang-16 shivang-16 changed the title fix:Added toggleFavorite method while updating favorite setting in roomInformation fix:added toggleFavorite method while updating favorite setting in roomInformation Jan 26, 2024
@shivang-16 shivang-16 changed the title fix:added toggleFavorite method while updating favorite setting in roomInformation fix: added toggleFavorite method while updating favorite setting in roomInformation Jan 26, 2024
Copy link

codecov bot commented Jan 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (develop@ef68359). Click here to learn what that means.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             develop   #31554   +/-   ##
==========================================
  Coverage           ?   46.18%           
==========================================
  Files              ?     2924           
  Lines              ?    75410           
  Branches           ?    15432           
==========================================
  Hits               ?    34828           
  Misses             ?    36316           
  Partials           ?     4266           
Flag Coverage Δ
e2e 42.22% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

@shivang-16
Copy link
Contributor Author

shivang-16 commented Jan 26, 2024

There is a problem occurring with retaining the favorite setting in room information. Upon investigation, it appears that there are issues with the data obtained from the API endpoint 'GET', '/v1/rooms.adminRooms.getRoom'. Specifically, the favorite option is not included in the data retrieved from this API, causing difficulties in preserving the saved favorite setting.
Screenshot 2024-01-27 at 3 28 33 AM

That's why when attempting to retain the value from the data obtained through the aforementioned API, the favorite option is not present.

Screenshot 2024-01-27 at 3 29 53 AM

can anybody please help me with this issue??

@rique223
Copy link
Contributor

There is a problem occurring with retaining the favorite setting in room information. Upon investigation, it appears that there are issues with the data obtained from the API endpoint 'GET', '/v1/rooms.adminRooms.getRoom'. Specifically, the favorite option is not included in the data retrieved from this API, causing difficulties in preserving the saved favorite setting. Screenshot 2024-01-27 at 3 28 33 AM

That's why when attempting to retain the value from the data obtained through the aforementioned API, the favorite option is not present.

Screenshot 2024-01-27 at 3 29 53 AM can anybody please help me with this issue??

Hey Shivang, thanks for your contribution. I did a small research on this but there's still some loose ends so I sent this issue to engineering and will get in touch as soon as I have some clarifications.

@shivang-16
Copy link
Contributor Author

There is a problem occurring with retaining the favorite setting in room information. Upon investigation, it appears that there are issues with the data obtained from the API endpoint 'GET', '/v1/rooms.adminRooms.getRoom'. Specifically, the favorite option is not included in the data retrieved from this API, causing difficulties in preserving the saved favorite setting. Screenshot 2024-01-27 at 3 28 33 AM
That's why when attempting to retain the value from the data obtained through the aforementioned API, the favorite option is not present.
Screenshot 2024-01-27 at 3 29 53 AM
can anybody please help me with this issue??

Hey Shivang, thanks for your contribution. I did a small research on this but there's still some loose ends so I sent this issue to engineering and will get in touch as soon as I have some clarifications.

okay and Thanks

@rique223 rique223 changed the title fix: added toggleFavorite method while updating favorite setting in roomInformation fix: Favoriting room through rooms page Jan 27, 2024
@gabriellsh
Copy link
Member

Hello, thanks for reporting this issue!

This favorite toggle on admin is NOT related to your favorite rooms. It behaves pretty much the same as the default toggle, in the sense that it will flag the rooms as favorite when new people join the workspace.

@rique223 rique223 changed the title fix: Favoriting room through rooms page regression: Favoriting room through rooms page Jan 29, 2024
@rique223 rique223 added this to the 6.6 milestone Jan 29, 2024
Fixed a bug where the favorite field in the save room settings payload was being overridden by the favorite field returned from the getDirtyFields function. Consequently, this resulted in always sending the favorite field as undefined to the back-end. Deleting the field before building the payload solved the issue.
@rique223 rique223 changed the title regression: Favoriting room through rooms page fix: Favoriting room through rooms page Jan 29, 2024
@hugocostadev hugocostadev removed this from the 6.6 milestone Jan 30, 2024
@hugocostadev hugocostadev added this to the 6.7 milestone Jan 30, 2024
hugocostadev
hugocostadev previously approved these changes Jan 30, 2024
@rique223 rique223 self-assigned this Feb 2, 2024
@dionisio-bot dionisio-bot bot added stat: ready to merge PR tested and approved waiting for merge and removed stat: needs QA labels Feb 5, 2024
@dionisio-bot dionisio-bot bot added stat: ready to merge PR tested and approved waiting for merge and removed stat: ready to merge PR tested and approved waiting for merge labels Feb 5, 2024
@kodiakhq kodiakhq bot merged commit 5c29cec into RocketChat:develop Feb 5, 2024
43 checks passed
sampaiodiego pushed a commit that referenced this pull request Feb 17, 2024
Co-authored-by: Henrique Guimarães Ribeiro <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
communityPR stat: QA skipped stat: ready to merge PR tested and approved waiting for merge
Projects
Development

Successfully merging this pull request may close these issues.

"Favorite" Setting in Room Settings Not Functioning
5 participants