>
>  While it might seem to you to be the expected behavior, importing 
> tiddlers will NEVER add or alter any fields in the incoming tiddlers.  This 
> is by design, since there may be unwanted side-effects of changing the 
> tiddler definitions, even if it is just to add a "created" or "modified" 
> date.
>

Yeah, perhaps 'expected' behavior was the wrong choice of words. 

Thanks for the snippet, that seems like a good fallback solution.

One other thought I had was to parse the $:/Import tiddler for a more 
targeted list of tiddlers to modify, but I can't think of a straight 
forward way of doing that.

On Monday, July 20, 2020 at 12:07:18 PM UTC-5, Eric Shulman wrote:
>
> On Monday, July 20, 2020 at 9:39:00 AM UTC-7, Joshua Baller wrote:
>>
>> I have a wiki (5.1.22) that is partly updated through importing large 
>> sets (1000s) of tiddlers from a few JSON files on an approx. weekly basis 
>> (knowledge base, the information is being maintained and updated on a 
>> different system). I would like to know the last edit/update dates for a 
>> particular tiddler was imported in this way, however when imported the 
>> 'created' and 'modified' fields are left blank. 
>>
>> My preference would be to simply have the field populated on import as 
>> this seemed like the expected behavior. Is there a setting I'm missing to 
>> get this to occur? Otherwise is there are way to target only the recently 
>> imported tiddlers to have their 'created' dates populated?
>>
>
> While it might seem to you to be the expected behavior, importing tiddlers 
> will NEVER add or alter any fields in the incoming tiddlers.  This is by 
> design, since there may be unwanted side-effects of changing the tiddler 
> definitions, even if it is just to add a "created" or "modified" date.
>
> However, you *can* perform a "fixup" process after importing, by using the 
> following button:
> <$button> set missing created/modified fields
> <$list filter="[all[tiddlers]!is[system]!has[created]]">
>    <$action-setfield created=<<now "YYYY0MM0DD0hh0mm0ss0XXX">> modified=<
> <now "YYYY0MM0DD0hh0mm0ss0XXX">> />
> </$list>
> </$button>
>
> This button does a $list to find all tiddlers that do not have a "created" 
> field
> (excluding system tiddlers... those starting with "$:/").  For each 
> tiddler it finds,
> it sets the "created" AND "modified" fields of that tiddler to the current 
> datetime,
> using the standard 17-digit TWCore date format for those fields.
>
> enjoy,
> -e
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/ca2efad6-91f5-4092-913d-3285ec6d9f79o%40googlegroups.com.

Reply via email to