Problem/Motivation
Removing items related with feed entries en masse to easily prepare multiple feeds for a reimport.
Proposed resolution
An action plugin and a kernel test that covers the action plugin should be written.
The action plugin
Add a file to src/Plugin/Action and implement an action plugin that triggers the deletion of all imported items for every feed that is passed to the action plugin.
The kernel test
The kernel test could be written as follows:
- Create feed type. I think using the parser "syndication" (for parsing RSS feeds) is the easiest for this test.
- Create two feeds: one that imports drupalplanet.rss2 and another one that imports googlenewstz.rss2. These RSS feeds are found in tests/resources/rss.
- Import content for both feeds.
- Assert that content has been imported.
- Apply the action plugin.
- Assert that all content was deleted.
Remaining tasks
Write an action pluginWrite a kernel test that covers the action pluginFinish and clean up the clear feed action (I assume some tests will fail as of now).Add test coverage for delete feed action.Add an update function for installing new config "system.action.feeds_feed_clear_action.yml".
User interface changes
New entry in the 'With selection' dropdown menu:

| Comment | File | Size | Author |
|---|---|---|---|
| #5 | Feed-listing.png | 108.47 KB | megachriz |
Issue fork feeds-3165187
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
megachrizGood suggestion. I've added your request to #3165018: [meta] Feeds intermediate issues. On that list I try to keep track of issues that aren't too hard to accomplish so developers that have some experience could pick these up.
Comment #3
irinaz commentedOn each feed you have an option to delete all items for this feed. @mxmilkiib - Is this request to bulk delete all items in all feeds?
Comment #4
mxmilkiib commentedA request to be able to bulk delete all items in selected threads.
As in, a new "Delete all items in selected feeds" (or whatever) item in the "With selection" drop-down menu on /admin/content/feed.
Comment #5
megachrizI've expanded the issue summary a bit. Hopefully, it's now more clear for a contributor about how to work on this issue.
Comment #6
megachrizI've worked some myself on this feature. Was a bit more complicated than I thought. I refactored some code too in the process. Test coverage is added for clearing feeds (delete imported items), but since I touched code for the existing delete feed action, that will need test coverage too.
Next steps:
Comment #8
megachrizThis is ready for review.
Comment #9
megachrizComment #11
megachrizMerged the code!