Add a "Delete" button to Views of Areas, Assets, and Logs.

With regards to areas, this is also a followup to #2659874: Area generator.

Now that areas can be generated in bulk, you should also be able to delete them in bulk. Otherwise, you could end up accidentally creating a hundred beds that are at the wrong orientation, and then have to delete them one-by-one (ugh).

However, there is a danger to bulk deletions too. See: #2378327: Referenced entities can be deleted

Comments

m.stenta created an issue. See original summary.

m.stenta’s picture

Worth noting, for anyone who comes across this: if you delete the parent area, it will delete all the child areas as well.

BUT BEWARE: if the parent area has any logs/assets associated with it, the association will be broken, so you'll lose data. So only delete a parent area if it is brand new and blank. I plan to add some protection against deleting referenced areas in the future: #2378327: Referenced entities can be deleted

m.stenta’s picture

Project: Farm Area » farmOS
Component: User interface » Farm Areas

All farmOS repositories have been merged into the farmOS distribution (see #2876992: Merge farmOS repositories into drupal.org/project/farm). I'm going through and moving all open issues from the various project issue queues to the central queue now...

m.stenta’s picture

Title: Delete areas in bulk » Delete areas, assets, logs in bulk
Issue summary: View changes
Related issues: +#2378327: Referenced entities can be deleted

I'm expanding the scope of this issue to also add the ability to delete assets and logs in bulk.

It is important that this happens in tandem with #2378327: Referenced entities can be deleted

m.stenta’s picture

Component: Farm Areas » User interface

  • m.stenta committed 1dbf649 on 7.x-1.x
    Issue #2705549: Delete areas, assets, logs in bulk
    
m.stenta’s picture

Status: Active » Fixed

Done! Bulk delete buttons added to all asset and log lists.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.