diff --git a/README.md b/README.md index 590da268be..2876310202 100644 --- a/README.md +++ b/README.md @@ -755,7 +755,7 @@ BEFORE the commit ID. => then Nike => Just DO IT [upgf]: http://forum.testlink.org/viewforum.php?f=11 [uupg]: http://forum.testlink.org/viewforum.php?f=58 [tucf]: http://www.testlink.org/ -[mbug]: http://www.testlink.org/mantis/ +[mbug]: http://mantis.testlink.org/ [twt]: http://twitter.com/#!/TLOpenSource [free]: http://www.freetest.net.br [csrf]: https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)_Prevention_Cheat_Sheet diff --git a/gui/templates/tl-classic/requirements/reqTcAssign.tpl b/gui/templates/tl-classic/requirements/reqTcAssign.tpl index a9fb0e1011..266cb352dd 100644 --- a/gui/templates/tl-classic/requirements/reqTcAssign.tpl +++ b/gui/templates/tl-classic/requirements/reqTcAssign.tpl @@ -58,8 +58,6 @@ function refreshAndClose(tcase_id,callback) { {$msgReqLinkingEnabled = $labels.reqLinkingDisabledAfterExec} {/if} - - {$sep = $smarty.const.TITLE_SEP} {$tcIdentity = "{$gui->tcTitle|escape} "} @@ -83,9 +81,10 @@ function refreshAndClose(tcase_id,callback) { {/if}

{$labels.req_spec} - + {html_options options=$gui->arrReqSpec selected=$gui->selectedReqSpec} - +

{if $gui->showCloseButton}
@@ -239,5 +238,11 @@ function refreshAndClose(tcase_id,callback) {
{/if} + + - \ No newline at end of file + diff --git a/install/sql/alter_tables/1.9.20/mysql/DB.1.9.20/step1/db_schema_update.sql b/install/sql/alter_tables/1.9.20/mysql/DB.1.9.20/step1/db_schema_update.sql index 35ae92a287..d66a253c2b 100644 --- a/install/sql/alter_tables/1.9.20/mysql/DB.1.9.20/step1/db_schema_update.sql +++ b/install/sql/alter_tables/1.9.20/mysql/DB.1.9.20/step1/db_schema_update.sql @@ -18,12 +18,34 @@ ALTER TABLE /*prefix*/builds ADD COLUMN branch varchar(64) NULL; ALTER TABLE /*prefix*/builds ADD COLUMN release_candidate varchar(100) NULL; -- -ALTER TABLE /*prefix*/users MODIFY password VARCHAR(255); +ALTER TABLE /*prefix*/users MODIFY password VARCHAR(255) NOT NULL default ''; -- ALTER TABLE /*prefix*/testplan_platforms ADD COLUMN active tinyint(1) NOT NULL default '1'; -ALTER TABLE /*prefix*/platforms ADD COLUMN enable_on_design tinyint(1) NOT NULL default '0', -ALTER TABLE /*prefix*/platforms ADD COLUMN enable_on_execution tinyint(1) NOT NULL default '1', +ALTER TABLE /*prefix*/platforms ADD COLUMN enable_on_design tinyint(1) NOT NULL default '0'; +ALTER TABLE /*prefix*/platforms ADD COLUMN enable_on_execution tinyint(1) NOT NULL default '1'; + +-- +ALTER TABLE /*prefix*/nodes_hierarchy ADD INDEX /*prefix*/nodes_hierarchy_node_type_id (node_type_id); +ALTER TABLE /*prefix*/testcase_keywords ADD INDEX /*prefix*/idx02_testcase_keywords (tcversion_id); + +ALTER TABLE /*prefix*/milestones MODIFY target_date date NOT NULL; +ALTER TABLE /*prefix*/milestones MODIFY start_date date DEFAULT NULL; + +-- +CREATE TABLE /*prefix*/execution_tcsteps_wip ( + id int(10) unsigned NOT NULL auto_increment, + tcstep_id int(10) unsigned NOT NULL default '0', + testplan_id int(10) unsigned NOT NULL default '0', + platform_id int(10) unsigned NOT NULL default '0', + build_id int(10) unsigned NOT NULL default '0', + tester_id int(10) unsigned default NULL, + creation_ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + notes text, + status char(1) default NULL, + PRIMARY KEY (id), + UNIQUE KEY /*prefix*/execution_tcsteps_wip_idx1(`tcstep_id`,`testplan_id`,`platform_id`,`build_id`) +) DEFAULT CHARSET=utf8; CREATE TABLE /*prefix*/testcase_platforms ( @@ -45,7 +67,7 @@ CREATE TABLE /*prefix*/baseline_l1l2_context ( end_exec_ts timestamp NOT NULL, creation_ts timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id), - UNIQUE KEY udx1 (testplan_id,platform_id,creation_ts), + UNIQUE KEY udx1 (testplan_id,platform_id,creation_ts) ) DEFAULT CHARSET=utf8; @@ -73,9 +95,6 @@ AS SELECT tcversion_id, testplan_id,build_id,platform_id,max(id) AS id FROM /*prefix*/executions GROUP BY tcversion_id,testplan_id,build_id,platform_id; -ALTER TABLE /*prefix*/nodes_hierarchy ADD INDEX /*prefix*/nodes_hierarchy_node_type_id (node_type_id); -ALTER TABLE /*prefix*/testcase_keywords ADD INDEX /*prefix*/idx02_testcase_keywords (tcversion_id); - CREATE OR REPLACE VIEW /*prefix*/tcversions_without_platforms AS SELECT diff --git a/lib/functions/oauth_providers/github.php b/lib/functions/oauth_providers/github.php index 4137c2f7bb..333308309f 100644 --- a/lib/functions/oauth_providers/github.php +++ b/lib/functions/oauth_providers/github.php @@ -58,6 +58,7 @@ function oauth_get_token($authCfg, $code) { // If token is received start session if (isset($tokenInfo->access_token)) { $oauthParams['access_token'] = $tokenInfo->access_token; + $curlContentType = array('Authorization: token ' . $tokenInfo->access_token, 'Content-Type: application/xml','Accept: application/json'); $queryString = http_build_query($tokenInfo); $targetURL = array(); diff --git a/lib/functions/tlUser.class.php b/lib/functions/tlUser.class.php index fc6f8959db..77330a323d 100644 --- a/lib/functions/tlUser.class.php +++ b/lib/functions/tlUser.class.php @@ -587,7 +587,7 @@ public function comparePassword(&$dbH,$pwd) // MD5 hash check // This is valid ONLY for internal password management $encriptedPWD = $this->getPassword(); - if (strlen($encriptedPWD) == 32) { + if (strlen($encriptedPWD) === 32) { /* Update the old MD5 hash to the new bcrypt */ if ($encriptedPWD == md5($pwd)) { $this->password = $this->encryptPassword($pwd,$this->authentication); @@ -1522,4 +1522,4 @@ function hasRightWrap(&$db,$roleQuestion,$context=null) { $cx['checkPublicPrivateAttr']); } -} \ No newline at end of file +} diff --git a/lib/issuetrackerintegration/jirarestInterface.class.php b/lib/issuetrackerintegration/jirarestInterface.class.php index c8ac3c713b..5ba68b879b 100644 --- a/lib/issuetrackerintegration/jirarestInterface.class.php +++ b/lib/issuetrackerintegration/jirarestInterface.class.php @@ -401,9 +401,13 @@ public function addIssue($summary,$description,$opt=null) } } - - if (property_exists($opt, 'reporter')) { - $issue['fields']['reporter'] = array('name' => (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')) { diff --git a/third_party/fayp-jira-rest/Jira.php b/third_party/fayp-jira-rest/Jira.php index b4ab479215..448bba5219 100644 --- a/third_party/fayp-jira-rest/Jira.php +++ b/third_party/fayp-jira-rest/Jira.php @@ -523,5 +523,39 @@ public function getCreateIssueMetadata($projectKeys=null,$opt=null) return $items; } - -} \ No newline at end of file + /** + * 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; + } +}