[TW5] use a title as a list - or maybe another proposal?

141 views
Skip to first unread message

Stephan Hradek

unread,
Sep 22, 2016, 8:41:58 AM9/22/16
to TiddlyWiki
Hi!

After a very long pause I'm using TiddlyWiki again.

And now I came across this "puzzle" which you might be able to solve.

Background: I have a long list of issues which are documented as tiddlers.

Some of the issues are related to tickets and now I want to add a link to these tickets in my issue-tiddlers.

My idea was to do it similar this:

1. a tiddler called "related"

related issues
<ul>
 
<$list filter="[list[!!title]]">
   
<li><$view field="title"/></li>
 
</$list>
</
ul>

2. add this to an issue-tiddler

{{Ticket-001||related}}

This works fine - as long as I also have a tiddler called "Ticket-001". The issue here is this piece of code filter="[list[!!title]]"

It simply relies on the tiddler to exist. An non-existent tiddler does not have a title field.

So as long as just one ticket is related, I could help myself by simply creating a tiddler for each ticket, which isn't too bad, as I already have that for most of the tickets.

But now the fun part starts.

I want to relate to more than one ticket. So I introduced

{{Ticket-08 Ticket-15||related}}

It took me a while to figure out why this failed, despite the fact, that both Ticket-tiddlers exist.

It's simply that there is no tiddler "Ticket-08 Ticket-15" :(

So what would be YOUR way of solving this conundrum?

Jeremy Ruston

unread,
Sep 22, 2016, 9:45:45 AM9/22/16
to tiddl...@googlegroups.com
Hi Stephan

Good to see you back!

2. add this to an issue-tiddler

{{Ticket-001||related}}

This works fine - as long as I also have a tiddler called "Ticket-001". The issue here is this piece of code filter="[list[!!title]]”

To explain what is going on, first remember that {{title||template}} is equivalent to:

<$tiddler tiddler=“title”>
<$transclude tiddler=“template”/>
</$tiddler>

The final piece of the puzzle is that if the target tiddler of a transclude widget does not exist, then the transclusion instead shows the content of the transclude widget.

So, that means that {{title||template}} will produce empty output if “title” isn’t the name of an existing tiddler.


It simply relies on the tiddler to exist. An non-existent tiddler does not have a title field.

So as long as just one ticket is related, I could help myself by simply creating a tiddler for each ticket, which isn't too bad, as I already have that for most of the tickets.

But now the fun part starts.

I want to relate to more than one ticket. So I introduced

{{Ticket-08 Ticket-15||related}}

It took me a while to figure out why this failed, despite the fact, that both Ticket-tiddlers exist.

It's simply that there is no tiddler "Ticket-08 Ticket-15" :(

So what would be YOUR way of solving this conundrum?

I think I’d be inclined to make a global macro:

<<related “Ticket-08 Ticket-15”>>

Best wishes

Jeremy



--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/b2665135-b90e-4261-898d-aea7a1e38fa3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mark S.

unread,
Sep 22, 2016, 9:50:29 AM9/22/16
to TiddlyWiki
I probably don't understand properly, but wouldn't it be better to structure your data so that every issue has a "tickets" list field?

Coming from the world of database design, to me the title, being the only unique field, should be pretty much sealed in cement once it is created.

I'm sure whatever you come up with will be great!

Mark

Tobias Beer

unread,
Sep 22, 2016, 3:51:25 PM9/22/16
to TiddlyWiki
Hi Stephan,

May I recommend you model your relations differently and to not rely on titles alone?

At each issue tiddler i would have a field called tickets that serves as a list-like field where I would store references to those tiddlers representing tickets.

Then it is easy to use a conditional ViewTemplate that shows related tickets for issues as well as issues referencing a ticket.

Best wishes,

Tobias.

Stephan Hradek

unread,
Sep 23, 2016, 2:12:48 AM9/23/16
to TiddlyWiki


Am Donnerstag, 22. September 2016 15:45:45 UTC+2 schrieb Jeremy Ruston:

I think I’d be inclined to make a global macro:

<<related “Ticket-08 Ticket-15”>>

The problem here is that I couldn't figure out how to "split" the elements of the macro's parameter. That's why I started thinking of using [list[...]] - which fails me when there is no field.

Stephan Hradek

unread,
Sep 23, 2016, 2:16:05 AM9/23/16
to TiddlyWiki
Thanks, Tobias and Marc.

That was my initial idea, but the "problem" here are:
1) The recipients are not really TiddlyWiki users
2) The Data is only intermediate. Eventually the recipients will transfer the data to something else
3) The fields are not automatically searched so they might get problems when trying to find issues
4) The data is not visiple inside the issue tiddlers except if I start to add templates or includes some not-so-obvious macro call in each issue tiddler having related tickets

But maybe I need to go that way.

Tobias Beer

unread,
Sep 23, 2016, 2:50:30 PM9/23/16
to TiddlyWiki
Hi Stephan,

 
That was my initial idea, but the "problem" here are:
1) The recipients are not really TiddlyWiki users

What recipients? And what are they to receive?
 
2) The Data is only intermediate. Eventually the recipients will transfer the data to something else

What data, for use where?
 
3) The fields are not automatically searched so they might get problems when trying to find issues

It's pretty straight forward to implement a custom search for a tickets field.
 
4) The data is not visiple inside the issue tiddlers except if I start to add templates or includes some not-so-obvious macro call in each issue tiddler having related tickets

That would be the idea, yes... to add conditional ViewTemplates that show stuff conditionally at both issue tiddlers as well as ticket tiddlers... the related lists so to speak.

If you want, I can get you a scaffolding off which to work. Will have to wait until Monday, though.

Best wishes,

Tobias.

Stephan Hradek

unread,
Sep 26, 2016, 2:08:11 AM9/26/16
to TiddlyWiki
Moin Tobias!


Am Freitag, 23. September 2016 20:50:30 UTC+2 schrieb Tobias Beer:
 
What recipients? And what are they to receive?

Colleagues who have to take over the handling of the issues
 
 What data, for use where?

The list of issues and related tickets. I also received the list from a colleague in form of a mail. To sort and classify it, I use TW5. Now I have to pass the work to other colleagues. My stupid idea is to just hand them the TW5 so they can do whatever they prefer. Maybe they will put all the data into Jira or Confluence. I don't know and I don't care.
 
It's pretty straight forward to implement a custom search for a tickets field.

 know.

 That would be the idea, yes... to add conditional ViewTemplates that show stuff conditionally at both issue tiddlers as well as ticket tiddlers... the related lists so to speak.

Still they won't be visible inside the tiddler when editing it, ust in the fields. Anyhow - that's what I did already.
 
If you want, I can get you a scaffolding off which to work. Will have to wait until Monday, though.

Thanks for the offer. I think, I won't need it.
Reply all
Reply to author
Forward
0 new messages