Error in JobItemForm when displaying an entity inherited from JobItem with new statuses

Created on 28 May 2025, about 2 months ago

Problem/Motivation

Error displaying custom entity inherited from JobItem.

Steps to reproduce

1 - We have a custom entity that extends the JobItem entity defined in your module.
2 - This custom entity defines new states apart from the states of the JobItem parent entity.
3 - The problem occurs when displaying the new entity that inherits from JobItem and it has a new custom state.

Proposed resolution

The JobItemForm only displays the JobItem states. I suggest changing line 91 of the JobItemForm form $states = JobItem::getStates(); to $states = $this->entity::getStates();. This would allow the states defined in the getStates() method to be displayed regardless of whether it is a JobItem or a child class of that entity with new states.

🐛 Bug report
Status

Active

Version

1.17

Component

Core

Created by

🇪🇸Spain xurdep Gijón

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024