Skip to content

Statusreasons and statecode issue #244

@Rune2292

Description

@Rune2292

Describe the bug
When creating a entity which has multiple different status reasons it will override any explicit declaration of status reason, when creating, with the default one. But the one defined during creation will be used throughout any plugins,
For example if you create an entity with statusreason "Testing", any plugins will handle the entity as in the "Testing" status with state as "null", but after all plugins has run the statusreason will be set as the default one. So if the default statusreason is "Not Tested", then during creation the entity will have "Testing" in plugins but "Not tested" after creation.
This is no matter if the statusreason belongs to an active or inactive state - which also seems like a bug, as an object created with an inactive state should throw an exception, not just override it with an active state.

To Reproduce
Steps to reproduce the behavior:

  1. Make entity with atleast 2 statusreasons.
  2. Create the entity with the non default statusreason.
  3. Set breakpoint in plugin, see the statusreason
  4. See statusreason after creation

Expected behavior
The entity should have the specified statusreason after creation - if it is a valid statusreason i.e in a create, the status reason must be in an active state. If it is not valid, an error should be thrown.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions