workflow::case::get_id (public)

 workflow::case::get_id -object_id object_id \
    -workflow_short_name workflow_short_name

Defined in packages/workflow/tcl/case-procs.tcl

Gets the case_id from the object_id which the case is about, along with the short_name of the workflow.

Switches:
-object_id (required)
The object_id which the case is about
-workflow_short_name (required)
The short_name of the workflow.
Returns:
The case_id of the case. Returns the empty string if no case could be found.
Author:
Lars Pind <lars@collaboraid.biz>

Partial Call Graph (max 5 caller/called nodes):
%3 bug_tracker::bug::edit bug_tracker::bug::edit (public) workflow::case::get_id workflow::case::get_id bug_tracker::bug::edit->workflow::case::get_id bug_tracker::bug::get bug_tracker::bug::get (public) bug_tracker::bug::get->workflow::case::get_id bug_tracker::scheduled::close_bugs bug_tracker::scheduled::close_bugs (public) bug_tracker::scheduled::close_bugs->workflow::case::get_id bug_tracker::search::bug::datasource bug_tracker::search::bug::datasource (private) bug_tracker::search::bug::datasource->workflow::case::get_id packages/acs-tcl/lib/page-error.tcl packages/acs-tcl/ lib/page-error.tcl packages/acs-tcl/lib/page-error.tcl->workflow::case::get_id db_0or1row db_0or1row (public) workflow::case::get_id->db_0or1row

Testcases:
No testcase defined.
Source code:
    set found_p [db_0or1row select_case_id {}]
    if { $found_p } {
        return $case_id
    } else {
        error "No matching workflow case found for object_id $object_id and workflow_short_name $workflow_short_name"
    }
Generic XQL file:
<fullquery name="workflow::case::get_id.select_case_id">
    <querytext>
      select case_id
      from   workflow_cases c, 
             workflows w
      where  c.object_id = :object_id
      and    w.workflow_id = c.workflow_id
      and    w.short_name = :workflow_short_name
    </querytext>
</fullquery>
packages/workflow/tcl/case-procs.xql

PostgreSQL XQL file:
packages/workflow/tcl/case-procs-postgresql.xql

Oracle XQL file:
packages/workflow/tcl/case-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: