Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions config.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
* for security reasons (see http://itsecuritysolutions.org/2012-08-13-TestLink-1.9.3-multiple-vulnerabilities/)
* put it out of reach via web or configure access denied.
*/
$tlCfg->log_path = '/var/testlink/logs/'; /* unix example */
$tlCfg->log_path = 'C:\xampp\htdocs\new_pull\logs'; /* unix example */


/**
Expand Down Expand Up @@ -244,7 +244,7 @@
* Configure using custom_config.inc.php
* @uses lib/functions/email_api.php
*/
$g_smtp_host = '[smtp_host_not_configured]'; # SMTP server MUST BE configured
//$g_smtp_host = 'mail.gmx.de'; # SMTP server MUST BE configured

# Configure using custom_config.inc.php
$g_tl_admin_email = '[testlink_sysadmin_email_not_configured]'; # for problem/error notification
Expand All @@ -255,7 +255,7 @@
* Email notification priority (low by default)
* Urgent = 1, Not Urgent = 5, Disable = 0
**/
$g_mail_priority = 5;
//$g_mail_priority = 5;

/**
* Taken from mantis for phpmailer config
Expand All @@ -267,22 +267,22 @@
$g_phpMailer_method = PHPMAILER_METHOD_SMTP;

/** Configure only if SMTP server requires authentication */
$g_smtp_username = ''; # user
$g_smtp_password = ''; # password
//$g_smtp_username = 'lion_milka@gmx.de'; # user
//$g_smtp_password = '!234abcD'; # password

/**
* This control the connection mode to SMTP server.
* Can be '', 'ssl','tls'
* @global string $g_smtp_connection_mode
*/
$g_smtp_connection_mode = '';
$g_smtp_connection_mode = 'tls';

/**
* The smtp port to use. The typical SMTP ports are 25 and 587. The port to use
* will depend on the SMTP server configuration and hence others may be used.
* @global int $g_smtp_port
*/
$g_smtp_port = 25;
$g_smtp_port = 587;


// ----------------------------------------------------------------------------
Expand Down Expand Up @@ -1111,7 +1111,7 @@
* Put it out of reach via web or configure access denied.
*
**/
$g_repositoryPath = '/var/testlink/upload_area/'; /* unix example */
$g_repositoryPath = 'C:\xampp\htdocs\new_pull\upload_area'; /* unix example */

/**
* compression used within the repository
Expand Down Expand Up @@ -1431,7 +1431,9 @@
$tlCfg->tree_filter_cfg->testcases->edit_mode->filter_execution_type = ENABLED;
$tlCfg->tree_filter_cfg->testcases->edit_mode->filter_custom_fields = ENABLED;
$tlCfg->tree_filter_cfg->testcases->edit_mode->filter_workflow_status = ENABLED;
$tlCfg->tree_filter_cfg->testcases->edit_mode->advanced_filter_mode_choice = ENABLED;

// filter mode choice disabled for this mode because there are no filters benefiting from it
$tlCfg->tree_filter_cfg->testcases->edit_mode->advanced_filter_mode_choice = DISABLED;


$tlCfg->tree_filter_cfg->testcases->plan_mode->filter_tc_id = ENABLED;
Expand Down
14 changes: 11 additions & 3 deletions gui/templates/mainPageLeft.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
{lang_get var='labels' s='title_product_mgmt,href_tproject_management,href_admin_modules,
href_assign_user_roles,href_cfields_management,system_config,
href_cfields_tproject_assign,href_keywords_manage,
title_user_mgmt,href_user_management,
href_roles_management,title_requirements,
title_user_mgmt,href_user_management,href_process_step_role_assignment,
href_roles_management,title_requirements,href_manage_req_subs,
href_req_spec,href_req_assign,link_report_test_cases_created_per_user,
title_test_spec,href_edit_tc,href_browse_tc,href_search_tc,
href_search_req, href_search_req_spec,href_inventory,
Expand Down Expand Up @@ -57,7 +57,7 @@


{if $gui->testprojectID &&
($gui->grants.cfield_management == "yes" || $gui->grants.issuetracker_management || $gui->grants.issuetracker_view)}
($gui->grants.cfield_management == "yes" || $gui->grants.issuetracker_management || $gui->grants.issuetracker_view || $gui->grants.reqs_view == "yes")}
{$display_left_block_2=true}

<script type="text/javascript">
Expand Down Expand Up @@ -168,6 +168,14 @@
<div id='system_topics'>
{if $gui->grants.cfield_management == "yes"}
<a href="lib/cfields/cfieldsView.php">{$labels.href_cfields_management}</a>
<br />
{/if}
{if $gui->grants.reqs_view == "yes"}
<a href="lib/requirements/reqManageSubs.php">{$labels.href_manage_req_subs}</a>
<br />
{/if}
{if $gui->userRole eq "admin"}
<a href="lib/notificationassignments/notificationAssignmentConfig.php">{$labels.href_process_step_role_assignment}</a>
<br />
{/if}

Expand Down
57 changes: 57 additions & 0 deletions gui/templates/notificationAssignmentConfig.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{lang_get var='labels'
s='test_project_names,assign_button_label,assign_table_header_fieldvals,assign_table_header_users,assign_btn_change,assign_btn_delete'}

<html>
<head>
</head>
<body>
{include file="inc_head.tpl" openHead="yes" jsValidate="yes" editorType=$gui->editorType}
<div class="workBack">
<form method="post" action="lib/notificationassignments/notificationAssignmentCreate.php">
<script>
function submitBtnEnablePolicy() {
var select = document.getElementsByName("fieldName")[0];
var changeBtn = document.getElementsByName("change")[0];
if(select.options[select.selectedIndex].text.localeCompare("")==0) {
changeBtn.disabled = true;
}else {
changeBtn.disabled = false;
}
}
</script>
<label for="testProject">{$labels.test_project_names}</label>
<select name="fieldName" onchange="submitBtnEnablePolicy()">
{html_options options=$gui->fieldNames}
</select>
<input type="submit" name="change" value="{$labels.assign_button_label}" disabled=true; />
</form>
</div>
{if isset($gui->assignments)}
<div class="workBack">
{foreach key=fieldName item=fieldValues from=$gui->assignments}
<div class="workBack">
<form method="POST" >
<h3>{$fieldName}</h3>
<table class="simple_tableruler">
<th>{$labels.assign_table_header_fieldvals}</th><th>{$labels.assign_table_header_users}</th>
{foreach key=fieldVal item=assignedUsers from=$fieldValues}
<tr>
<td>{$fieldVal}</td>
<td>
{foreach item=user from=$assignedUsers}
<a>{$user}<br></a>
{/foreach}
</td>
</tr>
{/foreach}
</table>
<input type="text" name="fieldName" style="display:none" value="{$fieldName}"/>
<input type="submit" name="change" value="{$labels.assign_btn_change}" formaction="lib/notificationassignments/notificationAssignmentCreate.php" />
<input type="submit" name="delete" value="{$labels.assign_btn_delete}" formaction="lib/notificationassignments/notificationAssignmentConfig.php" />
</form>
</div>
{/foreach}
</div>
{/if}
</body>
</html>
49 changes: 49 additions & 0 deletions gui/templates/notificationAssignmentCreate.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{lang_get var='labels'
s='assign_table_header_fieldvals,assign_table_header_users,btn_cancel,btn_ok'}

<!DOCTYPE html>
{$selectSize = 10}
{if count($gui->users) lt 10}
{$selectSize = count($gui->users)}
{/if}
<html>
<head>
<link rel="stylesheet" href="../../gui/themes/default/css/testlink.css"/>
</head>
<body>
<div class="workBack">
<form id="assignmentForm" method="post" action="notificationAssignmentConfig.php" >
<input hidden type="text" name="fieldName" value="{$gui->fieldName}"/>
<table class="simple_tableruler">
<th>{$labels.assign_table_header_fieldvals}</th><th>{$labels.assign_table_header_users}</th>
{foreach key=fieldValNr item=fieldVal from=$gui->fieldVals}
<tr>
<td>{$fieldVal}</td>
<td>
<select name="select_{$fieldVal}[]" multiple="multiple" size="{$selectSize}">
{$addSelectedUser = false}
{foreach key=userIndex item=userName from=$gui->users}
{foreach item=activeUser from=$gui->fieldAssignments[$gui->fieldName][$fieldVal]}
{if strcmp($activeUser,$userName) === 0}
{$addSelectedUser = true}
{break}
{/if}
{/foreach}
{if $addSelectedUser}
<option selected="selected" id={$userIndex}>{$userName}</option>
{$addSelectedUser = false}
{else}
<option id={$userIndex}>{$userName}</option>
{/if}
{/foreach}
</select>
</td>
</tr>
{/foreach}
</table>
<input id="assignmentFormSubmit" name="submit" type="submit" value="{$labels.btn_ok}" />
<input id="assignmentFormCancel" name="cancel" type="submit" value="{$labels.btn_cancel}" />
</form>
</div>
</body>
</html>
47 changes: 47 additions & 0 deletions gui/templates/requirements/reqManageSubs.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{*
* TestLink Open Source Project - http://testlink.sourceforge.net/
* $Id: reqmanagesubs.tpl,v 1.9 2016/22/02
*
* Purpose: List requirements in an ExtJS Table, with the ability to subscribe or unsubscribe requirements.
*
* @internal revisions
*
*}

{lang_get var="labels"
s='testproject_has_no_reqspec, testproject_has_no_requirements,
all_versions_displayed, latest_version_displayed,
dont_show_all_versions_btn'}

{include file="inc_head.tpl" openHead="yes"}

{foreach from=$gui->tableSet key=idx item=matrix name="initializer"}
{$tableID="table_$idx"}
{if $smarty.foreach.initializer.first}
{$matrix->renderCommonGlobals()}
{if $matrix instanceof tlExtTable}
{include file="inc_ext_js.tpl" bResetEXTCss=1}
{include file="inc_ext_table.tpl"}
{/if}
{/if}
{$matrix->renderHeadSection($tableID)}
{/foreach}
</head>

<body>
<h1 class="title">{$gui->pageTitle|escape}</h1>

<div class="workBack" style="overflow-y: auto;">

{foreach from=$gui->tableSet key=idx item=matrix}
{$tableID="table_$idx"}
{$matrix->renderBodySection($tableID)}
{/foreach}

<br/>

</div>

</body>

</html>
2 changes: 1 addition & 1 deletion gui/templates/requirements/reqOverview.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@

</body>

</html>
</html>
26 changes: 22 additions & 4 deletions gui/templates/requirements/reqViewVersionsViewer.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ viewer for requirement
testproject,title_last_mod,title_created,by,btn_compare_versions,showing_version,
revision,btn_view_history,btn_new_revision,btn_print_view,specific_direct_link,
design,execution_history,btn_unfreeze_this_version,addLinkToTestCase,btn_save,
removeLinkToTestCase,requirement,actions"}
removeLinkToTestCase,requirement,actions,btn_subscribe,btn_unsubscribe"}

{$hrefReqSpecMgmt="lib/general/frmWorkArea.php?feature=reqSpecMgmt"}
{$hrefReqSpecMgmt="$basehref$hrefReqSpecMgmt"}
Expand Down Expand Up @@ -107,11 +107,29 @@ viewer for requirement
</form>
{/if}

<script>
var changeSubLabel = function() {
var btn = document.getElementsByName("subscribe")[0];
if(btn.value.localeCompare('{$labels.btn_subscribe}')===0)
{
btn.value = '{$labels.btn_unsubscribe}';
}
else {
btn.value = '{$labels.btn_subscribe}';
}
};
</script>
{* Option to print single requirement *}
<form style="display: inline;" method="post" action="" name="reqPrinterFriendly">
<input type="button" name="printerFriendly" value="{$labels.btn_print_view}"
onclick="javascript:openPrintPreview('req',{$args_req.id},{$args_req.version_id},
<form style="display: inline;" method="post" action="lib/requirements/reqView.php" name="reqPrinterFriendly">
<input type="text" name="requirement_id" value="{$req_id}" style="display:none" />
<input type="button" name="printerFriendly" value="{$labels.btn_print_view}"
onclick="javascript:openPrintPreview('req',{$args_req.id},{$args_req.version_id},
{$args_req.revision},'lib/requirements/reqPrint.php');"/>
{if $gui->isSubed == 1}
<input type="submit" name="subscribe" value="{$labels.btn_unsubscribe}"/>
{elseif $gui->isSubed == 0}
<input type="submit" name="subscribe" value="{$labels.btn_subscribe}"/>
{/if}
</form>
<br/><br/>
</div> {* class="groupBtn" *}
Expand Down
19 changes: 17 additions & 2 deletions install/sql/mysql/testlink_create_tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -685,8 +685,6 @@ CREATE TABLE /*prefix*/text_templates (
UNIQUE KEY idx_text_templates (type,title)
) DEFAULT CHARSET=utf8 COMMENT='Global Project Templates';



CREATE TABLE /*prefix*/testcase_relations (
`id` int(10) unsigned NOT NULL auto_increment,
`source_id` int(10) unsigned NOT NULL,
Expand All @@ -696,3 +694,20 @@ CREATE TABLE /*prefix*/testcase_relations (
`creation_ts` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) DEFAULT CHARSET=utf8;

CREATE TABLE /*prefix*/req_notify_assignments (
`id` int(11) NOT NULL AUTO_INCREMENT,
`test_project_id` int(11) NOT NULL,
`field_id` int(11) NOT NULL,
`field_value` varchar(64) NOT NULL,
`assigned_user_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id_UNIQUE` (`id`)
) AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

CREATE TABLE /*prefix*/req_subscription (
`req_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`tproject_id` int(11) NOT NULL,
PRIMARY KEY (`req_id`,`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Loading