Skip to content

Phantom changes of relationship fields in audit log #117

@krystofNovotny

Description

@krystofNovotny

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]"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions