Hide the duration of a task when it has Start and Due Dates

  • 2
  • Question
  • Updated 4 years ago
Is there a way to not display the duration on a task, even if it has a start and due date specified that is more than a day long?

I am generating Start and Due dates in a macro, and I don't need or want the duration to display - it is just cluttering up the interface. I have been able, in a lot of cases, avoid this problem by setting the start and due date to the same date and time, then set the duration to 0 in code, and the Milestone property to false.. but am getting hung up when there actually IS a duration to be hidden.

Here's a visual:



The green arrow has the desired look. The red, not so much :)
Photo of Mike Danielski

Mike Danielski

  • 191 Posts
  • 6 Reply Likes

Posted 4 years ago

  • 2
Photo of Nick Duffill

Nick Duffill, Champion

  • 508 Posts
  • 169 Reply Likes
Welcome to a world of coding pain :) To answer your question, no, there is no way to hide the duration value on its own. You can show or hide all task information in View > Show/Hide > Task Info but not selectively hide the duration.
Duration, start date and due date are interlocked and are also governed by the task calendar. You will find MindManager changing the dates that you write (e.g. if you write a Sunday to it, when you read it back it will be a Monday unless you have taken control of the task calendar; if you write a due date, the start date changes to preserve the duration; if you write a duration, the due date moves based on MindManager's own calculation). Further, all tasks start at midnight on the start date. No time values are stored, even though durations can be expressed in minutes or hours. You will also find that MindManager unilaterally changes start and due dates where there is an inbound dependency and something pushes on the other end. None of this behaviour can be suppressed, and is applied to values written through the API as well as the UI. Is it also quite happy with milestones that have a duration and a variable percent complete.
To implement date management you have to decide whether the benefits of pooling date information with MindManager outweigh the disadvantages of the built-in regime. If not, then consider using private date values stored as attributes or tags. Fortunately this is the only area where MindManager does not play nicely with automation - you are able to control just about everything else.
(Edited)
Photo of Alex Gooding

Alex Gooding, Champion

  • 842 Posts
  • 211 Reply Likes
A lot of these problems started with MM9, when Mindjet decided to incorporate the JCV Gantt add-in into MindManager. Up until that point you could have a duration that was shorter than the number of days between the start and due dates and provided you didn't round trip between MM and JCV Gantt, everything was fine (though I can't recall if you could have a zero duration or suppress its display).


The problem was that JCV Gantt couldn't display a task where the duration was shorter than the difference between start date and due date, so it would automatically and arbitrarily adjust either the duration or the end date (I can't remember which). So I think its incorporation into MM was the main reason why task duration was locked to the difference between start and end dates.


This has caused no end of headaches for people ever since, especially those that never used the Gantt facility. It is also yet another example of why MIndjet's acquisition of third-party add-ins is not a universal cause for celebration.
(Edited)
Photo of Mike Danielski

Mike Danielski

  • 191 Posts
  • 6 Reply Likes
Oh drat! Thanks for the responses guys. I have to admit, working in this alien VBA environment really makes me realize how spoiled I am normally working in Visual Studio 2013! I guess there are some things we just have to live with in the end...
Photo of Nick Duffill

Nick Duffill, Champion

  • 508 Posts
  • 169 Reply Likes
These issues are not specific to MindManager macros - they apply to the API, whether used with a macro, an add-in or COM automation from another process. For a richer development environment you can of course write MindManager add-ins with Visual Studio, but in many cases you can have finished the job with a macro in the time it takes to get a new add-in project off the ground.