Forum OpenACS Development: OpenACS + Voo2do

Request notifications

Posted by Cesareo Garci­a Rodicio on

Voo2do ( is an advanced (and very simple) task manager. It has an API ( to use through other systems. I'm using voo2do since some months ago to control tasks and hours. I also used OACS logger, it's great but with a team, not for only one person.

Also, I use OACS calendar as day-calendar. So I did some glue to put in my day-cal-view my task-list from voodo and a form to add a new task. I did:

-An adp page to include whatever package (I use it in OACS Calendar cal-day-view)
-A TCL page to do programming things (call API and stuff like that)

but, I have some things to solve:
-Control User/Password. Now I have it only for my user. I have to solve how to pass user/passwd for every user
-Control last call to API, now, I have to use Back Key.

I'm trying to solve this, perhaps next month, but I'd like to show this code because it has been very useful to me.


  <div class="cal-month-title-text" style="font-size: 80%">
    Tareas Pendientes

  <div class="cal-day-table">
    <multiple name="lista_tareas">
      <div class="cal-day-row">
    <div class="cal-day-hour">
      <if @lista_tareas.pretty_deadline@ not nil>
        <span class="cal-text-grey-sml"> @lista_tareas.pretty_deadline@</span>
        <span class="cal-text-grey-sml">No date</span>

      @lista_tareas.task@ <span class="cal-text-grey-sml">
        <if @lista_tareas.working_time@ not nil><b> @lista_tareas.working_time@</b> </if>
        / @lista_tareas.total_time@ (<a href="">Fin</a>)</span>


  <div class="cal-month-title-text" style="font-size: 80%">
    Nueva Tarea

  <div class="cal-day-table">
    <formtemplate id="ejemplo_form"></formtemplate>


#Get XML data and if there is an error, put an Error Task in xml variable

set xml [ns_httpget ""]

set doc [dom parse $xml]
set root [$doc documentElement]
set node [$root selectNodes /response/login]
set userID [$node getAttribute userId]
set loginHash [$node getAttribute loginHash]

set xml [ns_httpget "$userID&loginHash=$loginHash"]

if {$xml == ""} {
    set xml "<?xml version=\"1.0\" encoding=\"utf-8\"?>
<response method=\"getIncompleteTasks\">
<task estCurr=\"1.0000\" priority=\"4.0000\" dtcreated=\"2006-09-07 19:05:33.837469\" taskdesc=\"Error en la conexion\" taskId=\"00\" estOrig=\"1.0000\" collabId=\"\" userId=\"33\" deadline=\"\" active=\"1\" elapsed=\"1.0000\" projId=\"4\" projName=\"Formacin\" viewId=\"\" completed=\"\"/>

#Parse XML Data of getIncompleteTask Voo2do Method

set doc [dom parse $xml]
set root [$doc documentElement]
set node [$root selectNodes /response/task]

#Multirow create of data. I trim 0s and . (point) to show clearly data

template::multirow create lista_tareas "id" "task" "priority" "total_time" "working_time" "projName" "deadline" "pretty_deadline"

foreach i $node {

    template::multirow append \
    lista_tareas [$i getAttribute taskId] \
    [$i getAttribute taskdesc] \
    [$i getAttribute priority] \
    [string trimright [$i getAttribute estCurr]  "0."] \
    [string trimright [$i getAttribute elapsed] "0."] \
    [$i getAttribute projName] \
        [lc_time_fmt [$i getAttribute deadline] "%m/%d/%Y"] \
    [lc_time_fmt [$i getAttribute deadline] "%d %b"]

############# Defining form to Add New Task #########################

#Get Project names

set xml [ns_httpget "$userID&loginHash=$loginHash"]
set doc [dom parse $xml]
set root [$doc documentElement]
set node [$root selectNodes /response/project]

#Creating Project Names options
set project_names [list]

foreach project  $node  {
    set pr [$project getAttribute projName]
    lappend project_names [ list $pr $pr ]

#Creating estimation options
set estimations { "0.5" "1" "1.5" "2" "3" "4" }
set estimation_options [list]
foreach p $estimations {
    lappend estimation_options [list  $p $p ]

#Creating priorities options
set priorities { "1" "2" "3" }
set priority_options [list]
foreach p $priorities {
    lappend priority_options [list  $p $p ]

# Define Task Add form
ad_form -name ejemplo_form  -method GET -action "" -form  {

    {userId:text(hidden) {value "$userID"} }
    {loginHash:text(hidden) {value "$loginHash"}  }

        {label "Tarea"}
        {html {size 35} maxlength 255}

        {label "Proyecto"}
        {options $project_names}

        {label "Prioridad"}
        {options $priority_options}
        {label "Estimacion"}
        {options $estimation_options}
    {label "Plazo"}
    {html {id sel1}     }
    {help_text "Format MM/DD/YYYY"}
    {after_html {<input type='reset' value=' ... ' onclick=\"return showCalendar('sel1');\"> }

#regexp {([0-9]+)-([0-9][0-9])-([0-9][0-9])} $deadline match year month day
#set deadline ""
#append deadline $month "/" $day "/" $year

ad_form -extend -name ejemplo_form  -form {

    {label "Crear"}

2: Re: Res: OpenACS + Voo2do (response to 1)
Posted by Cesareo Garci­a Rodicio on
I've added some features:

- highlight dates that passed headlines
- voo2do user control

All this development is on two files: view-voo2do-tasks.adp and view-voo2do-tasks.tcl