SmartRules - how to set up a trigger for topics which are not tasks

  • 1
  • Question
  • Updated 1 month ago
  • (Edited)
The recent discussion on the thread regarding project deliverables led me to consider how to highlight and then count topics which are NOT tasks.

My first thought was to set up a SmartRule which set a topic property value of 1 if a topic did not have any Task Progress, including zero, by setting the trigger to be less than zero progress, but that threw up an Invalid Range error message. I then attempted to set a topic property, tag or icon if there was any progress, (ie, from zero to 100%), and then use the absence of that effect to trigger another effect to flag topics which aren't tasks, but that doesn't work either.

I've worked out how to count non-task topics at the rolled-up level by using the handy MAP add-in Extended Property, Sub-topic (Descendants), to count all sub-topics and then subtracting the count of all tasks based on Detlef's formula "[Tasks]=COUNT(Descendants.Progress)", but this seems to be a roundabout way to do things and there doesn't appear to be a way to highlight non-task topics directly.

I know it is possible to fade out tasks using a filter and leave non-tasks unfaded (however, hiding tasks rather than fading them also hides non-task children), but unless I'm missing something simple there doesn't seem to be a way to do something similar via SmartRules.
Photo of Alex Gooding

Alex Gooding, Champion

  • 1274 Posts
  • 354 Reply Likes

Posted 1 month ago

  • 1
Photo of Andrey Kazak

Andrey Kazak

  • 247 Posts
  • 21 Reply Likes
Let's check if the macro language allows determining the topic type (task, ordinary, floating, call-out, etc.).
Photo of Alex Gooding

Alex Gooding, Champion

  • 1274 Posts
  • 354 Reply Likes
The other problem is what exactly defines a task? I used Task Progress as the determining factor, but it's possible to have topics which don't have a Task Progress icon but which do have Task Priority and/or start and due dates.
Photo of Andrey Kazak

Andrey Kazak

  • 247 Posts
  • 21 Reply Likes
I checked and found that Topic object has at least two topic-related properties:
  • Task (This property is written, then the task information in the source Task object is applied to the topic. This is useful for transferring Task information from one topic to another.)
  • IsTaskRollupTopic (Enables and disables Task Rollup on the topic)



Photo of Alex Gooding

Alex Gooding, Champion

  • 1274 Posts
  • 354 Reply Likes
Thanks for this. I'm not that good with macros - I can just about copy and paste them in Word - but does this mean that in a macro you could select and work with topics which don't have either of these properties?

Also, what exactly defines the task property? Is it any bit of task information, or a specific item like Task Progress, or a combination?
Photo of Nick Duffill

Nick Duffill, Champion

  • 604 Posts
  • 248 Reply Likes
That is a very old document. The MindManager 2020 API documentation is at 

https://www.mindmanager.com/en/pages/developers/api/20/#Welcome.html

The Topic.Task object has a property "IsEmpty" which is false if there is any task info (date, progress etc.) on the topic.

Photo of Andrey Kazak

Andrey Kazak

  • 247 Posts
  • 21 Reply Likes
Can you share a PDF version of the MindManager 2020 API documentation, please?
Photo of Nick Duffill

Nick Duffill, Champion

  • 604 Posts
  • 248 Reply Likes
At the moment the only published format is online because of the automatically generated index. It would be a very large PDF anyway.
Photo of Nick Duffill

Nick Duffill, Champion

  • 604 Posts
  • 248 Reply Likes
Hello Alex

It is unfortunate that the trigger of progress < 0 is rejected, because internally a topic with no progress marker has a progress value of -1. I expect the developers were generally trying to avoid triggers that could respond to large numbers of topics by default.

If you maintained the discipline of always assigning a due date to actual tasks, the trigger condition "Task Due Date = Does not exist" will trigger on all non-task topics.
Photo of Alex Gooding

Alex Gooding, Champion

  • 1274 Posts
  • 352 Reply Likes
Thanks Nick.

While it would be handy to have a trigger based on task progress as well, this is actually quite useful. It means, for example, that you can treat tasks and checklists (without other task information) separately.
(Edited)
Photo of Alex Gooding

Alex Gooding, Champion

  • 1274 Posts
  • 352 Reply Likes
It turns out there is an interesting quirk presumably caused by the topic task property being triggered by any item of task information - it is difficult if you want to set up simple checklists using only task progress icons and treat them separately from actual tasks.

This works fine unless you initiate Task Roll-up on the central topic or a main topic. The progress item is enough to get the checklist items recognised as tasks and incorporated in the roll-up process. The immediate parent topic to the checklist will be turned into a roll-up with a task progress icon based on the progress of items in the checklist, and this progress will be incorporated in roll-ups further up the hierarchy.

This is fine if you want this but annoying if you don't, for example if the checklist was merely a list of items to purchase rather than a list of tasks while the immediate parent was the actual task. In this case the parent task information gets deleted and the progress icon overridden, while the overall roll-up calculation will be distorted by the inclusion of the checklist. 
(Edited)
Photo of Nick Duffill

Nick Duffill, Champion

  • 604 Posts
  • 248 Reply Likes
Task Rollup is only effective in maps that are strict WBS layout, with tasks at the leaf nodes only. Using task rollup in other scenarios risks overwriting any task that has further tasks in its descendants. There is no warning that your task has been replaced with rollup info. If you are using the Gantt chart and want summaries in the chart, you can enable a summary manually instead of using task rollup, and work with maps that are not WBS conformant.
Photo of Alex Gooding

Alex Gooding, Champion

  • 1274 Posts
  • 352 Reply Likes
True. As you say the best approach if you want to use task roll-up is to adopt a strict WBS with the actual tasks at the bottom levels of the hierarchy only. However it is usually possible to have non-task topics further down (or even at the same level, provided they don't have any task descendants) as long as you accept that they won't appear in any Gantt chart.

What I was hoping for was to be able to set up simple check lists as such non-task topics but still apply the task progress icons (and no other task information), but it seems this isn't possible.