<$button>
<$action-sendmessage $message="tm-new-tiddler"
title="Task"
tags="Task <<thisContext>>"
priority="3"
/>
New Task for <<thisContext>>
</$button>
This variable worked fine when the listWidget loop was looping over a text string of gathered contexts. But the filter has been changed to loop over tags now. Apparently that macro style syntax (i.e. <<thisContext>> ) doesn't quite work the same way now that the iterator is a tag. Notice also that the variable works in the Button Display Text area, so we knot the variable is representing the right thing and is present at that point in the code.
<$button>
<$action-sendmessage $message="tm-new-tiddler"
title="Task"
tags="Task <<thisContext>>"
priority="3"
/>
New Task for <<thisContext>>
</$button>
\define newTags() Task $(thisContext)$
<$button>
<$action-sendmessage $message="tm-new-tiddler"
title="Task"
tags=<<newTags>>
priority="3"
/>
New Task for <<thisContext>>
</$button>
<$button>
<$action-sendmessage $message="tm-new-tiddler"
title="Task"
tags={{{ [[Task ]] +[addsuffix<thisContext>] }}}
priority="3"
/>
New Task for <<thisContext>>
</$button>
tags="Task <<thisContext>>"
will not work. It won't create a string with "Task" and the value of <<thisContext>> >
This is called concatenation. If you look for "concatenation" on TiddlyWiki.com there's at least one howto. Unfortunately, it's not the word that automatically springs to people's heads.
The two main ways around this problem is to use either {{{ }}} notation with a addprefix/addsuffix filter operator, or to use a helper macro. Macro's have substitution variables. A variable for a passed parameter looks like $variable$ and a substitution variable for an environmental variable looks like $(variable)$.
So, at the top of your tiddler create a macro like this:
\define thebutton()
<$button>
<$action-sendmessage $message="tm-new-tiddler"
title="Task"
tags="Task $(thisContext)$"
priority="3"
/>
New Task for <<thisContext>>
</$button>
\end
<$button>
<$action-sendmessage $message="tm-new-tiddler"
title="Task" tags="Task"
priority="3"
domain={{!!domain}}
project={{!!project}}
client={{!!client}}
/>
New Task
</$button>