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

[16.0][FIX] spreadsheet_oca: Clean searchParams of problematic context keys #49

Merged

Conversation

CarlosRoca13
Copy link
Contributor

@CarlosRoca13 CarlosRoca13 commented Sep 26, 2024

Before these changes, when a table or chart was added with an active user filter, the user's selections were not respected, either in the groupings or in the measures.

Thanks to these changes, we remove the conflicting keys from the context passed through the searchParams, thus respecting the user's selection in the table/chart itself.

Steps to reproduce the problem:

  1. Go to a pivot or graph
  2. Save a filter
  3. Modify the groups or measures
  4. Add to a spreadsheet

Current behavior: The table will not be added with the current selection but it will be added with the filters groups and measures.

Expected behavior: The table will be added with the current selection.

cc @Tecnativa TT50997

ping @pedrobaeza @chienandalu

@pedrobaeza pedrobaeza added this to the 16.0 milestone Sep 26, 2024
@pedrobaeza
Copy link
Member

The table will not be added with the current selection but it will be added with the filters groups and measures.

So it's not respecting the dimensions added through the + on the pivot itself?

@CarlosRoca13
Copy link
Contributor Author

So it's not respecting the dimensions added through the + on the pivot itself

That's it

@pedrobaeza
Copy link
Member

But that's not correct... we need to keep what we are seeing in the screen.

@CarlosRoca13
Copy link
Contributor Author

But that's not correct... we need to keep what we are seeing in the screen.

Yes, that's the problem before this PR, the table inserted was not respecting what the user sees... The groupbys/measures/order saved on the context of the filter is overwriting the current selection

Before these changes, when a table or chart was added with an active
user filter, the user's selections were not respected, either in the
groupings or in the measures.

Thanks to these changes, we remove the conflicting keys from the context
passed through the searchParams, thus respecting the user's selection in
the table/chart itself.

Steps to reproduce the problem:

1. Go to a pivot or graph
2. Save a filter
3. Modify the groups or measures
4. Add to a spreadsheet

Current behavior: The table will not be added with the current selection
but it will be added with the filters groups and measures.

Expected behavior:  The table will be added with the current selection.
@CarlosRoca13 CarlosRoca13 force-pushed the 16.0-FIX-spreadsheet_oca-context-clean branch from 5c609ae to a1d1892 Compare September 26, 2024 11:00
@CarlosRoca13
Copy link
Contributor Author

Changed commit and description message to clarify the PR

Copy link

@carlos-lopez-tecnativa carlos-lopez-tecnativa left a comment

Choose a reason for hiding this comment

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

Tested functionally

@pedrobaeza
Copy link
Member

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 16.0-ocabot-merge-pr-49-by-pedrobaeza-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 5ef4eed into OCA:16.0 Sep 26, 2024
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 086ab44. Thanks a lot for contributing to OCA. ❤️

@pedrobaeza pedrobaeza deleted the 16.0-FIX-spreadsheet_oca-context-clean branch September 26, 2024 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants