Hi Mabah, We're not able to reproduce the primary issue. Can you ask the customer to provide more detail as to how to recreate the issue. 1. What type of service does the service dialog belong to? 2. What type of custom button was added/deleted. 3. How did they add it to the service? A video showing the reproducer would be very helpful. Thanks, Tina
Hi Mabah, The customer states that "We have several old Dialogs." Can you ask the customer to recreate the issue with a new service dialog? Thanks, Tina
(In reply to Tina Fitzgerald from comment #8) > Hi Mabah, > > The customer states that "We have several old Dialogs." > Can you ask the customer to recreate the issue with a new service dialog? > > Thanks, > Tina Hi Tina, Sorry for the delayed response on this. I am OoO on PTO and just got back this morning. I will be working with the customer today and update the case. Thanks, Mamadou
Thanks for the info! I managed to reproduce the issue in question. Unfortunately the only way I could reproduce was by manually deleting the custom button using a delete in rails console -- an action that doesn't run callbacks and will not correctly remove the relationships necessary to be able to delete this. I don't think this is a valid issue for that reason. Precisely as you said in the description, destroy runs any callbacks on the model while delete doesn't. So anyone who runs a delete is going to end up with issues where the associations are still present and won't have been correctly removed.
Based on the fact that there is no way that I'm aware of for this issue to arise without manual deletion of the custom buttons outside the application, Dennis informs me I can close this ticket as not a bug.
(In reply to drew uhlmann from comment #13) > Based on the fact that there is no way that I'm aware of for this issue to > arise without manual deletion of the custom buttons outside the application, > Dennis informs me I can close this ticket as not a bug. Drew, let's not close it yet, until at least I get the video reproducer from the customer. I understand that you are only able to reproduce via the rails c, however the issue with the customer is that they cannot delete the buttons from UI. Thanks, Mamadou
>> or could the API be doing delete instead of destroy? Nope, I verified that on 5.10.11 an API custom button removal runs the callback.
https://github.com/ManageIQ/manageiq/pull/19574
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/773a1547fb99d0fb1b91d28ce1f6ce5f53f44490 commit 773a1547fb99d0fb1b91d28ce1f6ce5f53f44490 Author: Martin Hradil <mhradil> AuthorDate: Tue Dec 3 16:43:01 2019 -0500 Commit: Martin Hradil <mhradil> CommitDate: Tue Dec 3 16:43:01 2019 -0500 Dialog#destroy should ignore resource actions linking nonexisting entities Currently, if you have a Dialog associated with a Custom Button, and `delete` the custom button (as opposed to `destroy`; that should not happen, but apparently does), deleting the dialog will fail, because `ra.resource_type.constantize.find(ra.resource_id)` throws an exception as the resource no longer exists. (The resource being a removed custom button.) So, updating `reject_if_has_resource_action` to ignore resource actions pointing to nonexistent resources. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1770300 app/models/dialog.rb | 8 +- spec/models/dialog_spec.rb | 10 + 2 files changed, 16 insertions(+), 2 deletions(-)
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days