Forum OpenACS Q&A: Re: Project manager 1.05 released

Collapse
Posted by Jade Rubick on
Hi Richard,

You need to put the following at the end of this file:

/packages/categories/tcl/category-trees-procs.tcl

----------------------

ad_proc -public get_mapped_trees_from_object_list { object_id_list } {
    Get the category trees mapped to a list of objects.

    @param object_id_list list of object to get the mapped category trees.
    @return tcl list of lists: tree_id tree_name subtree_category_id
                assign_single_p require_category_p
    @author Jade Rubick (mailto:jader@bread.com)
} {
    set result [list]

    db_foreach get_mapped_trees_from_object_list "" {
        lappend result [list $tree_id [get_name $tree_id] $subtree_category_id $assign_single_p $require_category_p]
    }

    return $result
}

---------------------------

and in /packages/categories/tcl/category-trees-procs.xql, below this section:

<fullquery name="category_tree::get_mapped_trees.get_mapped_trees">
      <querytext>

            select tree_id, subtree_category_id, assign_single_p,
                  require_category_p
            from category_tree_map
            where object_id = :object_id

      </querytext>
</fullquery>

----------------------
add this:
----------------------

<fullquery name="category_tree::get_mapped_trees_from_object_list.get_mapped_trees_from_object_list">
      <querytext>

            select tree_id, subtree_category_id, assign_single_p,
                  require_category_p
            from category_tree_map
            where object_id in ([join $object_id_list ", "])

      </querytext>
</fullquery>

---------------------

Hope that helps, and thank you for posting bug reports, and for providing all this feedback. Unfortunately, project-manager is a very complex piece of software, and I try to have it work perfectly, but it just doesn't cooperate!