- body: '# Changes proposed ✍️\r\nBug: Due to this previous change ([PR](https://github.com/CrowdDotDev/crowd.dev/pull/823/files#diff-987f06572bad79c47ef62d518a7a4e419dda775d942d365da55dc5509acf5291R44)), the `activityType` and `platform` were being stored in lowerCase in all activities. However, in the settings object it remained with the original value. So currently there is an inconsistency between custom activity type keys in activities and settings.\r\nTo fix this I\'m lowerCasing custom activity type and platform keys on their creation and migrating the existing ones to lowerCase as well.\r\n\r\nExample of problem:\r\nTenant settings:\r\n```\r\n{\r\n "Conference": {\r\n "Registered to a conference": {\r\n "display": {\r\n "short": "Registered to a conference",\r\n "channel": "",\r\n "default": "Registered to a conference"\r\n },\r\n "isContribution": false\r\n },\r\n },\r\n "other": {\r\n "This is a test": {\r\n "display": {\r\n "short": "This is a test",\r\n "channel": "",\r\n "default": "This is a test"\r\n },\r\n "isContribution": false\r\n }\r\n }\r\n}\r\n```\r\nActivity payload:\r\n`platform` and `activityType` fields:\r\n```\r\nplatform: \'luma\',\r\nactivityType: \'registered to a conference\'\r\n\r\nor\r\n\r\nplatform: \'other\',\r\nactivityType: \'this is a test\'\r\n```\r\n\r\nWith these changes the activity payload should remain the same but the tenant settings should be fixed to:\r\n```\r\n{\r\n "conference": {\r\n "registered to a conference": {\r\n "display": {\r\n "short": "Registered to a conference",\r\n "channel": "",\r\n "default": "Registered to a conference"\r\n },\r\n "isContribution": false\r\n },\r\n },\r\n "other": {\r\n "this is a test": {\r\n "display": {\r\n "short": "This is a test",\r\n "channel": "",\r\n "default": "This is a test"\r\n },\r\n "isContribution": false\r\n }\r\n }\r\n}\r\n```\r\n\r\n### What\r\n<!--\r\ncopilot:summary\r\n-->\r\n### <samp>🤖 Generated by Copilot at b11dfa1</samp>\r\n\r\nThe pull request standardizes the keys for custom activity types to use lowercase in the `settings` table and the `SettingsService` class. This avoids case sensitivity issues and improves data consistency across the application.\r\n\r\n<!--\r\ncopilot:poem\r\n-->\r\n### <samp>🤖 Generated by Copilot at b11dfa1</samp>\r\n\r\n> _`customActivityTypes`_\r\n> _Lowercase keys for all seasons_\r\n> _`typeKey` follows_\r\n\r\n### Why\r\n\r\n\r\n### How\r\n<!--\r\ncopilot:walkthrough\r\n-->\r\n### <samp>🤖 Generated by Copilot at b11dfa1</samp>\r\n\r\n* Standardize the keys for custom activity types to use lowercase in the database and the service layer ([link](https://github.com/CrowdDotDev/crowd.dev/pull/843/files?diff=unified&w=0#diff-a9626422cfa5c6888ed594d5114bffc0c4113699b7f39d1c4c456da8bd72c812L1-R13), [link](https://github.com/CrowdDotDev/crowd.dev/pull/843/files?diff=unified&w=0#diff-2908c7bb18ca4494942ee153161abc5555bdd9516fc2d225a406d785b5787711L24-R24))\r\n* Update the `customActivityTypes` column in the `settings` table using the SQL script `V1683627959__customActivityTypesKeys.sql` ([link](https://github.com/CrowdDotDev/crowd.dev/pull/843/files?diff=unified&w=0#diff-a9626422cfa5c6888ed594d5114bffc0c4113699b7f39d1c4c456da8bd72c812L1-R13))\r\n* Modify the `typeKey` variable in the `SettingsService` class to match the database format ([link](https://github.com/CrowdDotDev/crowd.dev/pull/843/files?diff=unified&w=0#diff-2908c7bb18ca4494942ee153161abc5555bdd9516fc2d225a406d785b5787711L24-R24))\r\n\r\n## Checklist ✅\r\n- [x] Label appropriately with `Feature`, `Improvement`, or `Bug`.\r\n- [ ] Add screehshots to the PR description for relevant FE changes\r\n- [ ] New backend functionality has been unit-tested.\r\n- [ ] API documentation has been updated (if necessary) (see [docs on API documentation](https://docs.crowd.dev/docs/updating-api-documentation)).\r\n- [ ] [Quality standards](https://github.com/CrowdDotDev/crowd-github-test-public/blob/main/CONTRIBUTING.md#quality-standards) are met.\r\n',
0 commit comments