NAME

Liz::ProjectSet - Project Management module


DESCRIPTION

The Liz::ProjectSet module allows a set of users to maintain information about the progress of Projects and all the facts they pertain to.

The Liz::ProjectSet module contains a number of sub-modules:

 Liz::ProjectSet::Client
 This module contains general information about a client.  It stores info
 about Projects and other archiving data to be associated with a client.

 Liz::ProjectSet::Contact
 This module contains all information pertaining to a contact people.
 A contact usually belongs to an organization, and possible to a client.
 It is in act a Liz::OCASet::Contact object in disguise.

 Liz::ProjectSet::Done
 This module contains all information pertaining activities that have
 already been performed, and which could potentially be invoiced to the
 client.

 Liz::ProjectSet::Employee
 This module contains all information pertaining to the people performing
 the work for the projects in this ProjectSet.  It is in act a
 Liz::OCASet::Contact object in disguise.

 Liz::ProjectSet::Invoice
 This module contains all information pertaining to an invoice sent to a
 client.

 Liz::ProjectSet::Organization
 This module contains all information pertaining to organizations.
 It is primarily used to store address information and the primary
 contact within that organization.  It is in fact a Liz::OCASet::Organization
 object in disguise.

 Liz::ProjectSet::Project
 This module contains all information pertaining to projects and sub-projects.
 It contains information such as who is the primary contact for the Project,
 and who is the Project leader and who which Employees in principle work on
 the project.

 Liz::ProjectSet::Order
 This module contains all information pertaining to orders from clients
 within a project.  It is primarily used to store information such as who
 gave the order and when it should be ready.  It is in fact a
 Liz::Forum::Message object in the forum database of the Client.

 Liz::ProjectSet::Item
 This module contains all information pertaining to an item on the order from
 a client within a project.  It is primarily used to store information such as
 the type of work to be done, maximum time to be spent and when it should be
 ready.

 Liz::ProjectSet::Todo
 This module contains all information pertaining to activities to be done
 by an employee or a group of employees or by somebody at all.


Incorporate into Client Module

The Liz::ProjectSet module itself works best when incorporated into a client module because it moves the responsibility of aquiring a connection to a database to the client module and it allows any customisation to take place transparently to the developer.

Take for example the ProjectSet method of xxLINK.pm module:

 sub ProjectSet {

 # Obtain the parameters
 # Start the category using the $xxlink handle as the database handle
 # Return the finished object

 my( $xxlink,$token ) = @_;
 my( $projectset ) = Liz::ProjectSet->new( $token,$xxlink );
 $projectset;
 }

or: in the shortest possible form:

 sub ProjectSet { Liz::ProjectSet->new( $_[1],$_[0] ) }

Because of the above code in xxLINK.pm, it is now possible to write the following code:

 $xxlink = new xxLINK;
 $projectset = $xxlink->ProjectSet( 'customers' );

Note that the database connection of the category is hidden in the creation of the $xxlink object.


CLASS METHODS

The following methods can be called without an object specification, but as a class method such as Liz::ProjectSet->method().


projectsets

Return list of projectset identification names of all projectsets in the database specified. Usually not called by itself, but rather incorporated inside a Client Module.

Input Parameters

 1 Liz::SQL compatible handle or reference to routine that performs connect
   (default: &Connect from caller's namespace)
 2 wildcard specification to match
   (default: all)
Output Parameters

 1 reference to list of identification names in the current database
 2 reference to hash with full names
 3 reference to hash with version info
Example

 $xxlink = new xxLINK;
 ($id,$name) = $xxlink->ProjectSets;
 $projectsets = @{$id};
 print "All $projectsets projectsets in Hospitality Net:\n";
 foreach( @{$id} ) {
   print " ProjectSet '$$name{$_}' ($_)\n";
 }

In xxLINK.pm:

 sub ProjectSets { Liz::ProjectSet->projectsets( @_ ) }


new

Create a new Liz::ProjectSet object. Creates connection or re-establishes connection with the MySQL database. Usually not called by itself, but rather incorporated inside a Client Module.

Input Parameters

 1 Liz::SQL compatible handle or reference to routine that performs connect
   (default: &Connect from caller's namespace)
 2 identification name of projectset
   (default: default projectset for database)
Output Parameters

 1 instantiated object
 2 flag whether ProjectSet was just created
Example

 $sum = new Sum;
 $projectset = $sum->ProjectSet( 'customers' );

In xxLINK.pm:

 sub ProjectSet { Liz::ProjectSet->new( @_ ) }


MODULE METHODS

The following methods allow changes to information that is associated with an entire projectset.


Name

Specify or return the current name of the projectset object. The name can be anything to further identify the goal of the projectset.

Input Parameters

 1 new name of projectset
   (default: no change)
Output Parameters

 1 current/old name of projectset
Example

 $xxlink = new xxLINK;
 $projectset = $xxlink->ProjectSet( 'projecten' );
 $projectset->Name( 'xxLINK Projectmanagement' );


LIST METHODS

The following methods return an SQL-statement(-like) handle that allows listing of (a selection of) the objects of a certain type.


Clients

Return an SQL statement handle for a list of clients.

The following fields may be specified with the 4th parameter:

 ID
 The ID of the client

 name
 The name of the client

 created
 Timestamp value when this client was created

 updated
 Timestamp when the client was last updated in the database

 firstliveon
 Timestamp when the first site of the client was published

 status
 The status (0..255) associated with the client

 foreignkey
 The foreign key of the client

 accountmanagerID
 The employeeID of the account manager

 maincontactID
 The contactID of the primary contact person

 invoicecontactID
 The contactID of the person to send invoices to

 organizationID
 The organizationID of the organization of the client

 urlID
 The ID of the URL associated with the client
Input Parameters

 1 fields to return (comma delimited)
   (default: 'ID,name,created,updated,firstliveon,status,accountmanagerID,maincontactID,invoicecontactID,organizationID,urlID' )
 2 extra SQL condition to be applied
   (default: none)
 3 order in which to return records
   (default: sortname)
 4 which records should be returned
   (default: all )
Output Parameters

 1 SQL statement handle (on which method "fetchrow" can be applied)
Example

 $result = $projectset->Clients;
 while( ($ID,$name,$foreignkey) = $result->fetchrow ) {
   print "ID: $name ($foreignkey)\n";
 }


Contacts

Return an SQL-statement(-like) handle that contains a selection of the Contacts available in the ProjectSet. The following field names can be specified with the first parameter:

 ID
 The ID of the Contact.  Can be used as parameter on the L<Contact>
 method.

 email
 The email address of the Contact, e.g. 'wendy@xxLINK.nl'.

 name
 The name (either last name or complete name, depending on implementation)
 of the Contact, e.g. 'Dijk'.

 firstname
 The first name of the Contact, e.g. 'Wendy'.

 prefix
 The prefix of the last name of the Contact, e.g. 'van'.

 phone
 The phone number of the Contact.

 fax
 The fax number of the Contact.

 status
 The status of the Contact: this can be any number between 0 and 255 inclusive.
 Status 255 usually means "automatic addition, should be reviewed".

 updated
 Timestamp when the Contact record was last updated in the database.

 created
 Timestamp when the Contact record was created in the database.

 sortname
 The string on which the Contact can be sorted.  It usually consists of
 the name field, followed by the firstname and prefix field, all in
 lowercase and with all non-alphanumeric characters removed.

 addressID
 The ID of the Address information of the Contact.  If non-zero, can be
 used to create an L<Address> object with.

 organizationID
 The ID of the Organization information of the Contact.  If non-zero, can be
 used to create an L<Organization> object with.

 genderID
 The ID of the Gender of the Contact.  Can be changed to the appropriate
 string by using the L<IDs2Strings> method.

 titleID
 The ID of the Title of the Contact.  Can be changed to the appropriate
 string by using the L<IDs2Strings> method.

 positionID
 The ID of the Position of the Contact.  Can be changed to the appropriate
 string by using the L<IDs2Strings> method.

 options
 The Options associated with the Contact.  Meaning of the options is
 entirely up to the implementation.

 data
 The extra Data associated with the Contact.  Meaning of the data is
 entirely up to the implementation.
Input Parameters

 1 fields to return for each Contact, seperated by comma's
   (default: 'ID,email,name,firstname,prefix,phone,fax,status,updated,created,sortname,addressID,organizationID,genderID,titleID,positionID,options,data')
 2 extra SQL condition to apply
   (default: none)
 3 order in which to return the finds
   (default: sortname)
 4 which records should be returned
   (default: all )
Output Parameters

 1 SQL-like statement handle (on which method "fetchrow" can be applied)
Examples

 $result = $projectset->Contacts;
 $result = $projectset->Contacts( 'firstname,prefix,name,email','status=255' );


DoneList

documentation required here...

Input Parameters

 1 fields to return for each Done record, seperated by comma's
   (default: 'ID,status,doneon,employeeID,worktypeID,description,timespent,updated,created,invoicetypeID,reason,projectID,contactID,leaderID,orderedbyID,traveltime,worktimeID,tariffID,invoiceID' )
 2 extra SQL condition to apply
   (default: none)
 3 order in which to return the finds
   (default: doneon)
 4 which records should be returned
   (default: all )
Output Parameters

 1 SQL-like statement handle (on which method "fetchrow" can be applied)
Examples

 $result = $projectset->Dones;
 $result = $projectset->Dones( 'employeeID,description',"description LIKE '%extra%" );


Dones

Return an SQL-statement(-like) handle that contains a selection of the Done records available in the ProjectSet. The following field names can be specified with the first parameter:

 ID
 The ID of the Done record.  Can be used as a parameter on the L<Done> object.

 status
 The status of the Done record: can be any number between 0 and 255 inclusive.

 doneon
 Timestamp of the date to which the Done record applies.

 employeeID
 The ID of the person that performed the work.

 worktypeID
 The ID of the type of work performed.

 description
 Description of what was done.

 timespent
 Number of minutes that were spent doing this (part of the) work.

 updated
 Timestamp when the Done record was last updated in the database.

 created
 Timestamp when the Done record was created in the database.

 invoicetypeID
 The category ID of the type of invoicing to be performed.

 reason
 Extra information as to the reason of the invoice or lack of invoicing.

 contactID
 The ID of the Contact for this Project when this work was Done.  Usually
 the same as the contactID of the Project unless the Project gets another
 Contact during its lifetime.

 leaderID
 The ID of the Leader of the project when this work was Done.  Usually
 the same as the leaderID of the Project unless the Project gets another
 Leader during its lifetime.

 orderedbyID
 The ID of the person giving the actual order to do this work.  Usually the
 Leader of the Project.

 traveltime
 Number of minutes spent in travelling to be able to get this work Done.

 worktimeID
 The ID of the type of time in which this work was performed (normal, extended,
 overtime, etc.).

 tariffID
 The type of tariff to be applied to this work.

 invoiceID
 The ID of the invoice on which this work was invoiced.
Input Parameters

 1 fields to return for each Done record, seperated by comma's
   (default: 'ID,status,doneon,employeeID,worktypeID,description,timespent,updated,created,invoicetypeID,reason,contactID,leaderID,orderedbyID,traveltime,worktimeID,tariffID,invoiceID' )
 2 extra SQL condition to apply
   (default: none)
 3 order in which to return the finds
   (default: doneon)
 4 which records should be returned
   (default: all )
Output Parameters

 1 SQL-like statement handle (on which method "fetchrow" can be applied)
Examples

 $result = $projectset->Dones;
 $result = $projectset->Dones( 'employeeID,description',"description LIKE '%extra%" );


Employees

Return an SQL-statement(-like) handle that contains a selection of the Employees available in the ProjectSet. The following field names can be specified with the first parameter:

 ID
 The ID of the Contact.  Can be used as parameter on the L<Employee>
 method.

 email
 The email address of the Contact, e.g. 'wendy@xxLINK.nl'.

 name
 The name (either last name or complete name, depending on implementation)
 of the Employee, e.g. 'Dijk'.

 firstname
 The first name of the Employee, e.g. 'Wendy'.

 prefix
 The prefix of the last name of the Employee, e.g. 'van'.

 phone
 The phone number of the Employee.

 fax
 The fax number of the Employee.

 status
 The status of the Employee: this can be any number between 0 and 255 inclusive.
 Status 255 usually means "automatic addition, should be reviewed".

 updated
 Timestamp when the Employee record was last updated in the database.

 created
 Timestamp when the Employee record was created in the database.

 sortname
 The string on which the Employee can be sorted.  It usually consists of
 the name field, followed by the firstname and prefix field, all in
 lowercase and with all non-alphanumeric characters removed.

 addressID
 The ID of the Address information of the Employee.  If non-zero, can be
 used to create an L<Address> object with.

 organizationID
 The ID of the Organization information of the Employee.  If non-zero, can be
 used to create an L<Organization> object with.

 genderID
 The ID of the Gender of the Employee.  Can be changed to the appropriate
 string by using the L<IDs2Strings> method.

 titleID
 The ID of the Title of the Employee.  Can be changed to the appropriate
 string by using the L<IDs2Strings> method.

 positionID
 The ID of the Position of the Employee.  Can be changed to the appropriate
 string by using the L<IDs2Strings> method.

 options
 The Options associated with the Employee.  Meaning of the options is
 entirely up to the implementation.

 data
 The extra Data associated with the Employee.  Meaning of the data is
 entirely up to the implementation.
Input Parameters

 1 fields to return for each Employee, seperated by comma's
   (default: 'ID,email,name,firstname,prefix,phone,fax,status,updated,created,sortname,addressID,organizationID,genderID,titleID,positionID,options,data')
 2 extra SQL condition to apply
   (default: none)
 3 order in which to return the finds
   (default: sortname)
 4 which records should be returned
   (default: all )
Output Parameters

 1 SQL-like statement handle (on which method "fetchrow" can be applied)
Examples

 $result = $projectset->Employees;
 $result = $projectset->Employees( 'firstname,prefix,name,email','status=255' );


InvoiceTypes

Return an SQL-statement(-like) handle that contains the ID and names of the InvoiceTypes.

Input Parameters

 1 Fields to return (default: 'ID,name')
Output Parameters

 1 SQL statement handle (on which method "fetchrow" can be applied)


OBJECT METHODS

The following methods allow creation of the various objects of the ProjectSet module.


Circumstances

Return an SQL-statement(-like) handle that contains the ID and names of the Circumstances.

Input Parameters

 1 Fields to return (default: 'ID,name')
Output Parameters

 1 SQL statement handle (on which method "fetchrow" can be applied)


Circumstances2Pulldown

Create the html for a pulldown with all Circumstances in this ProjectSet in it.

Input Parameters

  1 Name of the variable in the script
  2 Current value assigned to the variable in the script
  3 Extra SQL to limit the selection of projects 
Output Parameters 1 HTML to display circumstances with


Items

Return an SQL-statement(-like) handle that contains a selection of the Items available in the ProjectSet. The following field names can be specified with the first parameter:

 ID
 The ID of the Item.  Can be used as parameter on the L<Item>
 method.

 description
 The description of the Item, e.g. 'Implementatie MailingList Functionaliteit'.

 deadline
 Timestamp for the deadline of the Item

 status
 The status of the Item: this can be any number between 0 and 255 inclusive.

 orderedbyID
 The ID of the Contact/Employee information of the Item

 updated
 Timestamp when the Item record was last updated in the database.

 created
 Timestamp when the Item record was created in the database.

 orderID
 The ID of the Order information of the Item.  If non-zero, can be
 used to create an L<Order> object with.

 contactID
 The ID of the Contact information of the Item.  If non-zero, can be
 used to create an L<Contact> object with.

 urlID
 The ID of the URL associated with the Order.  If non-zero, can be
 used to create an L<URL> object with.

 invoicetypeID
 The ID of the category that contains the type of invoicing to be
 performed.

 worktypeID
 The ID of the category that contains the type of work to be done.

 tariffID
 The ID of the category that contains the tariff to be used for invoicing.
Input Parameters

 1 fields to return for each Item, seperated by comma's
   (default: 'ID,description,deadline,status,orderedbyID,updated,created,orderID
,contactID,urlID,invoicetypeID,worktypeID,tariffID' );
 2 extra SQL condition to apply
   (default: none)
 3 order in which to return the finds
   (default: created)
 4 which records should be returned
   (default: all )
Output Parameters

 1 SQL-like statement handle (on which method "fetchrow" can be applied)
Examples

 $result = $projectset->Items;
 $result = $projectset->Items( 'ID,description,orderedbyID','status=0' );


Orders

Return an SQL-statement(-like) handle that contains a selection of the Orders available in the ProjectSet. The following field names can be specified with the first parameter:

 ID
 The ID of the Order.  Can be used as parameter on the L<Project>
 method.

 name
 The name of the Order, e.g. 'Implementatie MailingList Functionaliteit'.

 deadline
 Timestamp for the deadline of the Order

 status
 The status of the Order: this can be any number between 0 and 255 inclusive.

 leaderID
 The ID of the Leader information of the Order.

 updated
 Timestamp when the Order record was last updated in the database.

 created
 Timestamp when the Order record was created in the database.

 sortname
 The string on which the Order can be sorted.  It usually consists of
 the name field all in lowercase and with all non-alphanumeric characters
 removed.

 projectID
 The ID of the Project information of the Order.  If non-zero, can be
 used to create an L<Project> object with.

 organizationID
 The ID of the Organization information of the Project.  If non-zero, can be
 used to create an L<Organization> object with.

 maincontactID
 The ID of the Contact information of the Order.  If non-zero, can be
 used to create an L<Contact> object with.

 invoicecontactID
 The ID of the Contact with regards to invoices of the Order.  If non-zero,
 can be used to create an L<Contact> object with.

 urlID
 The ID of the URL associated with the Order.  If non-zero, can be
 used to create an L<URL> object with.
Input Parameters

 1 fields to return for each Project, seperated by comma's
   (default: 'ID,name,deadline,status,leaderID,updated,created,sortname,projectID,organizationID,maincontactID,invoicecontactID,urlID' );
 2 extra SQL condition to apply
   (default: none)
 3 order in which to return the finds
   (default: sortname)
 4 which records should be returned
   (default: all )
Output Parameters

 1 SQL-like statement handle (on which method "fetchrow" can be applied)
Examples

 $result = $projectset->Orders;
 $result = $projectset->Orders( 'ID,name,leaderID','status=0' );


Organizations

Return an SQL-statement(-like) handle that contains a selection of the Organizations available in the ProjectSet. The following field names can be specified with the first parameter:

 ID
 The ID of the Organization.  Can be used as parameter on the L<Organization>
 method.

 email
 The email address of the Organization, e.g. 'info@xxLINK.nl'.

 name
 The name of the Organization, e.g. 'xxLINK Internet Services'.

 phone
 The phone number of the Organization.

 fax
 The fax number of the Organization.

 status
 The status of the Organization: this can be any number between 0 and 255
 inclusive.  Status 255 usually means "automatic addition, should be reviewed".

 updated
 Timestamp when the Organization record was last updated in the database.

 created
 Timestamp when the Organization record was created in the database.

 sortname
 The string on which the Organization can be sorted.  It usually consists of
 the name field in lowercase and with all non-alphanumeric characters removed.

 addressID
 The ID of the Address information of the Organization.  If non-zero, can be
 used to create an L<Address> object with.

 contactID
 The ID of the main Contact information of the Organization.  If non-zero,
 can be used to create a L<Contact> object with.

 typeID
 The ID of the Type of the Organization.  Can be changed to the appropriate
 string by using the L<IDs2Strings> method.

 options
 The Options associated with the Organization.  Meaning of the options is
 entirely up to the implementation.

 data
 The extra Data associated with the Organization.  Meaning of the data is
 entirely up to the implementation.
Input Parameters

 1 fields to return for each Organization, seperated by comma's
   (default: 'ID,email,name,phone,fax,status,updated,created,sortname,addressID,contactID,typeID,options,data')
 2 extra SQL condition to apply
   (default: none)
 3 order in which to return the finds
   (default: sortname)
 4 which records should be returned
   (default: all )
Output Parameters

 1 SQL-like statement handle (on which method "fetchrow" can be applied)
Examples

 $result = $projectset->Organizations;
 $result = $projectset->Organizations( 'name,email','status=255' );


Preference

Open or create a Liz::ProjectSet::Preference object.

Output Parameters

 1 Instantiated Preference object


PreferedProjects

Returns an instantiated Liz::ProjectSet::Preference object for Project objects.

Output Parameters

 1 Instantiated Preference object


Projects

Return an SQL-statement(-like) handle that contains a selection of the Projects available in the ProjectSet. The following field names can be specified with the first parameter:

 ID
 The ID of the Project.  Can be used as parameter on the L<Project>
 method.

 name
 The name of the Project, e.g. 'Implementatie MailingList Functionaliteit'.

 deadline
 Timestamp for the deadline of the project

 status
 The status of the Project: this can be any number between 0 and 255 inclusive.

 leaderID
 The ID of the Leader information of the Project.

 updated
 Timestamp when the Project record was last updated in the database.

 created
 Timestamp when the Project record was created in the database.

 sortname
 The string on which the Project can be sorted.  It usually consists of
 the name field all in lowercase and with all non-alphanumeric characters
 removed.

 clientID
 The ID of the Client information of the Project.  If non-zero, can be
 used to create an L<Client> object with.

 organizationID
 The ID of the Organization information of the Project.  If non-zero, can be
 used to create an L<Organization> object with.

 maincontactID
 The ID of the Contact information of the Project.  If non-zero, can be
 used to create an L<Contact> object with.

 invoicecontactID
 The ID of the Contact with regards to invoices of the Project.  If non-zero,
 can be used to create an L<Contact> object with.

 urlID
 The ID of the URL associated with the Project.  If non-zero, can be
 used to create an L<URL> object with.
Input Parameters

 1 fields to return for each Project, seperated by comma's
   (default: 'ID,name,deadline,status,leaderID,updated,created,sortname,clientID,organizationID,maincontactID,invoicecontactID,urlID' );
 2 extra SQL condition to apply
   (default: none)
 3 order in which to return the finds
   (default: sortname)
 4 which records should be returned
   (default: all )
Output Parameters

 1 SQL-like statement handle (on which method "fetchrow" can be applied)
Examples

 $result = $projectset->Projects;
 $result = $projectset->Projects( 'ID,name,leaderID','status=0' );


Todos

Return an SQL-statement(-like) handle that contains a selection of the Todo records available in the ProjectSet. 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.
Input Parameters

 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 )
Output Parameters

 1 SQL-like statement handle (on which method "fetchrow" can be applied)
Examples

 $result = $projectset->Todos;
 $result = $projectset->Todos( 'employeeID,description',"description LIKE '%extra%" );


Tariffs

Return an SQL-statement(-like) handle that contains the ID and names of the Tariffs.

Input Parameters

 1 Fields to return (default: 'ID,name')
Output Parameters

 1 SQL statement handle (on which method "fetchrow" can be applied)


WorkTypes

Return an SQL-statement(-like) handle that contains the ID and names of the WorkTypes.

Input Parameters

 1 Fields to return (default: 'ID,name')
Output Parameters

 1 SQL statement handle (on which method "fetchrow" can be applied)


OBJECT METHODS

The following methods allow creation of the various objects of the ProjectSet module.


CategorySet

Return the CategorySet object that is associated with the ProjectSet. This can be used to add further categories to Done and Project objects,

Output Parameters

 1 CategorySet object
Example

 $xxlink = new xxLINK;
 $projectset = $xxlink->ProjectSet;
 $categoryset = $projectset->CategorySet;


Client

Create a new Liz::ProjectSet::Client object, either from existing information or for a new entry. For more documentation, see the Liz::Forum::Message object itself.

Input Parameters

 1 ID or name to create Client object with
   (default: none = new client)
Output Parameters

 1 instantiated Liz::ProjectSet::Client object
Example

 $xxlink = new xxLINK;
 $projectset = $xxlink->ProjectSet;

 $client = $projectset->Client;
 $client = $projectset->Client( $clientID );


ClientForum

Return the Forum object that is associated with the ProjectSet for clients.

Output Parameters

 1 Forum object
Example

 $xxlink = new xxLINK;
 $projectset = $xxlink->ProjectSet;
 $clientforum = $projectset->ClientForum;


Contact

Create a new Liz::ProjectSet::Contact object, either from existing information or for a new entry. For more documentation, see the Liz::OCASet::Contact object itself.

Input Parameters

 1 ID/lastname to create Contact object with
   (default: none = new contact)
 2 firstname to create Contact object with
   (default: none)
 3 prefix to create Contact object with
   (default: none)
 4 sortname of contact (name on which contact should be sorted)
   (default: same as name if 1st parameter is name)
Output Parameters

 1 instantiated Liz::ProjectSet::Contact object
Example

 $xxlink = new xxLINK;
 $projectset = $xxlink->ProjectSet;

 $contact = $projectset->Contact;
 $contact = $projectset->Contact( 'Mattijsen','Elizabeth' );
 $contact = $projectset->Contact( $contactID );


Done

Create a new Liz::ProjectSet::Done object, either from existing information or for a new entry. For more documentation, see the Liz::ProjectSet::Done object itself.

Input Parameters

 1 ID to create Done object with
   (default: none = new Done record)
Output Parameters

 1 instantiated Liz::ProjectSet::Done object
Example

 $xxlink = new xxLINK;
 $projectset = $xxlink->ProjectSet;

 $done = $projectset->Done;
 $done = $projectset->Done( $doneID );


Employee

Return the Liz::ProjectSet::Employee object that is associated with a particular employee. The Liz::ProjectSet::Employee object is really a Liz::OCASet::Contact object in disguise.

Input Parameters

 1 ID or name to create Employee object with (e.g.'Dijk')
 2 if 1==name: firstname of contact (e.g. 'Wendy')
 3 if 1==name: prefix of contact (e.g. 'van')
 4 if 1==name: name on which to sort the object on
   (default: name,firstname,prefix as lowercase with alpha only)
Output Parameters

 1 Liz::ProjectSet::Employee object
Example

 $xxlink = new xxLINK;
 $projectset = $xxlink->ProjectSet;
 $employee = $projectset->Employee;
 $employee = $projectset->Employee( $employeeID );


EmployeeSet

Return the OCASet object that is associated with the ProjectSet for employees.

Output Parameters

 1 OCASet object
Example

 $xxlink = new xxLINK;
 $projectset = $xxlink->ProjectSet;
 $employeeset = $projectset->EmployeeSet;


Item

Create a new Liz::ProjectSet::Item object, either from existing information or for a new entry. For more documentation, see the Liz::ProjectSet::Item object itself.

Input Parameters

 1 ID or name to create Item object with
   (default: none = new Project)
 2 orderID to create object with
Output Parameters

 1 instantiated Liz::ProjectSet::Item object
Example

 $xxlink = new xxLINK;
 $projectset = $xxlink->ProjectSet;

 $item = $projectset->Item;
 $item = $projectset->Item( 'Programmeren' );
 $item = $projectset->Item( $itemID );


OCASet

Return the OCASet object that is associated with the ProjectSet for external contacts and clients.

Output Parameters

 1 OCASet object
Example

 $xxlink = new xxLINK;
 $projectset = $xxlink->ProjectSet;
 $ocaset = $projectset->OCASet;


Order

Create a new Liz::ProjectSet::Order object, either from existing information or for a new entry. For more documentation, see the Liz::ProjectSet::Order object itself.

Input Parameters

 1 ID or name to create Order object with
   (default: none = new Project)
 2 projectID to create object with
Output Parameters

 1 instantiated Liz::ProjectSet::Order object
Example

 $xxlink = new xxLINK;
 $projectset = $xxlink->ProjectSet;

 $order = $projectset->Order;
 $order = $projectset->Order( 'Projectmanagement Development' );
 $order = $projectset->Order( $orderID );


Organization

Create a new Liz::ProjectSet::Organization object, either from existing information or for a new entry. For more documentation, see the Liz::OCASet::Organization object itself.

Input Parameters

 1 ID/name to create Organization object with
   (default: none = new organization)
 2 sortname of organization (name on which organization should be sorted)
   (default: same as name if 1st parameter is name)
Output Parameters

 1 instantiated Liz::ProjectSet::Organization object
Example

 $xxlink = new xxLINK;
 $projectset = $xxlink->ProjectSet;

 $organization = $projectset->Organization;
 $organization = $projectset->Organization( $organizationID );


Project

Create a new Liz::ProjectSet::Project object, either from existing information or for a new entry. For more documentation, see the Liz::ProjectSet::Project object itself.

Input Parameters

 1 ID or name to create Project object with
   (default: none = new Project)
 2 clientID to create object with
Output Parameters

 1 instantiated Liz::ProjectSet::Project object
Example

 $xxlink = new xxLINK;
 $projectset = $xxlink->ProjectSet;

 $project = $projectset->Project;
 $project = $projectset->Project( 'Projectmanagement Development' );
 $project = $projectset->Project( $projectID );


Todo

Create a new Liz::ProjectSet::Todo object, either from existing information or for a new entry. For more documentation, see the Liz::ProjectSet::Todo object itself.

Input Parameters

 1 ID to create Todo object with
   (default: none = new Todo record)
Output Parameters

 1 instantiated Liz::ProjectSet::Todo object
Example

 $xxlink = new xxLINK;
 $projectset = $xxlink->ProjectSet;

 $todo = $projectset->Todo;
 $todo = $projectset->Todo( $todoID );


Tree

Return the Liz::Tree object that is associated with the ProjectSet. This can be used to create structure between the ID's of the ProjectSet.

Output Parameters

 1 Tree object
Example

 $xxlink = new xxLINK;
 $projectset = $xxlink->ProjectSet;
 $tree = $projectset->Tree;


URLSet

Return the URLSet object that is associated with the ProjectSet.

Output Parameters

 1 URLSet object
Example

 $xxlink = new xxLINK;
 $projectset = $xxlink->ProjectSet;
 $urlset = $projectset->URLSet;


INHERITABLE METHODS

The following methods are not intended for use with the ProjectSet object itself, but by the submodules. To avoid repetition in the submodules, they are defined here only once.


EmployeeIDs

Return or set the EmployeeIDs (list of contactID's from the EmployeeSet) of the Liz::ProjectSet::Client object.

Input Parameters

 1..N new employeeID's
      (default: no change)
Output Parameters

 1..N current/old employeeID's
Example

 $client->EmployeeIDs( @employeeID );
 @employeeID = $client->EmployeeIDs;


OtherContactIDs

Return or set the OtherContactIDs (list of contactID's) of the Liz::ProjectSet::xxx object.

Input Parameters

 1..N new other contactID's
      (default: no change)
Output Parameters

 1..N current/old other contactID's
Example

 $client->OtherContactIDs( @othercontactID );
 @othercontactID = $client->OtherContactIDs;


ProjectSet

Return the ProjectSet object of the Liz::ProjectSet::xxx object.

Output Parameters

 1 ProjectSet object
Example

 $projectset = $client->ProjectSet;


URLID

Return the URLID of the Liz::ProjectSet::xxx object. It can be used to create a Liz::URLSet::URL object. This is usually only used internally. It is better to use the more transparant method URL instead.

Output Parameters

 1 current urlID
Example

 $urlID = $client->URLID;


CONTENT METHODS

The following methods allow information to be associated with ID's of the sub-objects, without having to create such a sub-object.


Search

Searches the objects in the projectset for a given search query.

Input Parameters

 1 search query to look for
 2 comma separated list of object types to look in
   (default: 'Client,Contact,Done,Employee,Item,Order,Organization,Project,Todo')
Output Parameters

 1 list of result objects that somehow match the query


HTML METHODS


Clients2Pulldown

Create the html for a pulldown with all clients in this ProjectSet in it.

Input Parameters

  1 Name of the variable in the script
  2 Current value assigned to the variable in the script
  3 Extra SQL to limit the selection of projects 
Output Parameters 1 HTML to display clients with


EmployeesAndContacts2Pulldown

Create the html for a pulldown with all showable Employees and Contacts in this ProjectSet in it.

Input Parameters

  1 Name of the variable in the script
  2 Current value assigned to the variable in the script
  3 Extra SQL to limit the selection of projects 
Output Parameters 1 HTML to display contact pulldown with


Contacts2Pulldown

Create the html for a pulldown with all contacts in this ProjectSet in it.

Input Parameters

  1 Name of the variable in the script
  2 Current value assigned to the variable in the script
  3 Extra SQL to limit the selection of projects 
Output Parameters 1 HTML to display contact pulldown with


Employees2Pulldown

Create the html for a pulldown with all employees in this ProjectSet in it.

Input Parameters

  1 Name of the variable in the script
  2 Current value assigned to the variable in the script
  3 Extra SQL to limit the selection of projects 
Output Parameters 1 HTML to display employee with


InvoiceTypes2Pulldown

Create the html for a pulldown with all InvoiceTypes in this ProjectSet in it.

  1 Name of the variable in the script
  2 Current value assigned to the variable in the script
  3 Extra SQL to limit the selection of projects 
Output Parameters 1 HTML to display clients with


Items2Pulldown

Create the html for a pulldown with all items in this ProjectSet in it.

Input Parameters

  1 Name of the variable in the script
  2 Current value assigned to the variable in the script
  3 Extra SQL to limit the selection of projects 
Output Parameters 1 HTML to display clients with


Orders2Pulldown

Create the html for a pulldown with all projects for this object in it.

Input Parameters

  1 Name of the variable in the script
  2 Current value assigned to the variable in the script
  3 Extra SQL to limit the selection of projects 
Output Parameters

  1 HTML to display orderspulldown with


Tariffs2Pulldown

Create the html for a pulldown with all Tariffs in this ProjectSet in it.

  1 Name of the variable in the script
  2 Current value assigned to the variable in the script
  3 Extra SQL to limit the selection of projects 
Output Parameters 1 HTML to display clients with


Todos2Pulldown

Create the html for a pulldown with all Todos in this ProjectSet in it.

Input Parameters

  1 Name of the variable in the script
  2 Current value assigned to the variable in the script
  3 Extra SQL to limit the selection of projects 
Output Parameters 1 HTML to display clients with


Projects2Pulldown

Create the html for a pulldown with all projects for this Client in it.

Input Parameters

  1 Name of the variable in the script
  2 Current value assigned to the variable in the script
  3 Extra SQL to limit the selection of projects 
Output Parameters

  1 HTML to display projectspulldown with


WorkTypes2Pulldown

Create the html for a pulldown with all WorkTypes in this ProjectSet in it.

  1 Name of the variable in the script
  2 Current value assigned to the variable in the script
  3 Extra SQL to limit the selection of projects 
Output Parameters 1 HTML to display clients with


INTERNAL METHODS

The following methods are also intended to be inherited by submodules, but are not intended to be uses outside of the submodules.


ClientIDAssociations

Return or set the ClientIDs (list of forumID's from the ClientForum) of the Liz::ProjectSet::xxx object. Because the associations are linked to the ID of the object, this method should only be called after the first successful update.

Input Parameters

 1..N new clientID's
      (default: no change)
Output Parameters

 1..N current/old clientID's
Example

 $self->ClientIDAssociations( @clientID );
 @clientID = $self->ClientIDAssociations;


CurrentUserID

Return the CurrentUserID-field, this is the employeeID of the user currently logged in.

Output Parameters

 1 EmployeeID of the current user


EmployeeIDAssociations

Return or set the EmployeeIDs (list of contactID's from the EmployeeSet) of the Liz::ProjectSet::xxx object. Because the associations are linked to the ID of the object, this method should only be called after the first successful update.

Input Parameters

 1..N new employeeID's
      (default: no change)
Output Parameters

 1..N current/old employeeID's
Example

 $self->EmployeeIDAssociations( @{$self->{'EMPLOYEEID'}} );
 $self->{'EMPLOYEEID'} = [$self->EmployeeIDAssociations];


Maintainer

Return the maintainer status flag for the current user.

Output Parameters

 1 Flag: Maintainer status


ObjectName

Return the name of the object.

Input Parameters

 1 ID of the object
Output Parameters

 1 Name of the object


OtherContactIDAssociations

Return or set the OtherContactIDs (list of contactID's) of the Liz::ProjectSet::xxx object. Because the associations are linked to the ID of the object, this method should only be called after the first successful update.

Input Parameters

 1..N new other contactID's
      (default: no change)
Output Parameters

 1..N current/old other contactID's
Example

 $self->OtherContactIDAssociations( @{$self->{'OTHERCONTACTID'}} );
 $self->{'OTHERCONTACTID'} = [$self->OtherContactIDAssociations];


UserPreferencesRootObject

Return the root user preferece object for the current user.

Output Parameters

 1 The user preference root object


ValidEmployee

Returns true if a valid Employee object exists for the ID provided.

Output Parameters

 1 true if the employeeID is valid


GetClientID

Fill the ClientID field of the object with the ClientID associated with the ID specified. Usually used in the ``new'' method of a submodule.

Example

 $self->GetClientID( $self->{'PROJECTID'} );


GetContactID

Fill the ContactID field of the object with the ContactID associated with the ID specified. Usually used in the ``new'' method of a submodule.

Example

 $self->GetContactID( $self->{'ITEMID'} );


GetLeaderID

Fill the LeaderID field of the object with the LeaderID associated with the ID specified. Usually used in the ``new'' method of a submodule.

Example

 $self->GetLeaderID( $self->{'PROJECTID'} );


GetOrderID

Fill the OrderID field of the object with the OrderID associated with the ID specified. Usually used in the ``new'' method of a submodule.

Example

 $self->GetOrderID( $self->{'ITEMID'} );


GetProjectID

Fill the ProjectID field of the object with the ProjectID associated with the ID specified. Usually used in the ``new'' method of a submodule.

Example

 $self->GetProjectID( $self->{'ORDERID'} );


GetURL

Fill the URL field of the object with the URL associated by the URLID field in the object. Creates a URLOBJECT field if necessary. Usually used in the ``new'' method of a submodule.

Input Parameters

 1 flag: whether to keep the ID with the URL
   (default: no)
Example

 $self->GetURL if $self->{'URLID'};


GetURLID

Fill the URLID field of the object with the URL associated by the URL field in the object. Uses the URLOBJECT field if available or creates a new one. Usually used in the ``update'' method of a submodule.

Example

 $self->GetURLID


SetDoneID

Fill the DoneID field of the object with the DoneID associated with the ID specified. Usually used in the ``new'' method of a submodule.

Example

 $self->SetDoneID( $self->{'TODOID'} ,$self->{'ID'} );


StatusName

Return the name of the status

Input Parameters

 1 status code
Output Parameters

 1 Name of the status
NOTE

Currently possible status codes:

  0=actief
  1=inactief
  2=afgestreept
255=gewist


StatusCode

Return the code of the status name

Input Parameters

 1 status name 
Output Parameters

 1 Code of the status
NOTE

Currently possible status codes:

  0=actief
  1=inactief
  2=afgestreept
255=gewist


AUTHOR

Elizabeth Mattijsen ( lizperl@INC.nl )

Contributions by:

- Sjoerd Lawende ( sjoerd@xxLINK.nl )


COPYRIGHT

(C) 1998-1999 International Network Consultants


HISTORY

Version 0.33, 13 December 1999

DoneList now also uses the limit parameter...

Added method StatusCode.

Added documentation for StatusCode and StatusName.

Version 0.32, 9 December 1999

Added method UserPreferencesRootObject.

Version 0.31, 8 December 1999

Added key PREFERENCES containing preferences category for current user.

Version 0.30, 7 December 1999

Added key MAINTAINER to contain the maintainer flag of the current user.

Added Maintainer method to access flag mentioned above.

Version 0.29, 6 December 1999

Added CurrentUserID to the allowed list, so it can now be accessed as a method. Also added documentation.

Added ValidEmployee to check if a user has a valid EmployeeID.

Version 0.28, 3 December 1999

Put module name between quotes to fix obscure bug in Perl 5.005x under ModPerl in methods ClientForum, EmployeeSet, OCASet, Tree and URLSet.

Added method EmployeesAndContacts2Pulldown to be used for the display of any possible contacts (eg. Contacts _and_ Employees in for example a Done object.

Added 'circumstance' to the categories for the projectset.

Added table update for circumstanceID in Done-table

Added methods Circumstances and Circumstances2Pulldown.

Version 0.27, 30 November 1999

Added code to new to set the current user ID in the ProjectSet object.

Version 0.26, 29 November 1999

Upgraded all objecttables to include an alteredbyID-field.

Version 0.25, 25 November 1999

Normalised internal documentation of method Search and also cleaned up the code a bit.

Put module name between quotes to fix obscure bug in Perl 5.005x under ModPerl in methods Client, Contact, Done, Employee, Item, Order, Organization, Project and Todo.

Removed 'projectID' from fields-list of Dones.

Added 'Done' to list of objects with description in ObjectName.

Added DoneList, for fast listing of Dones with info from other tables.

Version 0.24, 16 November 1999

Added method ObjectName to return name of an object in the database. Hopefully regardless of the name of the namefield. Also added method StatusName.

Version 0.23, 8 November 1999

Fixed problem with xxx2Pulldown.

Version 0.22, 18 October 1999

Added fields to the Client table.

Version 0.21, 13 October 1999

Added inheritable method ProjectSet.

Version 0.20, 7 October 1999

Changed Tariffs, WorkTypes and InvoiceTypes. Looked like the couldn't ever have worked (I DO remember they did though, SL).

Version 0.19, 30 September 1999

Now no longer adds Exporter to ISA: it wasn't necessary.

Version 0.18, 29 September 1999

Fixed problem with OtherContactIDs; CHANGED flag is now set if array is changed.

Version 0.17, 27 September 1999

Added method Employees2Pulldown.

Version 0.16, 20 September 1999

Added methods Tariffs, InvoiceTypes, WorkTypes, Tariffs2Pulldown, InvoiceTypes2Pulldown, WorkTypes2Pulldown (SL).

Version 0.15, 17 September 1999

Added parameter 'return' to xxx2Pulldown, to enable the developer to specify the field names of the object of which to return pulldown html (SL).

Version 0.14, 3 September 1999

Fixed problem in new that would cause entries to be added in the top of the CategorySet.

Version 0.13, August 20, 1999

Added support for extra fields to new.

Version 0.12, August 18, 1999

Method ClientIDAssociations added.

Version 0.11, August 17, 1999

Added Clients2Pulldown method (SL).

Version 0.1, 16 August 1999

First version of this true Perl module.