OneIdentity / IdentityManager.Imx

HTML5 source code for Identity Manager web apps
Other
28 stars 109 forks source link

Reset to previous state function doesn't show previously assigned members #161

Closed NielsDeGroot closed 1 month ago

NielsDeGroot commented 1 month ago

Server 9.2.1 and HTML5 applications July 3, 2024

When you use 'Reset to previous state' on a business or system role previously assigned members won't show up in the side sheet listing, but you can find the previously assigned members in the json response but the value of "CurrentValueDisplay" and "HistoryValueDisplay" are both "Not assigned".

Example: portal/history/Org/dc3526bd-852c-4af0-95ba-428363eb3b9d/comparison?CompareDate=%222024-07-11T22%3A00%3A00.000Z%22

    {
        "CurrentValueDisplay": "Not assigned",
        "HasChanged": false,
        "ChangeType": "Assigned",
        "HistoryValueDisplay": "Not assigned",
        "Property": "Gemma, Giuliano (G)",
        "TableName": "Person",
        "Id": "<Key><T>PersonInOrg</T><P>dc3526bd-852c-4af0-95ba-428363eb3b9d</P><P>daf3ce28-fce1-46a3-be9e-2adef32847e0</P></Key>"
    },
    {
        "CurrentValueDisplay": "Assigned",
        "HasChanged": true,
        "ChangeType": "Assigned",
        "HistoryValueDisplay": "Not assigned",
        "Property": "Kinski, Klaus (K)",
        "TableName": "Person",
        "Id": "<Key><T>PersonInOrg</T><P>dc3526bd-852c-4af0-95ba-428363eb3b9d</P><P>368ec518-575c-4644-b0e2-d3f02110eb4c</P></Key>"
    },

ResetToPreviousState

Regards, Niels

juancarloscamargo commented 1 month ago

Niels, it's working for me, both angular and api json. I haven't applied the lastest commit from July, 3rd. Server is 9.2 The json shows all the memberships and their changes on that time frame. The portal shows only the values that have changed. Both are fine.

NielsDeGroot commented 1 month ago

Hello Juan Carlos,

Thank you for taking the time to verify this! I tried this on different installations, with the same result.

When you assign and remove the identity on the same day the json output status for me is always:

"CurrentValueDisplay": "Not assigned", "HasChanged": false, "ChangeType": "Assigned", "HistoryValueDisplay": "Not assigned", "Property": "Gemma, Giuliano (G)",

So the logic in the API server doesn't consider this a change? In the manager tooling the time trace of the deleted assignment is correctly displayed.

I did see one recently removed member correctly displayed which was assigned some time ago. After looking in the DialogWatchOperation this member did not have an OperationType = 'I' entry for ObjectKeyOfRow = <Key><T>PersonHasESet</T><P>... (this entry was delete or moved to the history DB)

All the deleted assigments which have an OperationType = 'I' and OperationType = 'D' entry in the DialogWatchOperation for ObjectKeyOfRow = <Key><T>PersonHasESet</T><P> don't show up in the side sheet on the portal.

I will hide this feature in the portal until I fully understand it's working.

Thanks, Niels