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

IBX-7809: Fixed passing locationId instead of contentId when creating UserMetadata criterion from UserGroupLimitationType level #403

Conversation

konradoboza
Copy link
Member

@konradoboza konradoboza commented Feb 22, 2024

Question Answer
JIRA issue IBX-7809
Type bug
Target Ibexa version v3.3, 4.5, 4.6
BC breaks no

Apparently, UserGroupLimitationType contains a wrong usage of UserMetadata criterion - it works with content ids whereas ids of parent locations were passed. That resulted in empty subitems list when Content Type Group: Self limitation was put in place - it basically converts to the mentioned criterion but simply populates wrong parameters.

Checklist:

  • Provided PR description.
  • Tested the solution manually.
  • Provided automated test coverage.
  • Checked that target branch is set correctly (master for features, the oldest supported for bugs).
  • Ran PHP CS Fixer for new PHP code (use $ composer fix-cs).
  • Asked for a review (ping @ezsystems/engineering-team).

…ting `UserMetadata` criterion from `UserGroupLimitationType` level
@konradoboza konradoboza added Bug Something isn't working Ready for review labels Feb 22, 2024
@konradoboza konradoboza self-assigned this Feb 22, 2024
@konradoboza
Copy link
Member Author

Discussing best way to add test coverage.

@konradoboza
Copy link
Member Author

Added test case covering the scenario described in the JIRA ticket (it fails without introducing the actual fix).

@konradoboza konradoboza requested review from alongosz and a team February 23, 2024 11:19
@alongosz alongosz requested a review from a team February 23, 2024 11:27
@alongosz
Copy link
Member

Note: CI is failing.

@konradoboza
Copy link
Member Author

konradoboza commented Feb 23, 2024

Yeah, apparently Solr (and probably Elastic)-related changes are needed too. simple reindex did the trick. At least added test seems to do the job. ;)

@konradoboza konradoboza force-pushed the ibx-7809-fixed-user-metadata-criterion-to-properly-handle-locations branch from efa242f to 001e9e6 Compare February 23, 2024 14:01
Copy link

sonarcloud bot commented Feb 23, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

@tomaszszopinski tomaszszopinski left a comment

Choose a reason for hiding this comment

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

QA approved on IbexaDXP on 3.3 oss & content (ES)

@alongosz alongosz merged commit 8ef0e70 into 1.3 Mar 8, 2024
23 checks passed
@alongosz alongosz deleted the ibx-7809-fixed-user-metadata-criterion-to-properly-handle-locations branch March 8, 2024 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working QA approved
Development

Successfully merging this pull request may close these issues.

5 participants