Hi,
I am building a Kanban board visible here: Kanban — Experience
(It already llooks quite nice…)
I use a modified version of the
list-tagged-draggable Macro
To make an item move from ToDo to Done not only Done has to be added but ToDo has to be removed. Therefore, I made a mod which uses additional actions to remove the unwanted tags which can be represented with this filter:
[list[$:/config/kanban]get[alias]!title<tag>]
The changed actions are thus:
\define kanbanList-actions(tag)
<!-- Save the current ordering of the tiddlers with this tag -->
<$set name="order" filter="[<__tag__>tagging[]]">
<!-- Remove any list-after or list-before fields from the tiddlers with this tag -->
<$list filter="[<__tag__>tagging[]]">
<$action-deletefield $field="list-before"/>
<$action-deletefield $field="list-after"/>
</$list>
<!-- Save the new order to the Tag Tiddler -->
<$action-listops $tiddler=<<__tag__>> $field="list" $filter="+[enlist<order>] +[insertbefore<actionTiddler>,<currentTiddler>]"/>
<!-- Make sure the newly added item has the right tag -->
<!-- Removing this line makes dragging tags within the dropdown work as intended -->
<!--<$action-listops $tiddler=<<actionTiddler>> $tags=<<__tag__>>/>-->
<!-- Using the following 5 lines as replacement makes dragging titles from outside into the dropdown apply the tag -->
<$list filter="[<actionTiddler>!contains:tags<__tag__>]">
<$fieldmangler tiddler=<<actionTiddler>>>
<$action-sendmessage $message="tm-add-tag" $param=<<__tag__>>/>
<!--HERE THE MODIFICATION STARTS----------------------------------------------------------------!!!!!!-->
<$list filter="[list[$:/config/kanban]get[alias]!title<__tag__>]">
<$action-sendmessage $message="tm-remove-tag" $param={{!!title}}/>
</$list>
</$fieldmangler>
</$list>
</$set>
\end
The result is somewhat aleatoric. Sometimes the unwanted Tags get gemoved often the new Tag is just added .
Where’s my bug?