Skip to content
Permalink
Browse files

feature: #0008667: Possibility to use two different logic to compute …

…test case exec status counters (present on tree)
  • Loading branch information...
fmancardi committed May 18, 2019
1 parent 3d0de56 commit 3408a285388ef38f7657e49736071d4cb6b8b79c
@@ -947,4 +947,8 @@
define('LINK_TC_RELATION_CLOSED_BY_EXEC', 2);
define('LINK_TC_RELATION_CLOSED_BY_NEW_TCVERSION', 3);
define('USE_LATEST_EXEC_ON_CONTEX_FOR_COUNTERS', 1);
define('USE_LATEST_EXEC_ON_TESTPLAN_FOR_COUNTERS',2);
// END
@@ -102,6 +102,7 @@
// null or '' => do not use
$tlCfg->custom_css = null;
/** Include constants and magic numbers (users should not change it)*/
require_once(TL_ABS_PATH . 'cfg' . DIRECTORY_SEPARATOR . 'const.inc.php');
@@ -438,57 +439,32 @@
$tlCfg->OAuthServers = array();
// $tlCfg->OAuthServers = array();
//
// Google
//
// $tlCfg->OAuthServers[1]['oauth_client_id'] = 'CLIENT_ID';
// $tlCfg->OAuthServers[1]['oauth_client_secret'] = 'CLIENT_SECRET';
// $tlCfg->OAuthServers[1]['redirect_uri'] = 'REDIRECT URI';
//
// $tlCfg->OAuthServers = array();
// $tlCfg->OAuthServers[1]['oauth_enabled'] = true;
// $tlCfg->OAuthServers[1]['oauth_name'] = 'google';
//
// Get from /gui/themes/default/images
// $tlCfg->OAuthServers[1]['oauth_icon'] = 'google.png';
//
// $tlCfg->OAuthServers[1]['oauth_client_id'] = 'CLIENT_ID';
// $tlCfg->OAuthServers[1]['oauth_client_secret'] = 'CLIENT_SECRET';
// Can be authorization_code (by default), client_credentials or password
// $tlCfg->OAuthServers[1]['oauth_grant_type'] = 'authorization_code';
// $tlCfg->OAuthServers[1]['oauth_url'] = 'https://accounts.google.com/o/oauth2/auth';
// $tlCfg->OAuthServers[1]['token_url'] = 'https://accounts.google.com/o/oauth2/token';
//
// Default: true
// false => if in the Browser there is JUST one user already logged in
// to google, then this user will be selected automatically
//
// $tlCfg->OAuthServers[1]['oauth_force_single'] = true;
//
//
// ATTENTION - Optional
// the domain you want to whitelist.
// if your email is a gmail account and you use the following config
//
// false => then the only user will be selected automatically (applied for google)
// $tlCfg->OAuthServers[1]['oauth_force_single'] = false;
// the domain you want to whitelist
// $tlCfg->OAuthServers[1]['oauth_domain'] = 'google.com';
//
// then this check will block you!
//
//
//
// $tlCfg->OAuthServers[1]['oauth_profile'] = 'https://www.googleapis.com/oauth2/v1/userinfo';
// $tlCfg->OAuthServers[1]['oauth_scope'] = 'https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile';
//
//
// Github
// $tlCfg->OAuthServers[2]['oauth_client_id'] = 'CLIENT_ID';
// $tlCfg->OAuthServers[2]['oauth_client_secret'] = 'CLIENT_SECRET';
// $tlCfg->OAuthServers[2]['redirect_uri'] = 'REDIRECT URI';
//
// $tlCfg->OAuthServers[2]['oauth_enabled'] = true;
// $tlCfg->OAuthServers[2]['oauth_name'] = 'github';
//
// Get from /gui/themes/default/images
//
// $tlCfg->OAuthServers[2]['oauth_icon'] = 'github.png';
// $tlCfg->OAuthServers[2]['oauth_icon'] = 'github.png'; //Get from /gui/themes/default/images
// $tlCfg->OAuthServers[2]['oauth_client_id'] = 'CLIENT_ID';
// $tlCfg->OAuthServers[2]['oauth_client_secret'] = 'CLIENT_SECRET';
// Can be authorization_code (by default), client_credentials or password
// $tlCfg->OAuthServers[2]['oauth_grant_type'] = 'authorization_code';
@@ -930,6 +906,8 @@
// ----------------------------------------------------------------------------
/* [Test Executions] */
// $tlCfg->exec_cfg->enable_test_automation = DISABLED;
// ENABLED -> enable XML-RPC calls to external test automation server
// new buttons will be displayed on execution pages
// DISABLED -> disable
@@ -961,6 +939,14 @@
// $att_model_m2 -> hides upload button and title
$tlCfg->exec_cfg->att_model = $att_model_m2; //defined in const.inc.php
// IVU
// Default Value
// USE_LATEST_EXEC_ON_CONTEX_FOR_COUNTERS
// USE_LATEST_EXEC_ON_TESTPLAN_FOR_COUNTERS
$tlCfg->exec_cfg->tcases_counters_mode =
USE_LATEST_EXEC_ON_CONTEX_FOR_COUNTERS;
// ENABLED -> test cases will be coloured according to test case status
$tlCfg->exec_cfg->enable_tree_testcases_colouring = ENABLED;
@@ -1944,8 +1930,8 @@
* See example below
*/
$g_tpl = array('inc_exec_controls' => 'inc_exec_img_controls.tpl');
$g_tpl['login'] = 'login/login-model-marcobiedermann.tpl';
//$g_tpl = array('inc_exec_controls' => 'inc_exec_controls.tpl');
$g_tpl['login'] = 'login/login-model-marcobiedermann.tpl';
// Example
// $g_tpl = array('tcView' => 'custom_tcView.tpl',
@@ -11,25 +11,23 @@
* That template was also the base for most of the html code used in here.
*
* @author Andreas Simon
* @internal revisions
*
* @since 1.9.15
*}

{lang_get var=labels s='caption_nav_settings, caption_nav_filters, platform, test_plan,
build,filter_tcID,filter_on,filter_result,status,
btn_update_menu,btn_apply_filter,keyword,keywords_filter_help,
filter_owner,TestPlan,test_plan,caption_nav_filters,
platform, include_unassigned_testcases, filter_active_inactive,
btn_remove_all_tester_assignments, execution_type,
do_auto_update, testsuite, btn_reset_filters,hint_list_of_bugs,
btn_bulk_update_to_latest_version, priority, tc_title,
custom_field, search_type_like, importance,import_xml_results,
document_id, req_expected_coverage, title,bugs_on_context,
status, req_type, req_spec_type, th_tcid, has_relation_type,
btn_export_testplan_tree,btn_export_testplan_tree_for_results,
tester_works_with_settings,btn_bulk_remove,btn_bulk_copy,
test_grouped_by, parent_child_relation'}
{lang_get var=labels
s='caption_nav_settings, platform, test_plan,
build,filter_tcID,filter_on,filter_result,status,
btn_update_menu,btn_apply_filter,keyword,keywords_filter_help,
filter_owner,TestPlan,test_plan,caption_nav_filters,
platform, include_unassigned_testcases, filter_active_inactive,
btn_remove_all_tester_assignments, execution_type,
do_auto_update, testsuite, btn_reset_filters,hint_list_of_bugs,
btn_bulk_update_to_latest_version, priority, tc_title,
custom_field, search_type_like, importance,import_xml_results,
document_id, req_expected_coverage, title,bugs_on_context,
status, req_type, req_spec_type, th_tcid, has_relation_type,
btn_export_testplan_tree,btn_export_testplan_tree_for_results,
tester_works_with_settings,btn_bulk_remove,btn_bulk_copy,
test_grouped_by, parent_child_relation, exec_tree_counters_logic'}

{config_load file="input_dimensions.conf" section="treeFilterForm"}

@@ -121,18 +119,18 @@
</tr>
{/if}

{if $control->settings.setting_testsgroupby}
<tr>
<td>{$labels.test_grouped_by}</td>
<td>
<select name="setting_testsgroupby" class="chosen-select" onchange="this.form.submit()">
{html_options options=$control->settings.setting_testsgroupby.items
selected=$control->settings.setting_testsgroupby.selected}
</select>
</td>
</tr>
{/if}
{if $control->settings.setting_testsgroupby}
<tr>
<td>{$labels.test_grouped_by}</td>
<td>
<select name="setting_testsgroupby" class="chosen-select" onchange="this.form.submit()">
{html_options options=$control->settings.setting_testsgroupby.items
selected=$control->settings.setting_testsgroupby.selected}
</select>
</td>
</tr>
{/if}
{if $control->settings.setting_refresh_tree_on_action}
<tr>
<td>{$labels.do_auto_update}</td>
@@ -150,37 +148,57 @@
</td>
</tr>
{/if}
{if $control->settings.setting_get_parent_child_relation}
{if $control->settings.setting_get_parent_child_relation}
<tr>
<td>{$labels.parent_child_relation}</td>
<td>
<input type="hidden"
<input type="hidden"
id="hidden_setting_get_parent_child_relation"
name="hidden_setting_get_parent_child_relation"
value="{$control->settings.setting_get_parent_child_relation.hidden_setting_get_parent_child_relation}" />
<input type="checkbox"
id="cbsetting_get_parent_child_relation"
name="setting_get_parent_child_relation"
{if $control->settings.setting_get_parent_child_relation.selected} checked {/if}
style="font-size: 90%;" onclick="this.form.submit()"/>
<input type="checkbox"
id="cbsetting_get_parent_child_relation"
name="setting_get_parent_child_relation"
{if $control->settings.setting_get_parent_child_relation.selected} checked {/if}
style="font-size: 90%;" onclick="this.form.submit()"/>
</td>
</tr>
{/if}

<tr>
<td>&nbsp;</td>
</tr>

{if $control->settings.setting_exec_tree_counters_logic}
<tr>
<td>
{$labels.exec_tree_counters_logic}
</td>
<td>
<select class="chosen-select" name="setting_exec_tree_counters_logic" onchange="this.form.submit()">
{html_options
options=$control->settings.setting_exec_tree_counters_logic.items
selected=$control->settings.setting_exec_tree_counters_logic.selected}
</select>
</td>
</tr>
{/if}

{if $control->draw_export_testplan_button || $control->draw_import_xml_results_button}
<tr>
<td>&nbsp;</td><td>&nbsp;</td>
</tr>

<tr>
<td>&nbsp;</td>
<td>
{if $control->draw_export_testplan_button}
<image src="{$tlImages.export}" title="{$labels.btn_export_testplan_tree}"
onclick="javascript: openExportTestPlan('export_testplan','{$session.testprojectID}',
'{$control->settings.setting_testplan.selected}','{$platformID}',
'{$control->settings.setting_build.selected}','tree',
'{$control->settings.setting_testplan.selected}','{$platformID}',
'{$control->settings.setting_build.selected}','tree',
'{$control->form_token}');" />
&nbsp;
<image src="{$tlImages.export_for_results_import}" title="{$labels.btn_export_testplan_tree_for_results}"
@@ -964,41 +964,4 @@ function completeIssueForStep(&$execContext,$execSigfrid,$exData,$stepID) {
}
return $addLink;
}
/**
*
*/
function addAttachmentsToExec($execID,&$docRepo) {
$tableRef = DB_TABLE_PREFIX . 'executions';
$repOpt = array('allow_empty_title' => TRUE);
// 0 is magic!!, 0 is used in the smarty template
// May be we have enabled MULTIPLE on file upload
$honeyPot = array('name' => null,'size' => null,
'tmp_name' => null, 'type' => null);
foreach($honeyPot as $bee => $nuu) {
$honeyPot[$bee] = (array)$_FILES['uploadedFile'][$bee][0];
}
$curly = count($honeyPot);
for($moe=0; $moe < $curly; $moe++) {
$fSize = isset($honeyPot['size'][$moe]) ?
$honeyPot['size'][$moe] : 0;
$fTmpName = isset($honeyPot['tmp_name'][$moe]) ?
$honeyPot['tmp_name'][$moe] : '';
if ($fSize && $fTmpName != "") {
$fk2loop = array_keys($_FILES['uploadedFile']);
foreach($fk2loop as $tk) {
$fInfo[$tk] = $honeyPot[$tk][$moe];
}
$uploaded = $docRepo->insertAttachment($execID,$tableRef,'',
$fInfo,$repOpt);
}
}
}
}

0 comments on commit 3408a28

Please sign in to comment.
You can’t perform that action at this time.