Action Widgets - Timestamp options missing

This is probably more of a question for the developer subset of the community, but I needed to make some mass tiddler changes today and hoped to find a way to NOT change the modified field of the tiddlers. Luckily the action-setfield widget has a $timestamp=“No” option!

Unfortunately the other similar actions I needed didn’t have the same parameter, which seemed strange. In what I can tell then:

  • Have the parameter/option:
    • action-setfield (YAY)
    • action-createtiddler (this actually seems kind of unnecessary here to be honest)
  • Doesn’t have the parameter/option (from what I can tell)
    • action-deletefield (darn)
    • action-sendmessage (darn)
    • maybe others, but didn’t need them right now

If not difficult, could these be maybe added in a future release? For now I could add a bunch of lines of code to store them temporarily before changing them and then do another setfield to change them back afterwards, but that’s obviously a little silly long-term.

(side question, how do I do a nested bullet in the Discourse editor? Can’t use tab character? I had to copy/paste a tab character from notepad for the above)

Have a look at the Tools sidebar tab and the option called “timestamps are on”.

image

1 Like

Markdown syntax: space then asterisk.

* like
  * this
1 Like

Thanks @saqimtiaz for both! For reference later, you need to have 2 spaces before the asterisk for this to work (at least for me, single space didn’t do it)

While this definitely fixed my short-term need, it does seem kind of inconsistent from a widget perspective, and I’ll have to remember to turn it on and off. My use-case is actually within a mass-update tiddler/tool I built (I think probably similar to the commander that Mohammad built), so being able to put that parameter in once would prevent future issues if possible. I just bring up for future consideration.

@stobot if you look inside the aforementioned timestamp button, $:/core/ui/Buttons/timestamp
you can see how it is set or unset. If this works for all widget actions perhaps in a group of actions you can do this first? Disable timestamps proceed with your bulk update, restore timestamps.

I thumbs up the time stamp no option on all actions as well.

$timestamp=“no” should be an option for any widget that modifies a tiddler. This includes $edit-text, $select, $radio, and $checkbox, as well as a bunch of $action widgets.

2 Likes
  • so
    • and so … minimum 2 spaces more as the first one.
 - so 
   * and so  ... minimum 2 spaces more as the first one. 

The first one doesn’t have any spaces in front but I personally add 1

That’s right. The timestamp option was requested at a later date. I think some actions widgets did exist already. … They haven’t been updated, since nobody did request it earlier.

@stobot can you have a look at GitHub, if it is an open issue. If not … can you create one, so we don’t forget it.

Okay, I’ve never done anything on github before, so hopefully I did that correctly. I did look for similar, and didn’t see anything close enough already there. It’s posted here: [IDEA] Add timestamp option/attribute to other widgets like action-setfield · Issue #5992 · Jermolene/TiddlyWiki5 (github.com)

Thanks for your consideration @pmario and others,

No problem! The issue at GitHub is perfectly fine. …


Just to be sure. Did you star the tiddlywiki repo?

show image

grafik

Please see Should we add the $timestamp parameter to edit-text and other widgets

Which illustrates a case

Agreed, I just fell over this one. I am using a field to temporarily flag tiddlers - for any reason it’s just a way of saying I want to tick these tiddlers for a certain period of time so I added a field “flag”

Instead of a binary “yes-no” for the field “flag” I decided to use it to record the datestamp for the moment when the tiddler is flagged which simply means that I can order flagged tiddlers chronologically or later add an automatic clean up to delete old flags ( since its intended as a short term thing ).

Because of this design choice I decided that the definition of an non-flagged tiddler would simply be one where the field “flag” was absent - much simpler than having a special string or value that is not a valid timestamp and deletion of the field seemed tidier to me especially since flagged tiddlers will be a very small minority - I estimate a few percent.

I just spotted that everytime I unflag a tiddler, by deleting the field, the tiddler modified datestamp gets updated. I agree with Eric - the option should exist for any modification of a tiddler field.

Since setfield creates the field if it does not already exist and does provide an option no for timestamp it seems symmetric to me that deletion of the same field provides the same option.

2 Likes

@jonnie45 I used the same code pattern of stamping a field with the date time. Typicaly this is done with action set field which has the timestamp option. But you can also simply bank the field value="". This has advantage of showing it was flagged but is no more.

  • this is not too say that the timestamp option should not be available wherever valid.

Oh, Another approach is to use another tiddler, such as the button visibility tiddlers. Rather than edit the tiddler in question the display visibility “flag” is stored in a tiddler that has the tiddler to which it applies in the title. For a give tiddler the list or viewtemplate can “lookup” this tiddler for the state of the “flag”.

I’m happy to report that, out of sheer coincidence, I had this same need (at least for $action-deletefield) and crafted a PR, which Jeremy merged yesterday!

3 Likes