diff --git a/src-modules/module/qa/conf/includes.txt b/src-modules/module/qa/conf/includes.txt index 5057796..2bba247 100644 --- a/src-modules/module/qa/conf/includes.txt +++ b/src-modules/module/qa/conf/includes.txt @@ -3,4 +3,5 @@ WEB-INF/conf/edustore/db/bin/SQL_ENV_qa.sam WEB-INF/conf/edustore/db/bin/qa_mask_execution.x WEB-INF/conf/edustore/db/bin/qa_tc_execution_mail.x WEB-INF/lib/superx-qa.jar +WEB-INF/reports/tabelle_37020_mit_summary.jrxml xml/tabelle_html_qa.xsl diff --git a/src-modules/module/qa/conf/qa.xml b/src-modules/module/qa/conf/qa.xml index 89109b2..69a80d1 100644 --- a/src-modules/module/qa/conf/qa.xml +++ b/src-modules/module/qa/conf/qa.xml @@ -998,6 +998,7 @@ format="%s"> + @@ -1009,6 +1010,7 @@ format="%s"> + diff --git a/src-modules/module/qa/datentabellen/qa_mask_execution_assert_result_code_setzen.sql b/src-modules/module/qa/datentabellen/qa_mask_execution_assert_result_code_setzen.sql index 97b910c..561314c 100644 --- a/src-modules/module/qa/datentabellen/qa_mask_execution_assert_result_code_setzen.sql +++ b/src-modules/module/qa/datentabellen/qa_mask_execution_assert_result_code_setzen.sql @@ -3,7 +3,7 @@ --Freemarker Template <#include "SQL_lingua_franca"/> <#include "SuperX_general"/> ---Achtung: Diese Script ist auch das select_stmt der Maske 37020 +--Achtung: Diese Script qa_mask_execution_assert_result_code_setzen.sql ist auch das select_stmt der Maske 37020 <#assign resultValueNative="result_value::float" /> <#if SQLdialect='Postgres'> @@ -45,6 +45,8 @@ A.assert_result_value_min as result_value_min, A.assert_result_value_max as result_value_max, null::varchar(255) as assert_caption, null::varchar(255) as assert_value_range, +null::varchar(255) as projekt_uniquename, +null::varchar(255) as projekt_str, null::varchar(255)[] as fields, null::varchar(255) as nextedit, null::varchar(255) as nextmask, @@ -88,6 +90,8 @@ A.assert_result_value_max as result_value_max, null::varchar(255) as assert_caption, null::varchar(255) as assert_value_range, null::varchar(255)[] as fields, +null::varchar(255) as projekt_uniquename, +null::varchar(255) as projekt_str, ('' || E.maskeninfo_id || '&')::text as nextmask, ('../edit/qa/qa_mask_execution_edit.jsp|tid=' || E.tid)::varchar(255) as nextedit, ('37040&Ergebnis=' || R.tid)::varchar(255) as nexttable @@ -101,8 +105,8 @@ target="tmp_testcase"> /* and E.maskeninfo_id=<> */ /* and E.userinfo_id=<> */ /* and E.systeminfo_id=<> */ - /* and E.name ilike '%<>%' */ - /* and E.uniquename ilike '%<>%' */ + /* and position(<> in E.name)>0 */ + /* and E.uniquename = <> */ /* and date(R.execution_start) >= date_val(<>) */ /* and E.tid in (select P.mask_execution_id from qa_mask_execution2project P where P.project_id=<>) */ /* and 1=<> */ @@ -155,7 +159,9 @@ round(extract(second from (execution_end-execution_start))::decimal,0)::decimal execution_end-execution_start ; -update tmp_testcase set ticket_link=P.issue_link || TP.issue_id +update tmp_testcase set ticket_link=P.issue_link || TP.issue_id, +projekt_str=P.name, +projekt_uniquename=P.uniquename from qa_mask_execution2project TP, qa_project P where TP.mask_execution_id=tmp_testcase.mask_execution_id and P.tid=TP.project_id @@ -179,6 +185,8 @@ A.def_col_caption, A.def_col_name, A.def_col_value, ''::varchar(255) as ticket_link, +null::varchar(255) as projekt_uniquename, +null::varchar(255) as projekt_str, ('../edit/qa/qa_dbtest_edit.jsp|tid=' || T.tid)::varchar(255) as nextedit " source="qa_dbtest T, qa_dbtest_assertion A inner join qa_dbtest_result R @@ -192,13 +200,16 @@ target="tmp_qa_dbtest"> /* and T.tid in (select P.dbtest_id from qa_dbtest2project P where P.project_id=<>) */ /* and E.userinfo_id=<> */ /* and T.systeminfo_id=<> */ - /* and T.name ilike '%<>%' */ + /* and position(<> in T.name)>0 */ + /* and T.uniquename = <> */ /* and T.tid=<> */ /* and 2=<> */ <@informixnolog/>; -update tmp_qa_dbtest set ticket_link=P.issue_link || TP.issue_id +update tmp_qa_dbtest set ticket_link=P.issue_link || TP.issue_id, +projekt_str=P.name, +projekt_uniquename=P.uniquename from qa_dbtest2project TP, qa_project P where TP.dbtest_id=tmp_qa_dbtest.tid and P.tid=TP.project_id @@ -294,7 +305,11 @@ where fields is not null; +--update tmp_testcase set result_value=null where trim(result_value)=''; + + select systeminfo_id_str, +coalesce(projekt_str,'Unbekannt') as projekt_str, execution_name, uniquename, maskeninfo_id_str, @@ -311,6 +326,6 @@ nexttable ,nextedit from tmp_testcase -order by 1,2,3,4,5,6,7; +order by 1,2,3,4,5,6,7,8; diff --git a/src-modules/module/qa/masken/37020_maskeninfo.unl b/src-modules/module/qa/masken/37020_maskeninfo.unl index 165788f..809a23c 100644 --- a/src-modules/module/qa/masken/37020_maskeninfo.unl +++ b/src-modules/module/qa/masken/37020_maskeninfo.unl @@ -3,7 +3,7 @@ --Freemarker Template\ <#include "SQL_lingua_franca"/>\ <#include "SuperX_general"/>\ ---Achtung: Diese Script ist auch das select_stmt der Maske 37020\ +--Achtung: Diese Script qa_mask_execution_assert_result_code_setzen.sql ist auch das select_stmt der Maske 37020\ \ <#assign resultValueNative="result_value::float" />\ <#if SQLdialect='Postgres'>\ @@ -45,6 +45,8 @@ A.assert_result_value_min as result_value_min,\ A.assert_result_value_max as result_value_max,\ null::varchar(255) as assert_caption,\ null::varchar(255) as assert_value_range,\ +null::varchar(255) as projekt_uniquename,\ +null::varchar(255) as projekt_str,\ null::varchar(255)[] as fields,\ null::varchar(255) as nextedit,\ null::varchar(255) as nextmask,\ @@ -88,6 +90,8 @@ A.assert_result_value_max as result_value_max,\ null::varchar(255) as assert_caption,\ null::varchar(255) as assert_value_range,\ null::varchar(255)[] as fields, \ +null::varchar(255) as projekt_uniquename,\ +null::varchar(255) as projekt_str,\ ('' || E.maskeninfo_id || '&')::text as nextmask,\ ('../edit/qa/qa_mask_execution_edit.jsp|tid=' || E.tid)::varchar(255) as nextedit,\ ('37040&Ergebnis=' || R.tid)::varchar(255) as nexttable\ @@ -155,7 +159,9 @@ round(extract(second from (execution_end-execution_start))::decimal,0)::decimal\ execution_end-execution_start\ \ ;\ -update tmp_testcase set ticket_link=P.issue_link || TP.issue_id\ +update tmp_testcase set ticket_link=P.issue_link || TP.issue_id,\ +projekt_str=P.name,\ +projekt_uniquename=P.uniquename\ from qa_mask_execution2project TP, qa_project P\ where TP.mask_execution_id=tmp_testcase.mask_execution_id\ and P.tid=TP.project_id\ @@ -179,6 +185,8 @@ A.def_col_caption,\ A.def_col_name,\ A.def_col_value,\ ''::varchar(255) as ticket_link,\ +null::varchar(255) as projekt_uniquename,\ +null::varchar(255) as projekt_str,\ ('../edit/qa/qa_dbtest_edit.jsp|tid=' || T.tid)::varchar(255) as nextedit\ "\ source="qa_dbtest T, qa_dbtest_assertion A inner join qa_dbtest_result R \ @@ -199,7 +207,9 @@ target="tmp_qa_dbtest">\ \ <@informixnolog/>;\ \ -update tmp_qa_dbtest set ticket_link=P.issue_link || TP.issue_id\ +update tmp_qa_dbtest set ticket_link=P.issue_link || TP.issue_id,\ +projekt_str=P.name,\ +projekt_uniquename=P.uniquename\ from qa_dbtest2project TP, qa_project P\ where TP.dbtest_id=tmp_qa_dbtest.tid\ and P.tid=TP.project_id\ @@ -222,6 +232,7 @@ update tmp_qa_dbtest set \ \ insert into tmp_testcase(testcase_type,\ systeminfo_id,\ +projekt_str,\ execution_name,\ uniquename,\ --maskeninfo_id_str,\ @@ -239,6 +250,7 @@ nextedit\ )\ select 2::integer as testcase_type, --DB-Test\ systeminfo_id,\ +projekt_str,\ name,\ uniquename,\ case when ticket_link !='' then 'Ticket|' || ticket_link else '' end as ticket_link,\ @@ -295,7 +307,11 @@ where fields is not null;\ \ \ \ +--update tmp_testcase set result_value=null where trim(result_value)='';\ +\ +\ select systeminfo_id_str,\ +coalesce(projekt_str,'Unbekannt') as projekt_str,\ execution_name,\ uniquename,\ maskeninfo_id_str,\ @@ -312,7 +328,7 @@ nexttable\ ,nextedit\ \ from tmp_testcase\ -order by 1,2,3,4,5,6,7;\ +order by 1,2,3,4,5,6,7,8;\ \ ^--freemarker template\ XIL List\ @@ -322,6 +338,9 @@ XIL List\ Column CID=0 heading_text="Komponente" center_heading\ row_selectable col_selectable heading_platform readonly\ width=12 text_size=100\ +Column CID=0 heading_text="Projekt" center_heading\ + row_selectable col_selectable heading_platform readonly\ + width=12 text_size=100\ Column CID=1 heading_text="Testfall" center_heading\ row_selectable col_selectable heading_platform readonly\ width=20 text_size=200\ @@ -363,4 +382,4 @@ Column CID=1 heading_text="Bearbeiten" center_heading\ row_selectable col_selectable heading_platform readonly\ width=5 text_size=200\ \ -@@@^^^Protokoll der Testfall-Ausführung ausgeben^drop table tmp_testcase;^^1^440^360^0^1^^ +@@@^^^Protokoll der Masken-Ausführung ausgeben^drop table tmp_testcase;^^1^440^360^0^1^^ diff --git a/src-modules/module/qa/schluesseltabellen/sx_stylesheets_einfuegen.sql b/src-modules/module/qa/schluesseltabellen/sx_stylesheets_einfuegen.sql new file mode 100755 index 0000000..2dd74d8 --- /dev/null +++ b/src-modules/module/qa/schluesseltabellen/sx_stylesheets_einfuegen.sql @@ -0,0 +1,210 @@ +--Freemarker Template +--Achtung: Macro fügt Inhalte ein +--Bitte nur Freemarker Variablen füllen + +<#assign masken = [ +{"mask":"37020", "filename":"tabelle_html_datenblatt.xsl", "ord":"1"}, +{"mask":"37020", "filename":"tabelle_37020_mit_summary.jrxml", "ord":"2"} + +] /> + +<#assign stylesheet = [ +{"filename":"tabelle_37020_mit_summary.jrxml", +"caption":"Testfall Protokoll", +"description":"Protokoll mit Zusammenfassung", +"relation":"table", +"contenttype":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", +"is_generic":"0", +"toolbar_icon_filepath":"../images/icons/page_white_excel.svg", +"usage_resultset_data":"T", +"stylesheet_type":"JRXML", +"jr_datasource":"RS" +} +] /> + +<#assign stylesheet_field = [ + + +] /> + +--Hier eventuell notwendige delete's auf die Tabellen sx_mask_style, sx_stylesheets oder stylesheet_field einfügen. + + <@sx_stylesheets_insert +m_masken=masken +m_stylesheet=stylesheet +m_stylesheet_field=stylesheet_field +/> + + +<#macro sx_stylesheets_insert m_masken m_stylesheet m_stylesheet_field> + +--Sicherstellen, dass keine Duplikate vorkommen: +--#################################################################################################### +<#foreach column in m_masken> +delete from sx_mask_style where maskeninfo_id=${column.mask} and stylesheet_id in (select tid from sx_stylesheets where filename ='${column.filename}') and ord=${column.ord}; + + +<#foreach column in m_stylesheet_field> +delete from stylesheet_field where stylesheet_id in (select tid from sx_stylesheets where filename ='${column.filename}'); + + + + + +-- Stylesheets füllen +--#################################################################################################### +create temp table tmp_stylesheets ( +tid serial not null, +filename CHAR(255) , +caption CHAR(255) , +description CHAR(255) , +relation CHAR(10) , +useragent CHAR(255) , +contenttype CHAR(200) , +is_generic smallint, +toolbar_icon_filepath VARCHAR(255) , +usage_resultset_data CHAR(10) default 'T' , +stylesheet_type CHAR(10) default 'XSL' , +jr_datasource CHAR(10) + +); + +create temp table tmp_hilf (tid integer); +insert into tmp_hilf select max(tid) from sx_stylesheets; +update tmp_hilf set tid=1 where tid is null; + +<#assign counter_tid = 1 /> +<#foreach column in m_stylesheet> +insert into tmp_stylesheets (tid, +filename, +caption, +description, +relation, +contenttype, +is_generic, +toolbar_icon_filepath , +usage_resultset_data , +stylesheet_type , +jr_datasource) +select max(tid)+${counter_tid},'${column.filename}', +'${column.caption}', + '${column.description}', + '${column.relation}', +'${column.contenttype}', +${column.is_generic}, +'${column.toolbar_icon_filepath}' , +'${column.usage_resultset_data}' , +'${column.stylesheet_type}' , +'${column.jr_datasource}' +from tmp_hilf; +<#assign counter_tid = counter_tid + 1 /> + + +<#if TableFieldExists?exists && TableFieldExists('sx_stylesheets','is_generic')> +update sx_stylesheets set is_generic=1 +where filename in (select T.filename from tmp_stylesheets T where T.is_generic=1); + + + +--delete für tml_stylesheets hinzugefügt #ak 06.03.2013 +delete from tmp_stylesheets where filename in (select filename from sx_stylesheets); + + +insert into sx_stylesheets (tid, +filename, caption, description, relation, useragent, contenttype +<#if TableFieldExists?exists && TableFieldExists('sx_stylesheets','is_generic')> +,is_generic + +<#if TableFieldExists?exists && TableFieldExists('sx_stylesheets','toolbar_icon_filepath')> +,toolbar_icon_filepath , +usage_resultset_data , +stylesheet_type , +jr_datasource + +) +SELECT tid, filename, caption, description, relation, useragent, contenttype +<#if TableFieldExists?exists && TableFieldExists('sx_stylesheets','is_generic')> +,is_generic + +<#if TableFieldExists?exists && TableFieldExists('sx_stylesheets','toolbar_icon_filepath')> +,toolbar_icon_filepath , +usage_resultset_data , +stylesheet_type , +jr_datasource + +FROM tmp_stylesheets; + +drop table tmp_stylesheets; + + +-- Mask Style füllen +--#################################################################################################### +create temp table tmp_mask_style ( +tid serial not null, +maskeninfo_id INTEGER , +stylesheet_id INTEGER , +ord SMALLINT, +filename char(255) +); + +delete from tmp_hilf; +insert into tmp_hilf select max(tid) from sx_mask_style; +update tmp_hilf set tid=1 where tid is null; + +<#assign counter_tid = 1 /> +<#foreach column in m_masken> +insert into tmp_mask_style (tid,maskeninfo_id,ord,filename) +select max(tid)+${counter_tid},${column.mask},${column.ord},'${column.filename}' from tmp_hilf; + +update tmp_mask_style set stylesheet_id=(select max(tid) from sx_stylesheets where filename='${column.filename}') +where filename='${column.filename}'; +<#assign counter_tid = counter_tid + 1 /> + + +insert into sx_mask_style ( tid, maskeninfo_id, stylesheet_id, ord) +SELECT tid, maskeninfo_id, stylesheet_id, ord +FROM tmp_mask_style; + +drop table tmp_mask_style; + + +--Field zu Stylesheet Zuordnungen: +--#################################################################################################### +CREATE temp TABLE tmp_stylesheet_field +( +tid serial NOT NULL, +stylesheet_id INTEGER, +tablename char(255), +fieldname char(255), +filename char(255) +); + +delete from tmp_hilf; +insert into tmp_hilf select max(tid) from stylesheet_field; +update tmp_hilf set tid=1 where tid is null; + +<#assign counter_tid = 1 /> +<#foreach column in m_stylesheet_field> +INSERT INTO tmp_stylesheet_field (tid, filename, tablename, fieldname) +select max(tid)+${counter_tid}, '${column.filename}', '${column.tablename}', '${column.fieldname}' from tmp_hilf; + +update tmp_stylesheet_field set stylesheet_id=(select max(tid) from sx_stylesheets where filename='${column.filename}') +where filename='${column.filename}'; +<#assign counter_tid = counter_tid + 1 /> + + +insert into stylesheet_field ( tid, stylesheet_id, tablename, fieldname) +SELECT tid, stylesheet_id, tablename, fieldname +FROM tmp_stylesheet_field; + +drop table tmp_stylesheet_field; +drop table tmp_hilf; + + +<#if SQLdialect='Postgres'> +select sp_update_sequence('sx_stylesheets'); +select sp_update_sequence('sx_mask_style'); +select sp_update_sequence('stylesheet_field'); + + + diff --git a/superx/WEB-INF/reports/tabelle_37020_mit_summary.jrxml b/superx/WEB-INF/reports/tabelle_37020_mit_summary.jrxml new file mode 100644 index 0000000..c920749 --- /dev/null +++ b/superx/WEB-INF/reports/tabelle_37020_mit_summary.jrxml @@ -0,0 +1,465 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <band height="75"> + <textField> + <reportElement style="ReportHeadingInstitution" x="0" y="0" width="818" height="30" uuid="8fffa6d3-064d-423b-b3dd-9ad04ce04520"/> + <textFieldExpression><![CDATA[$F{REPORT_HEADING_INSTITUTION} + " | "+ $F{user}]]></textFieldExpression> + </textField> + <textField> + <reportElement style="ReportTitle" x="0" y="30" width="818" height="45" uuid="7d36095d-a560-454c-ab5e-39c3e10de82e"/> + <textFieldExpression><![CDATA[$F{Berichtsname}]]></textFieldExpression> + </textField> + </band> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +