Open Closed

Moving an Organization Unit to a different parent by drag drop does not work #628


User avatar
0
michael.sudnik created
  • ABP Framework version: v4.0.0 RC5
  • UI type: MVC
  • Tiered (MVC) or Identity Server Seperated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:

When I try to move an organization unit to a different parent (e.g. move Production under Central)... I can see in the preview that I am requesting to move it where I want to

and the confirmation dialog is correct. However, after completion, it has not moved. This appears to be the case when trying to move organization units to any different level, including to the root level.

Mike


5 Answer(s)
  • User Avatar
    0
    alper created
    Support Team Director

    this is my test with 4.0.0 it works ... can you try to update to the latest

  • User Avatar
    0
    michael.sudnik created

    i have not yet tried this yet, but my instinct is that maybe this is a problem with the mongodb specific version. I have not made any modifications to the main application and only created custom modules, so I would have expected this to work. Which db did you use for your test? I will create a new solution and do some more investigating when i get a chance.

  • User Avatar
    0
    alper created
    Support Team Director

    EF Core (SQL Server)

  • User Avatar
    0
    michael.sudnik created

    I was able to fix this myself by replacing the OrganizationUnitManagerservice and override the MoveAsync method so that it calledOrganizationUnitRepository.UpdateAsync after making any changes to properties of any OrganizationUnit.

    One problem I had, was that I couldn't readily access the OrganizationUnit.Code or OrganizationUnit.ParentId property setters, as they were marked as internal. I had to use reflection to set the properties to combine the existing method functionaliy with the fix.

    I'm not sure how it worked for you, as this layer of code is not database specific, and I wouldn't have expected it to work for Entity Framework either.

  • User Avatar
    0
    alper created
    Support Team Director

    I was able to fix this myself by replacing the OrganizationUnitManagerservice and override the MoveAsync method so that it calledOrganizationUnitRepository.UpdateAsync after making any changes to properties of any OrganizationUnit.

    That means MongoDb repository doesn't update it. I'll open an issue for this problem and try to reproduce it. We'll fix this in the next version if there's a bug.


    Issue no: #4357

Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09