DIM icon indicating copy to clipboard operation
DIM copied to clipboard

Run actions on new items based on filters (If this then that)

Open bhollis opened this issue 2 years ago • 11 comments

It'd be fun to be able to build rules based on a search filter, where new items that appear and match that search filter have some action taken on them (e.g. tag, lock, move to vault)

bhollis avatar Nov 03 '21 18:11 bhollis

I think that would be quite nice actually. I'm always doing this is:wishlist -is:locked then Lock Items.

Something like is:wishlist -is:locked => lock:true, -is:wishlist => tag:junk -- Not sure how the UI would look to input rules -- i'd assume the same as the search filter + starring.

intolerance avatar Dec 02 '21 22:12 intolerance

Any movement on this? Not trying to be pushy, just think it's a really great idea :)

jgkawell avatar Apr 30 '22 20:04 jgkawell

If anything happens it'll be mentioned on this issue.

bhollis avatar Apr 30 '22 20:04 bhollis

I'd love this to be a thing, too! Is there an idea yet on how it could possibly be implemented?

I've got two ideas:

  1. Something "simpler", yet maybe not so pretty, where one could either input an IFTTT "rule" into the search bar (or any other text input), or maybe import a .txt file that has rules inside.
  2. A whole "space" in DIM dedicated to this feature where a player could somehow create rules and actions through a GUI. I imagine it sort of like those programming interfaces where you can write code by dragging and dropping. But instead with IFTTT, something like this.

I guess which way to take will depend on how quickly/pretty/complex we want this feature to be. I'd be willing to give it a try if can. I'd just like to get a general idea on how to tackle it first.

Also, we'd need to talk about how often/when the rules apply. Personally, I'd be happy with a daily approach.

Zebiano avatar Sep 03 '22 23:09 Zebiano

Here's what I was imagining this would look like.

First, we need to know when an item is "new" to DIM. This is different from what is:new does (new to you), it's just so we know the first time an item is loaded by DIM. This is because these actions should only apply for new items, the first time they're noticed. Not running continuously or daily or anything. To do this, we'll need to track a high water mark of item ID, probably in Settings, and use it to determine which items are "new" and apply any saved actions to only those items before updating the watermark.

Then, we'd build a UI reminiscent of GMail's filter system. I've included screenshots from GMail as an example. Starting with a search, you can click on the action menu (the three dots), and select an option called "Create Action" or something like that.

Screen Shot 2022-09-04 at 6 43 59 PM

This would open a dialog/sheet with the search query in it, and an action editor:

image

For ours, we'd want to have a few options to start with - lock item, set tag, add note, move to vault, etc. Once saved, this action would run on all subsequent items. We could maybe add a prompt that says "Do you want to run this on all your existing items now?" too, for backfilling. Actions can probably save in Settings - not necessarily worth making a new API type for it.

If you go to Settings, there would be a new section for Actions which would list out all the Actions you've saved, and you can delete them, or edit them. Deleting is obvious, editing re-opens that dialog from before.

image

Anyway, that's what I'd like to see.

bhollis avatar Sep 05 '22 01:09 bhollis

Is there any movement on getting this implemented? I've been wanting something like this for years now, as inventory management has been a major detractor for me playing D2.

I like the last comment, but would also like a manual "run this on everything" button, as once I have my automatons in place, they should handle virtually every item that comes in.

Also, it would be useful to have an option to see/edit a text file that the configuration lives in, so that I can edit them in bulk.

jondthompson avatar Jan 27 '23 20:01 jondthompson

It'll be coming up soon, and any progress will be reported on this issue

bhollis avatar Jan 27 '23 20:01 bhollis

I see this has been discussed for a long time is there any update on when/if this feature will be coming?

graytonio avatar Jun 05 '23 22:06 graytonio

Every time someone asks for an update I move it to the end of my TODO list 🙃

bhollis avatar Jun 06 '23 04:06 bhollis

Sorry for being a pain about it. Is there any way I can help either with this feature or taking other things off your plate?

graytonio avatar Jun 06 '23 13:06 graytonio

The task is laid out in a comment - I have a mostly finished branch for the first part about tracking what item IDs are new. There's some tricky stuff to do there to try and make sure we don't double process items across different instances.

Then it's mostly building the UI and wiring it up. I have enough things to consider in how this is implemented that I probably would have trouble getting help on any of these.

This feature of course competes with everything else we're doing, seasonal updates, bugs, what I feel like working on at the moment, etc.

bhollis avatar Jun 06 '23 16:06 bhollis