Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-workflow
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
intranet-workflow
Commits
071bc1ce
Commit
071bc1ce
authored
Sep 04, 2019
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Added filter_wf_action in order to allow filtering for individual approval actions
parent
711b07ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
5 deletions
+35
-5
intranet-workflow-procs.tcl
tcl/intranet-workflow-procs.tcl
+34
-4
index.tcl
www/index.tcl
+1
-1
No files found.
tcl/intranet-workflow-procs.tcl
View file @
071bc1ce
...
...
@@ -1059,6 +1059,7 @@ ad_proc -public im_workflow_home_inbox_component {
{
-filter_subtype_id
""
}
{
-filter_status_id
""
}
{
-filter_owner_id
""
}
{
-filter_wf_action
""
}
}
{
Returns a HTML table with the list of workflow tasks for the
current user.
...
...
@@ -1090,6 +1091,8 @@ ad_proc -public im_workflow_home_inbox_component {
set bgcolor
(
0
)
" class=roweven "
set bgcolor
(
1
)
" class=rowodd "
#ad_return_complaint 1 $filter_wf_action
set sql_date_format
"YYYY-MM-DD"
set current_user_id
[
ad_conn user_id
]
set return_url
[
im_url_with_query
]
...
...
@@ -1213,6 +1216,8 @@ ad_proc -public im_workflow_home_inbox_component {
acs_object__name(o.object_id) as object_name,
im_biz_object__get_type_id(o.object_id) as type_id,
im_biz_object__get_status_id(o.object_id) as status_id,
ca.workflow_key,
wft.pretty_name as workflow_name,
tr.transition_name,
tr.transition_key,
t.holding_user,
...
...
@@ -1223,7 +1228,8 @@ ad_proc -public im_workflow_home_inbox_component {
acs_objects o,
wf_cases ca,
wf_transitions tr,
wf_tasks t
wf_tasks t,
acs_object_types wft
where
ot.object_type = o.object_type
and o.object_id = ca.object_id
...
...
@@ -1231,6 +1237,7 @@ ad_proc -public im_workflow_home_inbox_component {
and t.state in ('enabled', 'started')
and t.transition_key = tr.transition_key
and t.workflow_key = tr.workflow_key
and ca.workflow_key = wft.object_type
and (:filter_workflow_key is null OR ca.workflow_key = :filter_workflow_key)
and (:filter_object_type is null OR o.object_type = :filter_object_type)
) t
...
...
@@ -1273,6 +1280,10 @@ ad_proc -public im_workflow_home_inbox_component {
set table_body_html
""
db_foreach tasks
$tasks
_sql
{
# Only show entries matching the wf_action
set wf_action
"
$workflow
_key.
$transition
_key"
if
{
""
ne
$filter
_wf_action &&
$filter
_wf_action ne
$wf
_action
}
{
continue
}
set assigned_users
""
set assignees_pretty
[
im_workflow_replace_translations_in_string
$assignees
_pretty
]
set assignee_pretty
$assignees
_pretty
...
...
@@ -1365,6 +1376,11 @@ ad_proc -public im_workflow_home_inbox_component {
if
{
!$enable_bulk_action_p
}
{
set table_action_html
""
}
# ---------------------------------------------------------------
# Filters
# ---------------------------------------------------------------
# Options for the type of the workflow
set wf_options_sql
"
select distinct
ot.pretty_name,
...
...
@@ -1377,9 +1393,9 @@ ad_proc -public im_workflow_home_inbox_component {
"
set workflow_options
[
db_list_of_lists wf
$wf
_options_sql
]
set workflow_options
[
linsert
$workflow
_options 0
[
list
""
""
]]
# ad_return_complaint 1 $workflow_options
set workflow_select
[
im_select -translate_p 0 -ad_form_option_list_style_p 1 filter_workflow_key
$workflow
_options
$filter
_workflow_key
]
# Options for the type of object
set object_type_sql
{
select distinct
ot.pretty_name,
...
...
@@ -1394,17 +1410,30 @@ ad_proc -public im_workflow_home_inbox_component {
}
set object_type_options
[
db_list_of_lists otypes
$object
_type_sql
]
set object_type_options
[
linsert
$object
_type_options 0
[
list
""
""
]]
# ad_return_complaint 1
$object
_type_options
set object_type_select
[
im_select -translate_p 0 -ad_form_option_list_style_p 1 filter_object_type
$object
_type_options
$filter
_object_type
]
# Options for the task type
set wf_action_sql
"
select distinct
workflow_name || ' - ' || transition_name as value,
workflow_key || '.' || t.transition_key as key
from (
$tasks
_sql) t
order by workflow_key || '.' || t.transition_key, workflow_name || ' - ' || transition_name
"
# ad_return_complaint 1 [im_ad_hoc_query -format html $wf_action_sql
]
set wf_action_options
[
db_list_of_lists wfa
$wf
_action_sql
]
set wf_action_options
[
linsert
$wf
_action_options 0
[
list
""
""
]]
set wf_action_select
[
im_select -translate_p 0 -ad_form_option_list_style_p 1 filter_wf_action
$wf
_action_options
$filter
_wf_action
]
# Format the filters
set return_url
[
im_url_with_query
]
set filter_passthrough_vars
[
list
]
set form_vars
[
ns_conn form
]
if
{
""
==
$form
_vars
}
{
set form_vars
[
ns_set create
]
}
array set form_hash
[
ns_set array
$form
_vars
]
foreach var
[
array
names form_hash
]
{
if
{
$var
in
{
"filter_object_type"
"filter_workflow_key"
}}
continue
if
{
$var
in
{
"filter_object_type"
"filter_workflow_key"
"filter_wf_action"
}}
continue
lappend filter_passthrough_vars
[
list
$var
$form
_hash
(
$var
)]
}
...
...
@@ -1416,6 +1445,7 @@ ad_proc -public im_workflow_home_inbox_component {
<td><b>
[
_ intranet-core.Filter
]
</b>: </td>
<td>
[
_ acs-workflow.Object_Type
]
: </td><td>
$object
_type_select</td><td> </td>
<td>
[
_ intranet-workflow.Workflow
]
: </td><td>
$workflow
_select</td><td> </td>
<td>
[
_ intranet-helpdesk.Action
]
: </td><td>
$wf
_action_select</td><td> </td>
<td><input type=submit value=
[
_ intranet-core.Filter
]
></td>
</tr>
</table>
...
...
www/index.tcl
View file @
071bc1ce
...
...
@@ -10,7 +10,7 @@ ad_page_contract {
set
user_id
[
auth::require_login
]
set
page_title
[
lang::message::lookup
""
intranet-workflow.Workflow_Home
"Workflow Home"
]
set
workflow_home_inbox
[
im_workflow_home_inbox_component -relationship
"assignment_group"
-filter_object_type
[
im_opt_val filter_object_type
]
-filter_workflow_key
[
im_opt_val filter_workflow_key
]
-filter_subtype_id
[
im_opt_val filter_subtype_id
]
-filter_status_id
[
im_opt_val filter_status_id
]
-filter_owner_id
[
im_opt_val filter_owner_id
]]
set
workflow_home_inbox
[
im_workflow_home_inbox_component -relationship
"assignment_group"
-filter_object_type
[
im_opt_val filter_object_type
]
-filter_workflow_key
[
im_opt_val filter_workflow_key
]
-filter_subtype_id
[
im_opt_val filter_subtype_id
]
-filter_status_id
[
im_opt_val filter_status_id
]
-filter_owner_id
[
im_opt_val filter_owner_id
]
-filter_wf_action
[
im_opt_val filter_wf_action
]
]
set
workflow_home_component
[
im_workflow_home_component
]
set
return_url
[
im_url_with_query
]
set
left_menu_p
[
parameter::get_from_package_key -package_key
"intranet-core"
-parameter ShowLeftFunctionalMenupP -default 0
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment