The API call to the Alerts list is not getting correctly filtered results.
Get correctly filtered items from the Alerts list.
The API call which is getting the items from the Alerts list is not working properly because in the source code the call is broken down in multiple lines which is interpreted as white space in Sharepoint. It has to be in one line to work properly or have a "+" at the end of each line. Note that I have only tested this in Chrome, other browsers might interpret this correctly.
Create an item in the Alerts list and in the End date-time column insert a date and time which has already passed and notice that the alert at the top does not go away.
Thanks for your contribution! Sharing is caring.
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
Great catch!
I can also see this behavior.
Thank you for reporting this. We'll take a look!
@karigeir Very good catch, interesting. This has been fixed and committed to this repo. You can pull the latest master branch and simply replace the sppkg for this particular extension in your tenant app catalog, or you could reinstall the entire solution I suppose.
Side note, when using ` instead of ' or " in TypeScript, you can use multi-line strings with closing each line and added +. The catch here is that when the TS compiler turns that into valid JS, a new line i.e. n, is added to each line. That causes the query to be a mess. The fix was to simply replace with standard formatted JS strings, with the +.
Thanks again for finding this. I'll leave this issue open for a few days in case you have a moment to confirm the fix worked for you.
@eoverfield Thanks for the reply, this is the same solution I used to get it to work so I can confirm this does the trick :)
Most helpful comment
Thank you for reporting this. We'll take a look!