Andy Lester > hwd-0.21_01 > App::HWD::Task

Download:
hwd-0.21_01.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  6
Open  2
View/Report Bugs
Source  

NAME ^

App::HWD::Task - Tasks for HWD

SYNOPSIS ^

Used only by the hwd application.

Note that these functions are pretty fragile, and do almost no data checking.

FUNCTIONS ^

App::HWD::Task->new( { args } )

Creates a new task from the args passed in. They should include at least level, name and id, even if id is undef.

    my $task = App::HWD::Task->new( {
        level => $level,
        name => $name,
        id => $id,
        estimate => $estimate,
    } );

App::HWD::Task->parse( $input_line, $parent_task )

Returns an App::HWD::Task object from an input line.

$task->level()

Returns the level of the task

$task->name()

Returns the name of the task

$task->id()

Returns the ID of the task, or the empty string if there isn't one.

$task->where()

Returns a string describing the location of the task's line, as in "line 45 of foo.hwd"

$task->estimate()

Returns the estimate, or 0 if it's not set.

$task->notes()

Returns the list of notes for the task.

$task->date_added()

Returns a string showing the date the task was added, or empty string if it's not set.

$task->date_added_obj()

Returns a DateTime object representing the date the task was added, or undef if it's not set.

$task->date_deleted()

Returns a string showing the date the task was deleted, or empty string if it's not set.

$task->date_deleted_obj()

Returns a DateTime object representing the date the task was deleted, or undef if it's not set.

$task->parent()

Returns the parent of the task, or undef if it's a top-level task.

$task->children()

Returns a list of child tasks.

$task->work()

Returns the array of App::HWD::Work applied to the task.

$task->assignees()

Returns a list of the persons or entities assigned to do the task. Note that this name, or these names, may not correspond to who actually does the work.

$task->is_todo()

Returns true if the task still has things to be done on it. If the task has no estimates, because it's a roll-up or milestone task, this is false.

$task->set( $key => $value )

Sets the $key field to $value.

add_notes( @notes_lines )

Adds the lines passed in to the notes lines for the task.

add_child( $task )

Adds a child Task record to the task

add_work( $work )

Adds a Work record to the task, for later accumulating

hours_worked()

Returns the number of hours worked, but counting up all the work records added in "add_work".

started()

Returns whether the task has been started. Doesn't address the question of whether the task is completed or not, just whether work has been done on it.

completed()

Returns whether the task has been completed.

summary

Returns a simple one line description of the Work.

sort_work

Make sure all the work for a task is sorted so we can tell what was done when.

subtask_walk( $callback )

Recursively walks the tree of subtasks for the task, calling $callback for each subtask, like so:

    $callback->( $subtask )

AUTHOR ^

Andy Lester, <andy at petdance.com>

COPYRIGHT & LICENSE ^

Copyright 2006 Andy Lester, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: