Skip to content
Closed
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
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,8 @@ RUN /etc/init.d/mysql 'start'

WORKDIR /var/www/public
COPY . ./

RUN mkdir /var/testlink/logs -p &&\
mkdir /var/testlink/upload_area -p &&\
chmod a+rw /var/www/public/gui/templates_c &&\
chmod a+rw /var/testlink -R
6 changes: 6 additions & 0 deletions config.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -1081,6 +1081,12 @@
// 'latest' => latest execution notes.
$tlCfg->exec_cfg->steps_exec_status_default = 'empty';

/**
* Concatenate execution steps note in the execution notes (the later is attached to the test run)
**/

$tlCfg->exec_cfg->steps_notes_concat = false;

// Parameters to show notes/details when entering test execution feature
// EXPAND: show expanded/open
// COLLAPSE: show collapsed/closede
Expand Down
45 changes: 34 additions & 11 deletions gui/javascript/execSetResults.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,48 @@ function doSubmitForHTML5() {
/**
* Submit Executions status.
* Used
*
* @param tcvID int test case id
* @param status test status
* @param notesConcat concatenate step note in exec notes
* @param goNext open next test case
*
*/
function saveExecStatus(tcvID, status, msg, goNext) {

function saveExecStatus(tcvID, status, notesConcat, goNext) {
/* Init */
jQuery('#save_and_next').val(0);
jQuery('#save_results').val(0);
jQuery('#save_partial_steps_exec').val(0);
jQuery('#save_results').val(0);
jQuery('#save_partial_steps_exec').val(0);

jQuery('#save_button_clicked').val(tcvID);
jQuery('#statusSingle_' + tcvID).val(status);
if(notesConcat == true){
// Get all steps status
var myRegexp = /step_row_(\d+)/g;
var stepresult = document.querySelectorAll('[id^=step_row_]');
var tcNotes = document.getElementById('notes['+tcvID+']');
stepresult.forEach(function(item){
match = myRegexp.exec(item.id);
myRegexp.lastIndex = 0;
stepNum = document.getElementById('tcstep_'+match[1]);
var row = stepNum.innerHTML;
var note = '';
var statusTc = ''
if ( item.getElementsByClassName('step_status').length > 0 )
statusTc = item.getElementsByClassName('step_status')[0].value;
if ( item.getElementsByClassName('step_note_textarea').length > 0 )
note = item.getElementsByClassName('step_note_textarea')[0].value;
if (statusTc == 'f' ||statusTc == 'b' || note != ''){
tcNotes.value = tcNotes.value + '\nStep '+ row + ' ('+ statusTc+'):' + note ;
}
})
}
if( goNext == undefined || goNext == 0 ) {
jQuery('#save_results').val(1);
jQuery('#save_results').val(1);
} else {
if( goNext == 1 ) {
jQuery('#save_and_next').val(1);
}
if( goNext == 1 ) {
jQuery('#save_and_next').val(1);
}
}

doSubmitForHTML5();
}

Expand Down Expand Up @@ -152,4 +175,4 @@ function checkSubmitForStatusCombo(oid,statusCode2block) {
saveStepsPartialExecClicked = false;
$("#saveStepsPartialExec").click(function() {
saveStepsPartialExecClicked = true;
});
});
4 changes: 2 additions & 2 deletions gui/templates/tl-classic/execute/inc_exec_img_controls.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Author : franciscom
<img src="{$tlImages.$in}" title="{$ikval.title}"
name="fastExec{$kode}[{$tcversion_id}]"
id="fastExec{$kode}_{$tcversion_id}"
onclick="javascript:saveExecStatus({$tcvID},'{$kode}');">&nbsp;
onclick="javascript:saveExecStatus({$tcvID},'{$kode}',{$tlCfg->exec_cfg->steps_notes_concat});">&nbsp;
{/foreach}
<br />
<br />
Expand All @@ -121,7 +121,7 @@ Author : franciscom
<img src="{$tlImages.$in}" title="{$ikval.title}"
name="fastExecNext{$kode}[{$tcversion_id}]"
id="fastExecNext{$kode}_{$tcversion_id}"
onclick="javascript:saveExecStatus({$tcvID},'{$kode}','',1);">&nbsp;
onclick="javascript:saveExecStatus({$tcvID},'{$kode}',{$tlCfg->exec_cfg->steps_notes_concat},1);">&nbsp;
{/foreach}
<br />
<br />
Expand Down
15 changes: 10 additions & 5 deletions gui/templates/tl-classic/requirements/reqTcAssign.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ function refreshAndClose(tcase_id,callback) {
{$msgReqLinkingEnabled = $labels.reqLinkingDisabledAfterExec}
{/if}



<body>
{$sep = $smarty.const.TITLE_SEP}
{$tcIdentity = "{$gui->tcTitle|escape} "}
Expand All @@ -83,9 +81,10 @@ function refreshAndClose(tcase_id,callback) {
{/if}

<p><span class="labelHolder">{$labels.req_spec}</span>
<select name="idSRS" id="idSRS" onchange="form.submit()">
<select name="idSRS" id="idSRS" class="idSRS" onchange="form.submit()">
<option></option>
{html_options options=$gui->arrReqSpec selected=$gui->selectedReqSpec}
</select>
</select></p>
</form>
{if $gui->showCloseButton}
<form name="closeMeTop">
Expand Down Expand Up @@ -239,5 +238,11 @@ function refreshAndClose(tcase_id,callback) {
</div>
</form>
{/if}

<script type="text/javascript">
jQuery( document ).ready(function() {
jQuery(".idSRS").chosen({ width: "70%", search_contains: true });
});
</script>
</body>
</html>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ CREATE TABLE /*prefix*/baseline_l1l2_context (
end_exec_ts timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
creation_ts timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (id),
UNIQUE KEY /*prefix*/udx1_details (testplan_id,platform_id,creation_ts)
UNIQUE KEY udx1 (testplan_id,platform_id,creation_ts)
) DEFAULT CHARSET=utf8;


Expand Down
15 changes: 7 additions & 8 deletions lib/issuetrackerintegration/jirarestInterface.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -387,14 +387,13 @@ public function addIssue($summary,$description,$opt=null)
}
}


if (property_exists($opt, 'reporter')) {

// After Atlassian GDRP Changes
// $issue['fields']['reporter'] =
// array('name' => (string)$opt->reporter);
$issue['fields']['reporter'] =
array('id' => (string)$opt->reporter);
if (property_exists($opt, 'reporter')) {
$accountid = $this->APIClient->getAccountId($opt->reporter_email);
if($accountid) {
$issue['fields']['reporter'] = array('accountId' => (string)$accountid);
} else {
$issue['fields']['reporter'] = array('name' => (string)$opt->reporter);
}
}

if (property_exists($opt, 'issueType')) {
Expand Down
38 changes: 36 additions & 2 deletions third_party/fayp-jira-rest/Jira.php
Original file line number Diff line number Diff line change
Expand Up @@ -541,5 +541,39 @@ public function getCreateIssueMetadata($projectKeys=null,$opt=null)
return $items;
}


}
/**
* getAccountId
*
* @return mixed
*/
public function getAccountId($email)
{
$cmd = $this->host . 'groupuserpicker?query=' . $email;
$this->request->openConnect($cmd, 'GET');
$this->request->execute();
if ($result = json_decode($this->request->getResponseBody())) {
if (!isset($result->users)) {
//error_log('cannot find user');
return false;
}
$infos = $result->users->users;
$cnt = $result->users->total;
if ($infos) {
foreach ($infos as $info) {
if ($info->accountId) {
return $info->accountId;
}
}
}
return false;
}
else
{
// ATTENTION \Exception in order to use PHP object.
$msg = "Error Processing Request - " . __METHOD__ . ' ' .
implode('/', $items->errorMessages);
throw new \Exception($msg, 999);
}
return false;
}
}