This question about Missing functionality: More info required



I have an interesting problem, and a idea on a possible solution.

I have a busy working on a project tracking/management system. The structure are as follow:

  • A master project topic
  • Tasks for this specific project
  • Milestones for the project - a milestone will be the 'parent' for a couple of tasks

The first step is to define the project and the project attributes. For example the project would have the following attributes:

  • Project Name
  • Project Manager
  • Start Date

After the project attributes are defined tasks can be added to the project. The tasks reside in a lib. The lib keeps general information on a task, for example the description and the duration. The task can be added to a project and will inherit the attributes of the lib item. A task will also have additional attributes;

  • Task Name
  • Task Description
  • Task Duration
  • Task Start Date: The task start date will depend on the predecessor end date.
  • Task Predecessor: The task predecessor needs to be defined to determine the start date.

For example: Task 1 Startdate = Project Start Date Task 1 Enddate = Task 1 Startdate + Duration Task 2 Startdate = Task 1 Enddate


One solution would be to define the project as a topic and define the project start date in a form attached to the project. The tasks can also be topics with the project topic as their parent. The start date of task 1 then needs to be the project start date. And task 2 will get its start date from task 1 as earlier explained. The problem is that when the project start date is changed I have to manually open task 1 to update the start date and then manually open task 2 to update etc. This is not a viable solution.

The second solution would be to keep all the variables and data in one topic. This would work if the project stays relatively small (<10 tasks). Then total fields will be less than a 100. But if the project expands to say 200 tasks then the form will have 1000+ fields, which will be to cumbersome and ineffective. The second problem is that the predecessor needs to be defined from the name of one of the earlier tasks, meaning that the formfield values must be able to update dynamically, which again creates another set of problems.

In my mind I would like the possibility to define a wiki database inside a wiki topic. For example one page, with a large table with a arbitrary number of columns and rows. Where the columns will be the fields and the rows the variables attached to that field. Something like a excel spreadsheet or a MySQL database where the interdependency are kept in the database and formfields will be identifiable by column and row identification.

At the moment my best solution in my humble opinion would be to use a MySQL database and only use foswiki as the front end to the database, but I would like to be able to keep everything inside foswiki.

Does a solution to this problem exists or are my solution the best option?

Would it be wise to develop a plugin/extension that can accommodate the needed functionality?

Any advise or ideas would be much appreciated!

-- HenroRitchie - 08 Sep 2010

Was Tasks.Item9624. Thank you for the detailed problem specification!

Well, I think what you want could be achieved with clever usage of view templates (See AutoViewTemplatePlugin) which would calculate a task's start time based on its predecessor's start time; and so on. What's required is either some fancy plugin work, or devise a UI that will just store a TML macro in the formfield if the value must be calculated dynamically, Eg:

Start date: %CALC{
    }%'/Duration"}%, %QUERY{

If you know that a task will never store a "real" value in StartTime (always is calculated) - maybe you can use something like the "dynamiclabel" formfield type (experimental, no documentation yet sorry!) in svn to always show the calculated value.

Or maybe you do sometimes want a real value in there.
  1. On those topics that need auto-calculated start time, you could attach AutoTimeTaskForm that uses dynamiclabel type on the StartTime field.
  2. On those topics that need manual, real value then you could attach TaskForm which uses a text field type to enter some real value there.

With dynamiclabel, nothing is stored in the topic's META:FIELD - it always shows whatever is in the DataForm's value column. This value column would contain the macro to calculate the time, based on the predecessor's attributes

I hope some other Foswiki users will chime in and help out on this smile

It occurs to me that we might hit Foswiki's limit of 16 levels in nested expressions, so I should also mention the DBRECURSE macro (part of DBCachePlugin) which could traverse the PredecessorTopics and produce a flattened expression of values that could be passed into something like CALC.

-- PaulHarvey - 08 Sep 2010

Actually, DBRECURSE can't do that - it will query in the wrong direction (recurse down the current topic into its children). What you want is something that recurses UP. Probably would be easy-ish to modify DBRECURSE to do such a thing

-- PaulHarvey - 08 Sep 2010

The ObjectPlugin offers the fundamentals of a database-in-a-topic feature you're looking for. It is written to support Applications (with full AJAX support) but it also provides a perl API for other plugins to make use of its object handling functions (FullCalendarPlugin is the first to make use of this). It shouldn't be difficult to write a simple GanttPlugin that uses its services.

The plugin is released and developed in SVN but, sorry, has no documentation beyond code comments as of yet frown, sad smile

-- DavidPatterson - 08 Sep 2010

Hi Guys

Thanks for the help and comments. David I am very interested in your Object plugin, can you maybe supply me with a brief overview of how to use it? I installed the full calendar plugin and have been playing around with it, but I am struggling to see how I would implement the same setup with the object plugin?

-- HenroRitchie - 08 Sep 2010

Henro, what I had in mind was using the %OBJECTBUTTON{}% macro to provide a 'Create a new task' button, the TaskObject and TaskTemplate being defined by the GanttPlugin (or whatever it will be called). The TaskObject has a DependsOn field which is a select+multi+values type and presents a multi-select list of already created Task objects that the user has to choose from (an %OBJECTSEARCH{}% could provide the values for this) when the task is being created/edited. The GanttPlugin then provides a %GANTT{}% macro with parameters something like 'id="<the current task's id>" format="$starttime .. $endtime .. $float etc"' which is used in the TaskTemplate.

The GanttPlugin uses the ObjectPlugin (subclasses it) to parse the objects from the topic and does the usual gantt chart stuff with the returned task set.

I'd be happy to start this off in SVN if you want to then pick it up and code the Gantt processing part.

-- DavidPatterson - 09 Sep 2010


QuestionForm edit

Subject Missing functionality
Version Foswiki 1.0.9
Status More info required
Topic revision: r4 - 09 Sep 2010, DavidPatterson - This page was cached on 16 Jan 2020 - 15:38.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy