Base solution for your next web application
Open Closed

Bug when updating Organization Units from mobile #4992


User avatar
0
yachea created

FIXED (at my level) see below:

If you try to update any user by adding him to a specific OU (organisation Unit) it will add him to every OU you have.

1 - Create a couple of OU (with some hierarchies) 2- From the mobile assign a user to one OU and save it.

---> the user will be assigned to all the OU you have.

---------- FIXE :

private async Task SaveUser() { UserInput.User = Model.User; UserInput.AssignedRoleNames = Model.Roles.Where(x => x.IsAssigned).Select(x => x.RoleName).ToArray(); UserInput.OrganizationUnits = Model.OrganizationUnits.Where(x => x.IsAssigned).Select(x => x.Id).ToList();

Just add ".Where(x => x.IsAssigned)" filter to ligne shown upper.

NOTE : There is an issue for applying the hierarchy correctly though from mobile.

Selecting a parent OU doesn't select sub OUs automatically (where as the web version does it)


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    I couldn't reproduce this problem on the latest version. I think your problem is related to this issue <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/issues/888">https://github.com/aspnetzero/aspnet-ze ... issues/888</a>.

    Can you try to add datatables.net-select plugin to your project just like we did in below commit ?

    <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/commit/ea2d481db30a948e3ac997ab3abf239f8d8aa1e2">https://github.com/aspnetzero/aspnet-ze ... 9f8d8aa1e2</a>

    This commit contains the changes both for Angular and JQuery versions, so you can just take the changes for your version.