Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-trans-project-feedback
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-trans-project-feedback
Commits
17c67bbd
Commit
17c67bbd
authored
Sep 29, 2015
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Plain Diff
This commit was generated by cvs2svn to track changes on a CVS vendor
branch.
parents
2e9bcb7c
56956d46
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
146 additions
and
22 deletions
+146
-22
graph-panel.adp
lib/graph-panel.adp
+0
-1
graph-panel.tcl
lib/graph-panel.tcl
+32
-6
intranet-trans-project-feedback-create.sql
sql/postgresql/intranet-trans-project-feedback-create.sql
+74
-15
intranet-trans-project-feedback-drop.sql
sql/postgresql/intranet-trans-project-feedback-drop.sql
+40
-0
No files found.
lib/graph-panel.adp
View file @
17c67bbd
...
...
@@ -154,7 +154,6 @@ Ext.onReady(function () {
</elseif>
<elseif @chart_type@ eq "line_chart">
chart = new Ext.chart.Chart({
renderTo: @diagram_id@,
width: @diagram_width@,
...
...
lib/graph-panel.tcl
View file @
17c67bbd
...
...
@@ -35,13 +35,35 @@ set package_url "/simple-survey"
set
report_code_found_p 1
if
!
[
info
exists return_url
]
{
set return_url
"/intranet-trans-project-feedback/dashboard"
}
# Set dynamic width
set
num_days
[
db_string get_number_days
"select '
$end
_date'::date - '
$start
_date'::date"
-default 0
]
switch
$period
{
month
{
set data_points_horiz
[
expr
$num
_days / 30
]
}
quarter
{
set data_points_horiz
[
expr
$num
_days / 120
]
}
year
{
set data_points_horiz
[
expr
$num
_days / 365
]
}
default
{
set data_points_horiz 0
}
}
set
data_points_horiz
[
format
"%.2f"
[
expr
{
double
(
round
(
100*$data_points_horiz
))
/100
}]]
# Determine size based on number od datapoints found
if
{
$data
_points_horiz < 7
}
{
set diagram_width 500
}
else
{
set diagram_width 1000
}
# Set Report Code
switch
$title
{
"Non Comformity"
{
set store
"translationProjectFeedbackNonComformityStore"
set chart_type
"column_chart"
set diagram_report_code
"translation_project_feedback_non_comformity"
if
{
!
[
info
exists diagram_width
]
||
""
==
$diagram
_width
}
{
set diagram_width 600
}
if
{
!
[
info
exists diagram_height
]
||
""
==
$diagram
_height
}
{
set diagram_height 350
}
if
{
!
[
info
exists diagram_font
]
||
""
==
$diagram
_font
}
{
set diagram_font
"10px Helvetica, sans-serif"
}
if
{
!
[
info
exists diagram_theme
]
||
""
==
$diagram
_theme
}
{
set diagram_theme
"Custom"
}
...
...
@@ -53,13 +75,17 @@ switch $title {
if
{
!
[
info
exists diagram_title
]
||
""
==
$diagram
_title
}
{
set diagram_title
[
lang::message::lookup
""
intranet-trans-project-feedback.$title
$title
]
}
set diagram_id
"translation_project_feedback_non_comformity"
}
"Non
-
Comformity - Proportions"
{
"Non
Comformity - Proportions"
{
set store
"translationProjectFeedbackNonComformityProportionStore"
set chart_type
"pie_chart"
set diagram_report_code
"translation_project_feedback_non_comformity_proportions"
if
{
!
[
info
exists diagram_limit
]
||
""
==
$diagram
_limit
}
{
set diagram_limit 100
}
if
{
!
[
info
exists diagram_width
]
||
""
==
$diagram
_width
}
{
set diagram_width 800
}
if
{
!
[
info
exists diagram_height
]
||
""
==
$diagram
_height
}
{
set diagram_height 350
}
# if
{
!
[
info
exists diagram_width
]
||
""
==
$diagram
_width
}
{
set diagram_width 350
}
# if
{
!
[
info
exists diagram_height
]
||
""
==
$diagram
_height
}
{
set diagram_height 350
}
set diagram_width 1000
set diagram_height 300
set diagram_id
"translation_project_feedback_non_comformity_proportions"
}
"Conformity vs Non-Comformity"
{
...
...
@@ -68,9 +94,9 @@ switch $title {
set chart_type
"line_chart"
set diagram_report_code
"translation_project_feedback_non_comformity"
if
{
!
[
info
exists diagram_limit
]
||
""
==
$diagram
_limit
}
{
set diagram_limit 100
}
if
{
!
[
info
exists diagram_width
]
||
""
==
$diagram
_width
}
{
set diagram_width 600
}
if
{
!
[
info
exists diagram_height
]
||
""
==
$diagram
_height
}
{
set diagram_height 350
}
set diagram_id
"translation_project_feedback_comformity_vs_non_comformity"
}
default
{
set report_code_found_p 0
...
...
sql/postgresql/intranet-trans-project-feedback-create.sql
View file @
17c67bbd
...
...
@@ -14,8 +14,10 @@
--
-- @author klaus.hofeditz@project-open.com
-- Create table for inquiries
-- --------------------------------------------------------------------------------------------------------------------------
-- Create Survey & Questions
-- --------------------------------------------------------------------------------------------------------------------------
CREATE
OR
REPLACE
FUNCTION
inline_0
()
RETURNS
INTEGER
AS
$
BODY
$
...
...
@@ -52,8 +54,8 @@ end;$BODY$ LANGUAGE 'plpgsql';
SELECT
inline_0
();
DROP
FUNCTION
inline_0
();
CREATE
OR
REPLACE
FUNCTION
inline_
0
()
-- Create Questions
CREATE
OR
REPLACE
FUNCTION
inline_
1
()
RETURNS
INTEGER
AS
$
BODY
$
declare
...
...
@@ -63,6 +65,17 @@ declare
v_question_id
integer
;
begin
select
count
(
*
)
into
v_count
from
survsimp_question_choices
where
label
=
'CC - Client Complaint'
OR
label
=
'NC - Issue but no client complaint'
OR
label
=
'YAY - No issue'
;
IF
3
=
v_count
THEN
return
0
;
END
IF
;
select
survey_id
into
v_survey_id
from
survsimp_surveys
where
name
=
'Project Translation Feedback'
;
select
acs_object__new
(
null
,
'survsimp_question'
)
into
v_question_id
;
...
...
@@ -80,7 +93,6 @@ begin
'below'
--new__presentation_alignment
);
select
survsimp_choice_id_sequence
.
nextval
into
v_next_choice_id
from
dual
;
insert
into
survsimp_question_choices
(
choice_id
,
question_id
,
label
,
sort_order
)
values
(
v_next_choice_id
,
v_question_id
,
'CC - Client Complaint'
,
1
);
...
...
@@ -93,8 +105,8 @@ begin
return
0
;
end
;
$
BODY
$
LANGUAGE
'plpgsql'
;
SELECT
inline_
0
();
DROP
FUNCTION
inline_
0
();
SELECT
inline_
1
();
DROP
FUNCTION
inline_
1
();
CREATE
OR
REPLACE
FUNCTION
inline_0
()
...
...
@@ -107,6 +119,18 @@ declare
v_question_id
integer
;
begin
select
count
(
*
)
into
v_count
from
survsimp_question_choices
where
label
=
'TC - Issue with translator delivery resulting in late client delivery'
OR
label
=
'LIH - Late Inhouse. Late delivery due to inhouse issues'
OR
label
=
'IHP - Inhouse proofreading issues (typos, numbers, etc.)'
OR
label
=
'TTI - Translator Terminology inaccurate, text does not read well in target Language'
;
IF
4
=
v_count
THEN
return
0
;
END
IF
;
select
survey_id
into
v_survey_id
from
survsimp_surveys
where
name
=
'Project Translation Feedback'
;
select
acs_object__new
(
null
,
'survsimp_question'
)
into
v_question_id
;
...
...
@@ -124,7 +148,6 @@ begin
'below'
--new__presentation_alignment
);
select
survsimp_choice_id_sequence
.
nextval
into
v_next_choice_id
from
dual
;
insert
into
survsimp_question_choices
(
choice_id
,
question_id
,
label
,
sort_order
)
values
(
v_next_choice_id
,
v_question_id
,
'TC - Issue with translator delivery resulting in late client delivery'
,
1
);
...
...
@@ -154,6 +177,15 @@ declare
v_question_id
integer
;
begin
select
count
(
*
)
into
v_count
from
survsimp_questions
where
question_text
=
'Corrective Action'
;
IF
1
=
v_count
THEN
return
0
;
END
IF
;
select
survey_id
into
v_survey_id
from
survsimp_surveys
where
name
=
'Project Translation Feedback'
;
select
acs_object__new
(
null
,
'survsimp_question'
)
into
v_question_id
;
...
...
@@ -186,6 +218,16 @@ declare
v_question_id
integer
;
begin
select
count
(
*
)
into
v_count
from
survsimp_questions
where
question_text
=
'Preventive Action'
;
IF
1
=
v_count
THEN
return
0
;
END
IF
;
select
survey_id
into
v_survey_id
from
survsimp_surveys
where
name
=
'Project Translation Feedback'
;
select
acs_object__new
(
null
,
'survsimp_question'
)
into
v_question_id
;
...
...
@@ -278,11 +320,11 @@ begin
null
,
-- context_id
'Non-Comformity'
,
-- plugin_name
'intranet-trans-project-feedback'
,
-- package_name
'
left
'
,
-- location
'
bottom
'
,
-- location
'/intranet-trans-project-feedback/dashboard'
,
-- page_url
null
,
-- view_name
200
,
-- sort_order
'im_project_translation_graph_panel "Non Comformity"
"Column"
$start_date $end_date $period'
,
'im_project_translation_graph_panel "Non Comformity" $start_date $end_date $period'
,
'lang::message::lookup "" intranet-trans-project-feedback.NonComformity "Non-Comformity"'
into
v_plugin_id
);
...
...
@@ -317,12 +359,12 @@ begin
null
,
-- context_id
'Non-Comformity - Proportions'
,
-- plugin_name
'intranet-trans-project-feedback'
,
-- package_name
'
left
'
,
-- location
'
bottom
'
,
-- location
'/intranet-trans-project-feedback/dashboard'
,
-- page_url
null
,
-- view_name
200
,
-- sort_order
'im_project_translation_graph_panel "Non Comformity - Proportions" $start_date $end_date $period'
,
'lang::message::lookup "" intranet-trans-project-feedback.NonComformityP
ercentage "Non-Comformity - Percentage
"'
'lang::message::lookup "" intranet-trans-project-feedback.NonComformityP
roportions "Non-Comformity - Proportions
"'
into
v_plugin_id
);
PERFORM
im_grant_permission
(
v_plugin_id
,
v_employees
,
'read'
);
...
...
@@ -357,7 +399,7 @@ begin
null
,
-- context_id
'Non-Comformity - Percentage'
,
-- plugin_name
'intranet-trans-project-feedback'
,
-- package_name
'
left
'
,
-- location
'
bottom
'
,
-- location
'/intranet-trans-project-feedback/dashboard'
,
-- page_url
null
,
-- view_name
200
,
-- sort_order
...
...
@@ -396,12 +438,12 @@ begin
null
,
-- context_id
'Comformity vs. Non-Comformity'
,
-- plugin_name
'intranet-trans-project-feedback'
,
-- package_name
'
left
'
,
-- location
'
bottom
'
,
-- location
'/intranet-trans-project-feedback/dashboard'
,
-- page_url
null
,
-- view_name
200
,
-- sort_order
'im_project_translation_graph_panel "Conformity vs Non-Comformity" $start_date $end_date $period'
,
'lang::message::lookup "" intranet-trans-project-feedback.
NonComformityType "Non-Comformity - Type
"'
'lang::message::lookup "" intranet-trans-project-feedback.
ConformityVSNonComformity "Conformity vs Non-Comformity
"'
into
v_plugin_id
);
PERFORM
im_grant_permission
(
v_plugin_id
,
v_employees
,
'read'
);
...
...
@@ -472,6 +514,11 @@ BEGIN
where
start_date::date = im_day_enumerator::date
and parent_id is null
and project_id in (
select distinct sr.related_object_id
from survsimp_responses sr, survsimp_surveys ss
where ss.name =
''
Project Translation Feedback
''
and ss.survey_id = sr.survey_id
)
) as number_projects,
(select count(*) from (
select distinct on (related_object_id)
...
...
@@ -492,6 +539,11 @@ BEGIN
and q.question_id = qr.question_id
and qr.choice_id is not null
and p.start_date::date = im_day_enumerator::date
and p.project_id in (
select distinct sr.related_object_id
from survsimp_responses sr, survsimp_surveys ss
where ss.name =
''
Project Translation Feedback
''
and ss.survey_id = sr.survey_id
)
group by
r.related_object_id
) p) as number_projects_non_conform
...
...
@@ -500,6 +552,8 @@ BEGIN
) s
) t
group by
t._%period%
order by
t._%period%;
'
where
...
...
@@ -569,6 +623,11 @@ BEGIN
and qr.choice_id is not null
and p.start_date::date between
''
%start_date%
''
::date and
''
%end_date%
''
::date
and p.parent_id is null
and project_id in (
select distinct sr.related_object_id
from survsimp_responses sr, survsimp_surveys ss
where ss.name =
''
Project Translation Feedback
''
and ss.survey_id = sr.survey_id
)
group by
choice_id;
...
...
sql/postgresql/intranet-trans-project-feedback-drop.sql
View file @
17c67bbd
...
...
@@ -60,3 +60,43 @@ DROP FUNCTION inline_0 ();
-- Delete REST reports
delete
from
im_reports
where
report_code
=
'translation-project-feedback-non-comformity'
;
delete
from
im_reports
where
report_code
=
'translation_project_feedback_non_comformity_proportions'
;
-- delete component
CREATE
OR
REPLACE
FUNCTION
inline_0
()
RETURNS
INTEGER
AS
$
BODY
$
declare
v_plugin_id
integer
;
v_employees
integer
;
foo
integer
;
begin
select
group_id
into
v_employees
from
groups
where
group_name
=
'Employees'
;
select
plugin_id
into
v_plugin_id
from
im_component_plugins
where
plugin_name
=
'Project Translation Feedback'
limit
1
;
select
im_revoke_permission
(
v_plugin_id
,
v_employees
,
'read'
)
into
foo
;
select
im_component_plugin__delete
(
v_plugin_id
)
into
foo
;
select
plugin_id
into
v_plugin_id
from
im_component_plugins
where
plugin_name
=
'Non-Comformity'
limit
1
;
select
im_revoke_permission
(
v_plugin_id
,
v_employees
,
'read'
)
into
foo
;
select
im_component_plugin__delete
(
v_plugin_id
)
into
foo
;
select
plugin_id
into
v_plugin_id
from
im_component_plugins
where
plugin_name
=
'Non-Comformity - Proportions'
limit
1
;
select
im_revoke_permission
(
v_plugin_id
,
v_employees
,
'read'
)
into
foo
;
select
im_component_plugin__delete
(
v_plugin_id
)
into
foo
;
select
plugin_id
into
v_plugin_id
from
im_component_plugins
where
plugin_name
=
'Non-Comformity - Percentage'
limit
1
;
select
im_revoke_permission
(
v_plugin_id
,
v_employees
,
'read'
)
into
foo
;
select
im_component_plugin__delete
(
v_plugin_id
)
into
foo
;
select
plugin_id
into
v_plugin_id
from
im_component_plugins
where
plugin_name
=
'Comformity vs. Non-Comformity'
limit
1
;
select
im_revoke_permission
(
v_plugin_id
,
v_employees
,
'read'
)
into
foo
;
select
im_component_plugin__delete
(
v_plugin_id
)
into
foo
;
return
0
;
end
;
$
BODY
$
LANGUAGE
'plpgsql'
;
SELECT
inline_0
();
DROP
FUNCTION
inline_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