microsoft-search / pnp-modern-search

Home of PnP Modern Search solutions, helping you move from classic to modern SharePoint and beyond
https://microsoft-search.github.io/pnp-modern-search
Other
390 stars 341 forks source link

replace refinableyesno token #3998

Open friendbool opened 2 months ago

friendbool commented 2 months ago

See https://github.com/SharePoint/sp-dev-docs/issues/9098 When using a YesNo type refiner, the tokens ǂǂ54727565 and ǂǂ46616c7365 do not work. In this case, I replace the tokens with the values true and false. Feel free to modify my code 👋

sonarcloud[bot] commented 2 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

wobba commented 2 months ago

This is interesting indeed and not really expected. Replacing with the strings are an ok workaround for sure. If the same issue also applies to OOB YesNo properties, then I'm wondering if we should rather test on the hex value and not on the property name?

friendbool commented 2 months ago

Since the issue appears to be related to the refinement of YesNo fields, in SharePoint Online, the only YesNo fields enabled for refinement are those named RefinableYesNoXX. Therefore, we perform a double check: first on the field name and then on the field value. If you believe it would be better to remove the check on the field name, please proceed. Have a good evening, bye.

wobba commented 2 months ago

There are a few other oob ones, but likely not important. I'll see internally if we can fix this before merging as the issue present on Graph API as well.

wobba commented 1 month ago

@friendbool can you log this as an API issue on Graph so Microsoft gets a customer reporting it?