Re: [Tiki-devel] Have Tiki to do (ListExecute) something when something doesn't exist (no trackerItem today)
Jonny Bradley via TikiWiki-devel <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Bernard Can you put a ListExecute plugin in the ALTERNATE section of a list plugin? Might be worth a try... jb > On 26 Oct 2021, at 08:48, Bernard Sfez via TikiWiki-devel <[email protected]> wrote: > > Hello Bernard’s questions fan ! 🤗 > > It would be nice to have something like : If no item is found, send a notification > > > As usual (at least for me) a real case is always the best. > > In a Tiki, a user must create a daily report. > Everyday a trackerItem must be created with some values before the user leaves the office. > If no trackeritem is created before 18:00 (he leaves the office at 19:00) send to this user a reminder. > > > I can imagine a solution using a tracker ListExecute and with some filters we can return the tracker, the trackeritem and today’s the date. (time using the “gap” parameter ?) > > But then what ? > How I can use "0 items found" to do something like send a notification : “Please, don’t forget to send the report today”. > > Is it “safe” enough to use the “0 items found” output ? (It may happen for many reasons) so at least we should have somewhere a flag, notification sent. (But where as the item has not been created). > > Then, we need to think of non-working day (the office is working from Monday to Friday) where we shouldn’t send a notification. > > — > > Thinking out loud while typing. May be be the solution is the other way around.💡 > > I think we can’t create an item with the plugin listExecute but we can duplicate. > So the listExecute duplicate automatically an item (a blank report) every day. (If not a blank report we need to empty the values, still doable) > This item is now owned (user selector) by the "system admin" (the lastmodifby). We add an extra field has a flag, “notification was sent”. > > Now the task is the following: > Find all items for today (Monday, Tuesday, Wednesday, Thursday and Friday) with the "system admin” as lastmodifby with the “notification was sent” = n > That is should work. > > Then we can: send the notification and change the field : “notification was sent” = n > > This require 2 ListExecute and is not really straightforward, may be fragile but... > > Thought ? > Bernard > > > > _______________________________________________ > TikiWiki-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel _______________________________________________ TikiWiki-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel