Open jekram opened 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
@ImranBinShoukat can I take up this issue?
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
working fine on staging.
Also test on production.
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
There was a minor problem here that I have fixed. However, I will test once again with arveen today as well.
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.
why there is no update?
Do you understand the process?
I was working on other issues so could not give time to this medium issue.
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.
I have done the fix in this. @bjafri5 please test once merged.
I cannot delete a ChatBot (Askkibo)
jekram@hotmail.com