workflow::case::get_available_enabled_action_ids (public)

 workflow::case::get_available_enabled_action_ids -case_id case_id \
    [ -user_id user_id ]

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

Get the enabled_action_id's of the actions available to the given user.

Switches:
-case_id
(required)
The ID of the case.
-user_id
(optional)
Returns:
A list of ID's of the available actions.
Author:
Lars Pind <lars@collaboraid.biz>

Partial Call Graph (max 5 caller/called nodes):
%3 bug_tracker::scheduled::close_bugs bug_tracker::scheduled::close_bugs (public) workflow::case::get_available_enabled_action_ids workflow::case::get_available_enabled_action_ids bug_tracker::scheduled::close_bugs->workflow::case::get_available_enabled_action_ids packages/acs-tcl/lib/page-error.tcl packages/acs-tcl/ lib/page-error.tcl packages/acs-tcl/lib/page-error.tcl->workflow::case::get_available_enabled_action_ids packages/bug-tracker/www/bug.tcl packages/bug-tracker/ www/bug.tcl packages/bug-tracker/www/bug.tcl->workflow::case::get_available_enabled_action_ids packages/bug-tracker/www/related-file-add.tcl packages/bug-tracker/ www/related-file-add.tcl packages/bug-tracker/www/related-file-add.tcl->workflow::case::get_available_enabled_action_ids packages/bug-tracker/www/related-file-delete.tcl packages/bug-tracker/ www/related-file-delete.tcl packages/bug-tracker/www/related-file-delete.tcl->workflow::case::get_available_enabled_action_ids ad_conn ad_conn (public) workflow::case::get_available_enabled_action_ids->ad_conn workflow::case::action::permission_p workflow::case::action::permission_p (public) workflow::case::get_available_enabled_action_ids->workflow::case::action::permission_p workflow::case::get_enabled_action_ids workflow::case::get_enabled_action_ids (public) workflow::case::get_available_enabled_action_ids->workflow::case::get_enabled_action_ids

Testcases:
No testcase defined.
Source code:
    if { (![info exists user_id] || $user_id eq "") } {
        set user_id [ad_conn user_id]
    }

    set action_list [list]

    foreach enabled_action_id [get_enabled_action_ids -case_id $case_id] {
        if { [workflow::case::action::permission_p -enabled_action_id $enabled_action_id -user_id $user_id] } {
            lappend action_list $enabled_action_id
        }
    }

    return $action_list
Generic XQL file:
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: