Formatting code for ToDoForAll
Back to my [[DanieBrink My user Page (Danie Brink)]]
== WORKFLOW, PROJECT PLANNING, LOGISTICS, CRM, ETC ==
I decided to see if there is a way I can do these type of document things (design) in a generic way so as to allow for as much functionality as we can possibly get out of it.
This is the result... So far. I've placed the comments next to the tables mostly it makes it a bit difficult to refference but its easier to just see what each fields purpose is
TABLE todotypes
1. todotypeid // unique ID
2. todotypename // descriptive name
3. todotypecheckactions // will check the eventlog for completed actions and update todoitems.completed field accordingly
4. todotypecheckdependants // will check the tododefs completed state and update todoitems.completed field accordingly
5. todotypedoesbilling // will make use of todoitems.billingitem * timespend.timespend = cost to todoitems.billingitem cost acc AND todoitems.billingitem_price * timespend.timespend = price biled to billcontractref OR maybe it needs to be handled differenctly not to sure could be we need to make it salesorder in stead.
6. todotypehasfromtime // Time to start
7. todotypehastotime // Time to end
8. todotypehassecurity // Security group can be assigned with modification rights if null only the owner can modify
9. todotypecanassigngroup // can be assigned to a member of this group ownership can be transfered if null any user can be assigned see also security
10. todoincalender // will apear in calendar instead of todo list completed changes to 0 or 100/ on or off
11. todotypesharewith // can be viewed by this group if null all groups can view
12. todotypeavailableto // can be vied only by this security roll if null only todotypehassecurity can view
13. todoingant // can be viewed in a gantt chart
14. todocanplan // fromtime and totime will be recalculated and the item and its children will be able to be shifted
15. todocustomerpublic // the customer in the billcontractref can also view this document.
TABLE todogroups
1. todogroupid // Unique ID
2. todogroupname // the name of the group
3. todogroupdesc // a description of the group
4. todogroupactive // deleted or not
TABLE todogroupusers
1. todogroupid // todogroupid -- key
2. userid // user id -- key a user may belong to multiple groups
3. inactivekeepinformed // user has read only access
TABLE todoitems
1. todoid // Unique id
2. userid // The guy who perform the todo -- see ownerid
3. todogroupid // The group who perform the todo -- see ownerid
3. secrole // The security group allowed to access -- todotypes.todotypehassecurity
4. subject // A short text description
5. timefrom // When will this task start -- todotypes.todotypehasfromtime
6. timeto // When will it end -- todotypes.todotypehastotime
7. type // the type indicated the checking system to use -- reference todotypes
8. complete // 0-100 -- indicating state -- see todotypes.todotypecheckactions & todotypes.todotypecheckdependants
9. datarefference // a reference to a file or blob object -- if a templateid is assigned, it is the template document and some parsing will need to be done here if you want to replace content
10. parentid // if this is filled in the parent will set complete by average of children and also use todotypecheckactions & todotypecheckdependants
11. prio // Lising order apart from timefrom used where there is a parent
13. ownerid // the guy who created the todo
14. timespend // how much time was spend on this item for certain types only -- see todotypes.todotypedoesbilling
15. billingitem // a dummy item to use for billing purposes as well as cost -- see todotypes.todotypedoesbilling
16. state // open, close, waiting, inactive, other see todotypes.todotypecheckactions & todotypes.todotypecheckdependants & parentid
17. statenaritive // filed in when state=other -- see todotypes.state
18. contractref // filed with the contractref to bill
19. todotemplateid // if this is[[]][[ set it is not a true item but is really a template to be replicated -- see todotypes & todoactions, for questions that can be asked see also todotemplates
TABLE todoactions
1. actionid // Uniue ID -- see todotypes.todotypecheckactions
2. todoid // The todoitem it belongs to
3. actionname // A descriptive name
4. actionrefcode // This is a special event key definition that can be checked against the eventlog -- see eventlog.eventrefcode
5. actionrefkey // a key to match in the eventlog.eventrefkeys
6. actioncompleted // This tells us whether the action was completed.
TABLE tododeps
1. todoparentid // The parent todo item that does the waiting -- see todotypes.todotypecheckdependants
2. tododepid // The child to do item that performs the action
TABLE documents
1. docref // A unique reference linked from todoitemdocs.todoitemdocref
2. docdata // The data, postgres require some special handling not sure about mysql here
TABLE todoitemdocs
1. todoitemdocsid // A unique key
2. todoitemid // the todoitem we link to, if todoitem has template assigned this is a template document and require some special handling see template group
3. todoitemdocname // The descriptive name of the document if template may be renamed see template group (special handling)
4. todoitemdocref // The local assigned unique name for keeping document names unique even if they share same descriptivename
5. todoitemdocreadonly // Indicates if this is a readonly document if assigned to template it is writable (special handling)
6. todoitemdocindb // indicates storage in database or in file system
TABLE eventlog
1. eventid // Unique ID -- see todoactions
2. userid // the guy who did it
3. eventtime // when it happend
4. eventrefcode // the eventcode -- this is a unique key assigned to each event worthy action in the system
5. eventrefkeys // the keys as a result of the event - a set of comma separated event keys for matching todoactions
TABLE todotemplates
1. templateid // Unique ID
2. templatename // the name of the template
3. templatedesc // a nice description for reference purposes
4. templategroup // see todotemplategroups -- it groups the into system type groups, workflow, deliveryplanning, project planning, whatever we can think of.
5. templateactive // The template is no longer displayed as an option, can be used for background processes though.
TABLE todotemplategroup
1. templategroupid // A system defined ID used inside the system
2. templategroupname // A system assigned group name also in ~.po files i.e. default language description
// SPECIAL HANDLING
1) eventrefkeys are a combination of stuff like name, surname, telephoneno, faxno, etc.
2) event action syncronizer will try and find event in the todoactions and then flag them as complete using the todoactions_eventsearch_idx index to speed up the search
3) some special hadling for document retrieval and storage (db or file system) docs and wikis also refference generation
4) template groups are as heading indicate, and it means that in documents or wiki text thing are specially handled depending on file type so as to allow for things like text replacement, etc.
5) calender handling
6) gantt chart handling
7) planing handling ( shifting of dates )
8) simple todo list handling
9) todo item retrieval so we can get a list depending if we edit or view (security) in whatever mode (calender, gantt, planing, todo & "others depending on the todotemplategroup handling when in edit mode."
Ok, the wiki will simply link to almost anything even the todoitems but security will now prevent opening stuff that is not suppose to be visible.
I wonder if I can incorporate mail into this somehow, and revision control maybe as well, and mime/types in the documents
Danie
Hi Danie, in ((EddieMolina my personal page)) you will find 2 files with all you need to handle email using a smtp server and php. I hope this will help you.
Eddie
Thanks Eddie, Work on this has started today, the project estimate is that it will be finished by the end of April then there is review or reimplementation for compatibility depending on what we need to do. This will help thanks, I will pass it on to the developer.
One Question thought, and I have not looked, is this GPL fieldly.
Danie
Yes, it is a LGPL license.
Eddie
== WORKFLOW, PROJECT PLANNING, LOGISTICS, CRM, ETC ==
I decided to see if there is a way I can do these type of document things (design) in a generic way so as to allow for as much functionality as we can possibly get out of it.
This is the result... So far. I've placed the comments next to the tables mostly it makes it a bit difficult to refference but its easier to just see what each fields purpose is
TABLE todotypes
1. todotypeid // unique ID
2. todotypename // descriptive name
3. todotypecheckactions // will check the eventlog for completed actions and update todoitems.completed field accordingly
4. todotypecheckdependants // will check the tododefs completed state and update todoitems.completed field accordingly
5. todotypedoesbilling // will make use of todoitems.billingitem * timespend.timespend = cost to todoitems.billingitem cost acc AND todoitems.billingitem_price * timespend.timespend = price biled to billcontractref OR maybe it needs to be handled differenctly not to sure could be we need to make it salesorder in stead.
6. todotypehasfromtime // Time to start
7. todotypehastotime // Time to end
8. todotypehassecurity // Security group can be assigned with modification rights if null only the owner can modify
9. todotypecanassigngroup // can be assigned to a member of this group ownership can be transfered if null any user can be assigned see also security
10. todoincalender // will apear in calendar instead of todo list completed changes to 0 or 100/ on or off
11. todotypesharewith // can be viewed by this group if null all groups can view
12. todotypeavailableto // can be vied only by this security roll if null only todotypehassecurity can view
13. todoingant // can be viewed in a gantt chart
14. todocanplan // fromtime and totime will be recalculated and the item and its children will be able to be shifted
15. todocustomerpublic // the customer in the billcontractref can also view this document.
TABLE todogroups
1. todogroupid // Unique ID
2. todogroupname // the name of the group
3. todogroupdesc // a description of the group
4. todogroupactive // deleted or not
TABLE todogroupusers
1. todogroupid // todogroupid -- key
2. userid // user id -- key a user may belong to multiple groups
3. inactivekeepinformed // user has read only access
TABLE todoitems
1. todoid // Unique id
2. userid // The guy who perform the todo -- see ownerid
3. todogroupid // The group who perform the todo -- see ownerid
3. secrole // The security group allowed to access -- todotypes.todotypehassecurity
4. subject // A short text description
5. timefrom // When will this task start -- todotypes.todotypehasfromtime
6. timeto // When will it end -- todotypes.todotypehastotime
7. type // the type indicated the checking system to use -- reference todotypes
8. complete // 0-100 -- indicating state -- see todotypes.todotypecheckactions & todotypes.todotypecheckdependants
9. datarefference // a reference to a file or blob object -- if a templateid is assigned, it is the template document and some parsing will need to be done here if you want to replace content
10. parentid // if this is filled in the parent will set complete by average of children and also use todotypecheckactions & todotypecheckdependants
11. prio // Lising order apart from timefrom used where there is a parent
13. ownerid // the guy who created the todo
14. timespend // how much time was spend on this item for certain types only -- see todotypes.todotypedoesbilling
15. billingitem // a dummy item to use for billing purposes as well as cost -- see todotypes.todotypedoesbilling
16. state // open, close, waiting, inactive, other see todotypes.todotypecheckactions & todotypes.todotypecheckdependants & parentid
17. statenaritive // filed in when state=other -- see todotypes.state
18. contractref // filed with the contractref to bill
19. todotemplateid // if this is[[]][[ set it is not a true item but is really a template to be replicated -- see todotypes & todoactions, for questions that can be asked see also todotemplates
TABLE todoactions
1. actionid // Uniue ID -- see todotypes.todotypecheckactions
2. todoid // The todoitem it belongs to
3. actionname // A descriptive name
4. actionrefcode // This is a special event key definition that can be checked against the eventlog -- see eventlog.eventrefcode
5. actionrefkey // a key to match in the eventlog.eventrefkeys
6. actioncompleted // This tells us whether the action was completed.
TABLE tododeps
1. todoparentid // The parent todo item that does the waiting -- see todotypes.todotypecheckdependants
2. tododepid // The child to do item that performs the action
TABLE documents
1. docref // A unique reference linked from todoitemdocs.todoitemdocref
2. docdata // The data, postgres require some special handling not sure about mysql here
TABLE todoitemdocs
1. todoitemdocsid // A unique key
2. todoitemid // the todoitem we link to, if todoitem has template assigned this is a template document and require some special handling see template group
3. todoitemdocname // The descriptive name of the document if template may be renamed see template group (special handling)
4. todoitemdocref // The local assigned unique name for keeping document names unique even if they share same descriptivename
5. todoitemdocreadonly // Indicates if this is a readonly document if assigned to template it is writable (special handling)
6. todoitemdocindb // indicates storage in database or in file system
TABLE eventlog
1. eventid // Unique ID -- see todoactions
2. userid // the guy who did it
3. eventtime // when it happend
4. eventrefcode // the eventcode -- this is a unique key assigned to each event worthy action in the system
5. eventrefkeys // the keys as a result of the event - a set of comma separated event keys for matching todoactions
TABLE todotemplates
1. templateid // Unique ID
2. templatename // the name of the template
3. templatedesc // a nice description for reference purposes
4. templategroup // see todotemplategroups -- it groups the into system type groups, workflow, deliveryplanning, project planning, whatever we can think of.
5. templateactive // The template is no longer displayed as an option, can be used for background processes though.
TABLE todotemplategroup
1. templategroupid // A system defined ID used inside the system
2. templategroupname // A system assigned group name also in ~.po files i.e. default language description
// SPECIAL HANDLING
1) eventrefkeys are a combination of stuff like name, surname, telephoneno, faxno, etc.
2) event action syncronizer will try and find event in the todoactions and then flag them as complete using the todoactions_eventsearch_idx index to speed up the search
3) some special hadling for document retrieval and storage (db or file system) docs and wikis also refference generation
4) template groups are as heading indicate, and it means that in documents or wiki text thing are specially handled depending on file type so as to allow for things like text replacement, etc.
5) calender handling
6) gantt chart handling
7) planing handling ( shifting of dates )
8) simple todo list handling
9) todo item retrieval so we can get a list depending if we edit or view (security) in whatever mode (calender, gantt, planing, todo & "others depending on the todotemplategroup handling when in edit mode."
Ok, the wiki will simply link to almost anything even the todoitems but security will now prevent opening stuff that is not suppose to be visible.
I wonder if I can incorporate mail into this somehow, and revision control maybe as well, and mime/types in the documents
Danie
Hi Danie, in ((EddieMolina my personal page)) you will find 2 files with all you need to handle email using a smtp server and php. I hope this will help you.
Eddie
Thanks Eddie, Work on this has started today, the project estimate is that it will be finished by the end of April then there is review or reimplementation for compatibility depending on what we need to do. This will help thanks, I will pass it on to the developer.
One Question thought, and I have not looked, is this GPL fieldly.
Danie
Yes, it is a LGPL license.
Eddie