Change config UI#8
Conversation
| $migration->displayMessage("Installing $table"); | ||
| $query = "CREATE TABLE IF NOT EXISTS `$table` ( | ||
| `id` int unsigned NOT NULL AUTO_INCREMENT, | ||
| `is_active` tinyint NOT NULL DEFAULT '1', |
There was a problem hiding this comment.
You should drop this column if table already exist
There was a problem hiding this comment.
The plugin hasn't been released yet
| `mandatory_task_group` tinyint NOT NULL DEFAULT '0', | ||
| PRIMARY KEY (`id`), | ||
| KEY `entities_id` (`entities_id`), | ||
| KEY `is_active` (`is_active`) |
There was a problem hiding this comment.
You should drop this column if table already exist
There was a problem hiding this comment.
Same as is_active : the plugin hasn't been released yet
| 'take_requester_group_ticket', | ||
| 'take_requester_group_change', | ||
| 'take_requester_group_problem', | ||
| 'take_technician_group_ticket', | ||
| 'take_technician_group_change', | ||
| 'take_technician_group_problem', |
There was a problem hiding this comment.
should be replaced by getActorGroupConfigFields
There was a problem hiding this comment.
Can you add a test case where the child entity fields are set to Config::CONFIG_PARENT, verify that the inherited value from the parent propagates to Controller::checkTaskRequirements, and assert both the blocked (empty mandatory fields) and unblocked (filled mandatory fields) outcomes?
| return self::getConfig($parentId, true); | ||
| $parentConfig = self::getConfig((int) $entity->fields['entities_id'], true); | ||
| $allFields = array_merge( | ||
| self::getItilConfigFields(), |
There was a problem hiding this comment.
getConfig() merges getActorGroupConfigFields() into the CONFIG_PARENT resolution loop, but no code path ever stores CONFIG_PARENT in an actor group field: addConfig() (line 249) and install() (line 371) only set CONFIG_PARENT for getItilConfigFields() fields, and the UI dropdown getSelectableActorGroup() only exposes 0/1/2. The getActorGroupConfigFields() branch inside the resolution loop is therefore unreachable. Either remove getActorGroupConfigFields() from the merge or add CONFIG_PARENT as a selectable option in the dropdown.
Checklist before requesting a review
Please delete options that are not relevant.
Description
Change to the configuration interface (switch from checkboxes to “Yes”/‘No’ options with the “Inheritance” option)
Screenshots (if appropriate):