Creating a user stories from given tags

I am creating a list of user stories using the following format:

As a [persona], I [want to], [so that]

I would like to tag each tiddly with three tags, one representing its [persona]; one representing the [want to]; and the other representing the [so that] items.

Each of the added tags will themselves be tagged with either [persona], [want to] or [so that], so we know what family they belong too.

I am a little rusty with tiddlywiki and I have spent far too long trying to solve the first base issue.

I want to template the tiddly text so that it does the follow:

As a [Insert the name of the current tiddler tag that is itself tagged with “persona”], I [Insert the name of the current tiddler tag that is itself tagged with “want to”], [Insert the name of the current tiddler tag that is itself tagged with “so that”]

I have tried many list examples and have explored ancestors and descendants, but have just hit a wall

Give this a try:
As a {{{ [tags[]tag[persona]] }}}, I {{{ [tags[]tag[want to]] }}}, {{{ [tags[]tag[so that]] }}}

Notes:

  • The tags[] filter operator gives you a list of all the tags for the current tiddler
  • The tag[...] filter operator then limits the result to only those tags that are, in turn, tagged with the indicated value.
  • The {{{ and }}} surrounding the filter syntax is called a “filtered transclusion”. It evaluates the enclosed filter syntax and renders the result as a tiddler link. If you want to display plain (unlinked) text, you can use $text widgets, like this: <$text text={{{ [tags[]tag[persona]] }}}/>

Also, instead of pasting the above syntax in each “user story” tiddler, you can:

  • Create a separate tiddler (e.g., “UserStoryTemplate”) containing the desired content.
  • Then, when you create each “user story” tiddler, you can just enter {{||UserStoryTemplate}} to transclude the common user story content.
  • Note that the || in the transclusion syntax means that it uses the current tiddler’s field values (such as the tags field) when rendering the common user story output.

enjoy,
-e

2 Likes