Liz::ProjectSet::Item - generic module for Item objects
use xxLINK; $xxlink = new xxLINK; $projectset = $xxlink->ProjectSet; $item = $projectset->Item; $item = $projectset->Item( $itemID ); $item = $projectset->Item( $itemID,$orderID );
$itemID = $item->update;
Provide object oriented access to the Item object of the Liz::ProjectSet module family. Usually not accessed directly, but rather through a client module.
Create a new Item object from a Order object.
1 Liz::SQL object 2 ID or description to create Item object with 3 orderID for which to create Item
1 instantiated object
It is not intended to call this method directly, but rather indirectly through a client module.
$xxlink = new xxLINK; $projectset = $xxlink->ProjectSet; $item = $projectset->Item; $item = $projectset->Item( $itemID,$orderID );
Update a Item object in the database.
1 ID with which the object was updated (undef = error)
$item->update;
The following methods allow you to change the fields associated with the Liz::ProjectSet::Item object.
Return the ClientID of the Project of the Order of the Item.
1 clientID of the project of the order of the item
$clientID = $item->ClientID;
Return or set the ContactID (of the client's contact of the project when this work was item) of the Item object. Its value can be used to create a new Liz::ProjectSet::Contact object.
1 new value of ContactID (default: no change)
1 current/old value of ContactID
$item->ContactID( $contactID ); $contactID = $item->ContactID;
Return a list of employeeIDs associated with this employee.
1 List of associated employees
Return the Created information of the Item object.
1 current timestamp of the Created
$created = $item->Created;
Return or set the Deadline information (the timestamp of the date when the work is to be finished) of the Item object.
1 new value of Deadline (timestamp) (default: no change)
1 current/old value of Deadline
$item->Deadline( $item->Int2Timestamp( $year,$month,$day ); $deadline = $item->Timestamp2Date( '',$item->Deadline );
Return or set the Description (of the work item) of the Item object.
1 new contents of Description (default: no change)
1 current/old contents of Description
$item->Description( 'Implementatie van Liz::ProjectSet' ); $description = $item->Description;
Return or set the EmployeeIDs (list of contactID's from the EmployeeSet) of the Liz::ProjectSet::Item object.
1..N new employeeID's
(default: no change)
1..N current/old employeeID's
$client->EmployeeIDs( @employeeID ); @employeeID = $client->EmployeeIDs;
Return a list of itemIDs associated with this employee.
1 List of associated projects
Return the total time spent in Dones for this Item. And optionally how much time is left or how much we're short. 'Over budget' is simply indicated by a negative number.
1 Total time spent in Dones for this Item 2 Remaining available time, or how much over budget
Return the total time scheduled in Todos for this Item. And optionally how much time is left or how much we're short. 'Over budget' is simply indicated by a negative number.
1 Total time in Todos for this Item 2 Time scheduled for this Item
Return or set the InvoiceTypeID information (the categoryID for the type of invoicing to be performed) of the Item object. Use method ParentInvoiceTypeID for the categoryID of the parent category of all InvoiceTypes, which can be used to e.g. create a pulldown.
1 new value of InvoiceTypeID (default: no change)
1 current/old value of InvoiceTypeID
$item->InvoiceTypeID( $invoicetypeID ); $invoicetypeID = $item->InvoiceTypeID;
Return the LeaderID of the Project of the Order of the Item.
1 leaderID of the project of the order of the item
$leaderID = $item->LeaderID;
Return or set the OrderedByID information (contactID or employeeID of the person ordering to do the work) of the Item object.
1 new value of OrderedByID (default: no change)
1 current/old value of OrderedByID
$item->OrderedByID( $orderedbyID ); $orderedbyID = $item->OrderedByID;
Return or Set the OrderID information (the ID of the Order object to which this item applies) of the Item object.
1 new value of OrderID (default: no change)
1 current/old value of OrderID
$item->OrderID( $orderID ); $orderitemID = $item->OrderID;
Return the ParentInvoiceTypeID (the categoryID of the parent of all possible InvoiceTypes) which can be used to e.g. create a pulldown. Use method InvoiceTypeID to actually set the type of invoice for this object.
1 current value of ParentInvoiceTypeID
$parentinvoicetypeID = $item->ParentInvoiceTypeID;
Return the ParentTariffID (the categoryID of the parent of all possible Tariffs) which can be used to e.g. create a pulldown. Use method TariffID to actually set the type of tariff for this object.
1 current value of ParentTariffID
$parenttariffID = $item->ParentTariffID;
Return the ParentWorkTypeID (the categoryID of the parent of all possible WorkTypes) which can be used to e.g. create a pulldown. Use method WorkTypeID to actually set the type of work for this object.
1 current value of ParentWorkTypeID
$parentworktypeID = $item->ParentWorkTypeID;
Return the ProjectID (of the project for which this work was item) of the Item object. Its value can be used to create a new Liz::ProjectSet::Project object.
1 value of ProjectID
$projectID = $item->ProjectID;
Return or set the Status information of the Item object.
1 new value of the Status (default: no change)
1 current/old value of the Status
$item->Status( 1 ); $status = $item->Status;
Return or set the TariffID information (the categoryID for the tariff to be invoiced) of the Liz::ProjectSet::Item object. Use method ParentTariffID for the categoryID of the parent category of all Tariffes, which can be used to e.g. create a pulldown.
1 new value of TariffID (default: no change)
1 current/old value of TariffID
$item->TariffID( $tariffID ); $tariffID = $item->TariffID;
Return or set the TimeToSpend info (maximum number of minutes of work to be spent on this record) of the Item object.
1 new value of TimeToSpend (default: no change)
1 current/old value of TimeToSpend
$item->TimeToSpend( 30 ); $timespent = $item->TimeToSpend;
Return the Updated information of the Item object.
1 current timestamp of the Updated
$updated = $item->Updated;
Specify or return the URL associated with the Item object.
1 new value of the URL (default: no change)
1 previous/current version of the URL
$item->URL( $url ); $url = $item->URL;
Return the URLID of the Liz::ProjectSet::Item object. This is usually only used internally. It is better to use the more transparant method URL instead.
1 new urlID (default: no change)
1 current/old urlID
$urlID = $item->URLID;
Return or set the WorkTypeID information (the categoryID for the type of work performed) of the Item object. Use method ParentWorkTypeID for the categoryID of the parent category of all WorkTypes, which can be used to e.g. create a range of radio buttons or a pulldown menu.
1 new WorkTypeID (default: no change)
1 current/old WorkTypeID
$item->WorkTypeID( $worktypeID ); $worktypeID = $item->WorkTypeID;
The following methods return an SQL-statement(-like) handle that allows listing of (a selection of) the objects of a certain type.
Return an SQL-statement(-like) handle that contains a selection of the Todo records available in the ProjectSet for this Item. The following field names can be specified with the first parameter:
ID The ID of the Todo record. Can be used as a parameter on the L<Todo> object.
status The status of the Todo record: can be any number between 0 and 255 inclusive.
deadline Timestamp of the deadline to which the Todo record applies.
employeeID The ID of the person that is supposed to perform the work.
description Description of what is to be done.
timetospend Number of minutes that are allowed to spend on this Todo.
itemID The ID of the Order::Item to which this Todo applies.
doneID The ID of the Done record that applies to this Todo record.
updated Timestamp when the Todo record was last updated in the database.
created Timestamp when the Todo record was created in the database.
1 fields to return for each Todo record, seperated by comma's (default: 'ID,status,deadline,employeeID,description,timetospend,itemID,doneID,updated,created' ); 2 extra SQL condition to apply (default: none) 3 order in which to return the finds (default: deadline) 4 which records should be returned (default: all )
1 SQL-like statement handle (on which method "fetchrow" can be applied)
$result = $projectset->Todos; $result = $projectset->Todos( 'employeeID,description',"description LIKE '%extra%" );
Elizabeth Mattijsen ( lizperl@INC.nl )
(C) 1998-1999 International Network Consultants
Added methods TotalTodoTime and TotalDoneTime.
Now, update sets the alteredbyID-field to the current user ID. Now inherits the PROJECTSET from the object.
Added stuff for alteredbyID-field.
Added EmployeeIDs.
Now no longer adds Exporter to ISA: it wasn't necessary.
First version of this true Perl module.