-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Webhook: Can't edit the webhook configuration for ITILFollowup
- multiple array exceptions
#21181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Webhook: Can't edit the webhook configuration for ITILFollowup
- multiple array exceptions
#21181
Conversation
ITILFollowup
ITILFollowup
ITILFollowup
- multiple array exceptions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to conflict with some changes proposed in #21136.
I've updated to pick part of what @SebSept did in his PR |
phpunit/functional/WebhookTest.php
Outdated
public function testGetMonacoSuggestions() | ||
{ | ||
$itemtypes = \Webhook::getItemtypesDropdownValues(); | ||
$noSuggestions = ['Document_Item']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cconard96 Could you validate that having no suggestions for Document_Item
is expected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it isn't. No itemtype option for webhooks should be missing suggestions because if they are, it means the feature is broken for that itemtype and doesn't know how to get the data from the API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This itemtype is likely broken because it is provided by ManagementController, not ITILController.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know where the schema is declared so I can see why document is not returned in ITILController
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be in ITILController::225
but I don't see any reference to the Document type, maybe this schema is missing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In getAPIItemtypeData
the Document_Item::class entry needs moved under the ManagementController
array so it knows where to find the schema.
Currently, the possible parents for "subtypes" only account for the classes listed under the "main" array for each controller. This should be changed to look in all of the "main" arrays. For any cases where an empty array is used, we could continue using all "main" itemtypes in its own controller or switch them to a static list. I would prefer a static list at this point for more stability.
Checklist before requesting a review
Description
When creating a webhook for the
ITILFollowup
we got some exception about missing array key value (parent
) or an array key allocation with the key being an array and not a string making the suggestion not workingScreenshots: