YourITGroup / MemberListView

Back-Office Member Management for Umbraco 7 & 8
27 stars 18 forks source link

Sort on columns 'Approved' and 'Locked Out' not working correctly #40

Closed Pieter-vdh closed 1 year ago

Pieter-vdh commented 1 year ago

Hi

I noticed that the ascending and descending sort for columns 'Approved' and 'Locked Out' was not working. It turns out that the alias of the column is causing the issue.

File dashboard\memberManager.controller.js

        { alias: 'email', header: 'Email', isSystem: 1 },
        { alias: 'memberGroups', header: 'Groups', isSystem: 0 },
        { alias: 'isApproved', header: 'Approved', isSystem: 0 },
        { alias: 'isLockedOut', header: 'Locked Out', isSystem: 0 }

They should have a capital i because the field name is also capitalized. After replacing the aliases with

        { alias: 'email', header: 'Email', isSystem: 1 },
        { alias: 'memberGroups', header: 'Groups', isSystem: 0 },
        { alias: 'IsApproved', header: 'Approved', isSystem: 0 },
        { alias: 'IsLockedOut', header: 'Locked Out', isSystem: 0 }

And also changing the MemberListItem model DataMember names to the same value, it's now working for me.

Can you take a look at this? It's either something on my end or a bug in the code.

Thanks Pieter

robertjf commented 1 year ago

Hi @Pieter-vdh can you please let me know what version of Umbraco and MemberListView you are using?

Thanks, Rob

Pieter-vdh commented 1 year ago

Hi @robertjf This is for the latest version 3.0.1 on Umbraco 10.3.2

robertjf commented 1 year ago

@Pieter-vdh there's a new version available that will resolve this, but you'll need to rebuild your member search index. Basically, I've changed the way the fields are indexed to be consistent with the built-in ones. This should also help to avoid confusion. The changes you've detailed above are no longer necessary with this change.

Let me know if you still have any problems!

Pieter-vdh commented 1 year ago

Thanks very much, Robert!