Cloudkibo / KiboPush

0 stars 1 forks source link

Cannot delete a Chatbot #10061

Open jekram opened 4 years ago

jekram commented 4 years ago

I cannot delete a ChatBot (Askkibo)

jekram@hotmail.com

Screen Shot 2020-10-07 at 1 56 46 PM Screen Shot 2020-10-07 at 1 56 23 PM
ImranBinShoukat commented 4 years ago

Blocks can be deleted but not the whole chatbot. We didn't implement this functionality. If you delete the welcome block all the its children will also be deleted and as a result you will get an empty chatbot.

I can implement the delete whole chatbot functionality as well if you want.

@jekram FYI

sojharo commented 4 years ago

@ImranBinShoukat can I take up this issue?

sojharo commented 4 years ago

I have fixed this problem.

The problem was happening because we have chatbots which were created a long time ago and in the mean time there have been changes in way we create and store chatbots. This issue couldn't be reproduced on new bots that we are creating now.

It was trying to run toString on some parent block ids which were undefined. Such undefined ids are not in new chatbots and only appear in older chatbots. I have fixed this as we didn't need to convert using toString() function in array filters and map cases.

Assigning @arveenkumar55 to test. Arveen please test on old chatbots only

arveenkumar55 commented 4 years ago

working fine on staging.

sojharo commented 4 years ago

Also test on production.

arveenkumar55 commented 4 years ago

I have tested on Production. When I deleted the old chatbot it displayed the success message but nothing happened. It still showed me the chatbot block data. When I went back and came again the blocks were deleted from the chatbot. It is happening for some old chatbot not all. @sojharo please look

Screenshot from 2020-10-14 09-53-21 Screenshot from 2020-10-14 09-53-22

sojharo commented 4 years ago

There was a minor problem here that I have fixed. However, I will test once again with arveen today as well.

sojharo commented 4 years ago

I have tested this with @arveenkumar55 there is still one old bot with old data structure that doesn't get deleted in real-time. I am looking into this today.

jekram commented 4 years ago

why there is no update?

Do you understand the process?

sojharo commented 4 years ago

I was working on other issues so could not give time to this medium issue.

sojharo commented 4 years ago

I worked on this and did some code refactoring to understand how the block ids are getting set on tree structure. This is happening cause some blocks are sitting orphaned in tree structure so therefore we get error in chatbot deletion some times. This is still under construction. I am figuring out the logic further on the client side.

sojharo commented 4 years ago

I have done the fix in this. @bjafri5 please test once merged.