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: Set mapped consent name from server to lowercase #47

Merged
merged 1 commit into from
Apr 12, 2024

Conversation

rmi22186
Copy link
Collaborator

@rmi22186 rmi22186 commented Apr 12, 2024

Instructions

  1. PR target branch should be against development
  2. PR title name should follow this format: https://github.com/mParticle/mparticle-workflows/blob/main/.github/workflows/pr-title-check.yml
  3. PR branch prefix should follow this format: https://github.com/mParticle/mparticle-workflows/blob/main/.github/workflows/pr-branch-check-name.yml

Summary

While consent purposes can be inputted into the web sdk via any casing, the SDK will automatically lowercase them to prevent pseudo-duplicate consent purposes. In the UI, these have a capital first letter, and the server sends them back with a capital first letter also. To keep it all consistent, we should lowercase what comes back from the server.

I also added this comment in our onetrust kit so that future developers are aware - mparticle-integrations/mparticle-javascript-integration-onetrust@7546883#diff-105894ea1c74ee2f835325f6211da57e6a15a8236598d11a9ea6b0e7a8f29b47R87-R93

Testing Plan

  • Was this tested locally? If not, explain why.
    Tested on local app. Updated unit tests. When updating the unit tests with a capital 1st letter, it fails a bunch of tests. Then when adding toLowerCase, tests run properly.

Reference Issue (For mParticle employees only. Ignore if you are an outside contributor)

@rmi22186 rmi22186 merged commit 985ef14 into development Apr 12, 2024
2 checks passed
github-actions bot pushed a commit that referenced this pull request Apr 16, 2024
## [2.1.2](v2.1.1...v2.1.2) (2024-04-16)

### Bug Fixes

* Set mapped consent name from server to lowercase ([#47](#47)) ([985ef14](985ef14))
@mparticle-automation
Copy link
Collaborator

🎉 This PR is included in version 2.1.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants