Phantom changes of relationship fields in audit log
krystofNovotny opened this issue · 0 comments
krystofNovotny commented
ObjectBefore
doesn't contain relationship fields, but ObjectAfter
does.
When looking for changes between before
and after
, relationship fields always show up making it look like their values are being changed all the time.
Description by example:
Given:
Managed object, relationship field roles
, property prop
{
"prop": "foo",
"roles": "[list-of-actual-roles]"
}
When:
prop
property value is changed
Then:
Audit log is created with the following values:
ObjectBefore:
{
"prop": "foo"
}
ObjectAfter:
{
"prop": "bar",
"roles": "[list-of-actual-roles]"
}
This looks as if roles were added.
Expected behavior:
Audit log is created with ObjectBefore
looking like this:
{
"prop": "foo",
"roles": "[list-of-actual-roles]"
}
ObjectAfter:
{
"prop": "bar",
"roles": "[list-of-actual-roles]"
}