unfoldedcircle / feature-and-bug-tracker

Feature and bug tracker repository for Unfolded Circle products
22 stars 0 forks source link

Unable to delete unreferenced (removed) entities #208

Closed ferdaze closed 6 months ago

ferdaze commented 7 months ago

Is there an existing issue for this?

Description

I deleted a remote before I deleted a remote before I deleted the references in activities and now when I try to deleted the referenced commands in I'm unable and get an error. This happens on anything that has been been deleted before all references are removed. I deleted a HA script and now unable to delete the command. The only way I can get past it is to delete the activity and rebuild it with can be a lot of work on complex ones. image

How to Reproduce

  1. create a remote
  2. reference a command from the remote in an activity
  3. delete the remote
  4. delete the remote command from the activity

Expected behavior

maybe a show an missing ref message but delete the entity.

System version

v1.4.8

What part of the system affected by the problem?

I have seen this same issue in any place that can have a reference that was removed

Additional context

No response

zehnm commented 7 months ago

Deleted entities are not automatically removed from an activity or macro. This was a design decision, so that the entity can easily be added again without affecting an activity and having to redo the sequences and UI layouts.

Deleted entities are shown with a "prohibited icon" 🚫 in the included entities section of the activity or macro:

image

In the above image, this is the test macro with the Run command.

After removing the entity from the Included entities with the delete icon ❌, all command references are removed and the activity or macro can be edited and saved again.

We understand that the current usability can be improved. A future update of the web-configurator will clearly show that entities are no longer available, maybe even with a "force edit" mode and "force delete everything" when removing an entity or a complete integration.

ferdaze commented 7 months ago

Are you saying I should be able to remove the deleted entries from the Included entities section now or the will have to wait for the future update?

zehnm commented 7 months ago

@ferdaze yes you need to remove the grayed out entity in the included entities showing the 🚫 symbol. Then the activity can be edited and saved again, without the need to delete the whole activity.

ferdaze commented 7 months ago

I cannot remove them either. Anything that is unreferenced I get the error when removing them. I just tried to remove these 3 Included entries and you can see the errors from them.

image

zehnm commented 7 months ago

I'll check again today, I've only tested with one unavailable entity. I assume it doesn't work if there are multiple as in your case.

zehnm commented 6 months ago

Sorry about the delay, I completely forgot about this issue. I can confirm my assumption: if there's only one dangling entity with a 🚫 icon, then it can be removed. If there are multiple, deletion fails.

We'll fix it.

zehnm commented 6 months ago

Status update: fixed in the upcoming release. 1.5.4 has been released to the BETA group and will be available soon as a public release.

zehnm commented 6 months ago

Removing included entities which are no longer available is fixed in 1.6.0. Commands cannot be edited if one or more included entities are not available.