Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-riskmanagement
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-riskmanagement
Commits
a6585322
Commit
a6585322
authored
Jan 16, 2020
by
cosine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Added filters to risk report
parent
d4848a5a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
6 deletions
+41
-6
project-risks-report.tcl
www/project-risks-report.tcl
+41
-6
No files found.
www/project-risks-report.tcl
View file @
a6585322
...
...
@@ -8,12 +8,19 @@
ad_page_contract
{
Lists risks per project, taking into account DynFields.
}
{
{
report_department_id
""
}
{
report_project_id
""
}
{
project_id
""
}
{
report_risk_type_id
""
}
{
report_risk_status_id
""
}
{
level_of_detail:integer 3
}
{
output_format
"html"
}
{
number_locale
""
}
}
# Compatibility
if
{
""
eq
$report
_project_id &&
""
ne
$project
_id
}
{
set report_project_id
$project
_id
}
# ------------------------------------------------------------
# Security
#
...
...
@@ -103,13 +110,26 @@ if {"" != $deref_extra_select} { set deref_extra_select ",\n\t$deref_extra_selec
set
project_sql
""
if
{
""
!=
$
project
_id && 0 !=
$
project
_id
}
{
set project_sql
"and p.project_id = :project_id
\n
"
if
{
""
!=
$
report
_project_id && 0 !=
$report
_
project_id
}
{
set project_sql
"and p.project_id = :
report_
project_id
\n
"
}
else
{
# No specific project set - show all open projects
set project_sql
"and p.project_status_id in (select * from im_sub_categories(
[
im_project_status_open
]
))"
}
if
{
""
ne
$report
_risk_status_id && 0 ne
$report
_risk_status_id
}
{
append project_sql
"
\n\t\t
and r.risk_status_id in (
[
join
[
im_sub_categories
$report
_risk_status_id
]
", "
]
)"
}
if
{
""
ne
$report
_risk_type_id && 0 ne
$report
_risk_type_id
}
{
append project_sql
"
\n\t\t
and r.risk_type_id in (
[
join
[
im_sub_categories
$report
_risk_type_id
]
", "
]
)"
}
if
{
""
ne
$report
_department_id && 0 ne
$report
_department_id
}
{
append project_sql
"and p.project_cost_center_id in (
[
join
[
im_sub_cost_center_ids
$report
_department_id
]
", "
]
)
\n
"
}
set
report_sql
"
select
r.*,
...
...
@@ -148,7 +168,6 @@ set header0 {
"Impact"
"Type"
"Status"
"Description"
}
# Main content line
...
...
@@ -160,7 +179,6 @@ set risk_header_vars {
$risk
_impact_pretty
$risk
_type
$risk
_status
$risk
_description
}
...
...
@@ -193,7 +211,7 @@ db_foreach dynfield_attributes $dynfield_sql {
set
project_header
{
"
\#
colspan=10 <a href=
$this
_url&project_id=
$project
_id&level_of_detail=3
"
\#
colspan=10 <a href=
$this
_url&
report_
project_id=
$project
_id&level_of_detail=3
target=_blank><img src=/intranet/images/plus_9.gif width=9 height=9 border=0></a>
<b><a href=
$project
_url
$project
_id>
$project
_name</a></b>"
}
...
...
@@ -278,10 +296,27 @@ switch $output_format {
[
im_select -translate_p 0 level_of_detail
$levels
$level
_of_detail
]
</td>
</tr>
<tr>
<td>
[
lang::message::lookup
""
intranet-riskmanagement.Project_Department
"Project Department"
]
:</td>
<td>
[
im_cost_center_select -include_empty 1 -include_empty_name
"All"
report_department_id
$report
_department_id
]
</td>
</tr>
<tr>
<td>
[
lang::message::lookup
""
intranet-core.Project Project
]
:</td>
<td>
[
im_project_select -include_empty_p 1 project_id
$project
_id
]
</td>
<td>
[
im_project_select -include_empty_p 1 report_project_id
$report
_project_id
]
</td>
</tr>
<tr>
<td>
[
lang::message::lookup
""
intranet-riskmanagement.Risk_Type
"Risk Type"
]
:</td>
<td>
[
im_category_select -include_empty_p 1
"Intranet Risk Type"
report_risk_type_id
$report
_risk_type_id
]
</td>
</tr>
<tr>
<td>
[
lang::message::lookup
""
intranet-riskmanagement.Risk_Status
"Risk Status"
]
:</td>
<td>
[
im_category_select -include_empty_p 1
"Intranet Risk Status"
report_risk_status_id
$report
_risk_status_id
]
</td>
</tr>
<tr>
<td class=form-label>
[
lang::message::lookup
""
intranet-reporting.Output_Format Format
]
</td>
<td class=form-widget>
...
...
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