SFDO-Community / Salesforce-Indicators

Indicators Lightning Web Component
https://github.com/SFDO-Community-Sprints/Salesforce-Indicators/wiki
BSD 3-Clause "New" or "Revised" License
61 stars 19 forks source link

Contains is NOT case sensitive [BUG] #147

Closed annaloughnanrad closed 10 months ago

annaloughnanrad commented 11 months ago

At the extension level (where I have picked it up): using the provided option Indicator Item Extension, Contains Text

if you do not enter the text value as in the field, extension will not be activated.

EG Contains Text "partner" will not display partner icon, but Contains Text "Partner" will display icon.

Tested against Type on Account on dev org with values such as "Technology Partner"

IMHO not necessarily an issue as long as it is made crystal clear in the documentation - I am used to searching with contains being case sensitive on some platforms but for Indicators Jodie said the intent was for it to be case insensitive!

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

tschug commented 11 months ago

Thanks for this!

We will have a fix in the works already (without realizing this bug) when we add support for other matching criteria

For interested parties - the code is here where we will be converting to lowercase and then comparing (even for Equals, based on feedback from the Oct 2023 Chicago Sprint team) : https://github.com/SFDO-Community/Salesforce-Indicators/blob/66778d074ca4123db35cb513170632438bfb7936/force-app/main/default/lwc/indicatorBundle/indicatorBundle.js#L215-L237