From 7f9028691c646ecc0f2140cce1a9e296001056ae Mon Sep 17 00:00:00 2001 From: root Date: Mon, 1 Nov 2021 16:20:56 +0800 Subject: [PATCH 1/6] Fix bug 15784 --- module/bug/control.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/bug/control.php b/module/bug/control.php index c1015230f9..c58db56959 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -364,6 +364,7 @@ class bug extends control return $this->send($response); } + $executionID = $_POST['execution']; $bugID = $bugResult['id']; if($bugResult['status'] == 'exists') { @@ -402,7 +403,7 @@ class bug extends control if($this->app->tab == 'execution') { - $location = $this->session->bugList ? $this->session->bugList : $this->createLink('execution', 'bug', "executionID={$output['executionID']}"); + $location = $this->createLink('execution', 'bug', "executionID=$executionID"); } elseif($this->app->tab == 'project') { From 01656fd00577a648e61cd13ad4f52d0037f42166 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 1 Nov 2021 16:59:27 +0800 Subject: [PATCH 2/6] Fix bug 15784 --- module/bug/control.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/bug/control.php b/module/bug/control.php index c58db56959..bef2d3e6d9 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -403,7 +403,8 @@ class bug extends control if($this->app->tab == 'execution') { - $location = $this->createLink('execution', 'bug', "executionID=$executionID"); + if(!preg_match("/(m=|\/)execution(&f=|-)bug(&|-|\.)?/", $this->session->bugList)) $location = $this->session->bugList; + else $location = $this->createLink('execution', 'bug', "executionID=$executionID"); } elseif($this->app->tab == 'project') { From 8101f661ab14543698c1b58780d0088eb339d6b1 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 1 Nov 2021 17:01:13 +0800 Subject: [PATCH 3/6] Fix bug 15784 --- module/bug/control.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index bef2d3e6d9..b66185464f 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -403,8 +403,8 @@ class bug extends control if($this->app->tab == 'execution') { - if(!preg_match("/(m=|\/)execution(&f=|-)bug(&|-|\.)?/", $this->session->bugList)) $location = $this->session->bugList; - else $location = $this->createLink('execution', 'bug', "executionID=$executionID"); + if(!preg_match("/(m=|\/)execution(&f=|-)bug(&|-|\.)?/", $this->session->bugList)) $location = $this->session->bugList; + else $location = $this->createLink('execution', 'bug', "executionID=$executionID"); } elseif($this->app->tab == 'project') { From 69287cea2216b71a7b848b4c33a7f33c424b2355 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 1 Nov 2021 17:06:51 +0800 Subject: [PATCH 4/6] Fix bug 15784 --- module/bug/control.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index b66185464f..63849911ca 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -403,8 +403,14 @@ class bug extends control if($this->app->tab == 'execution') { - if(!preg_match("/(m=|\/)execution(&f=|-)bug(&|-|\.)?/", $this->session->bugList)) $location = $this->session->bugList; - else $location = $this->createLink('execution', 'bug', "executionID=$executionID"); + if(!preg_match("/(m=|\/)execution(&f=|-)bug(&|-|\.)?/", $this->session->bugList)) + { + $location = $this->session->bugList; + } + else + { + $location = $this->createLink('execution', 'bug', "executionID=$executionID"); + } } elseif($this->app->tab == 'project') { From 1aac9130a4139d02790c4d0f0fc3fbfb410e6740 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 1 Nov 2021 17:16:28 +0800 Subject: [PATCH 5/6] Fix bug 15784 --- module/bug/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/bug/control.php b/module/bug/control.php index 63849911ca..d4b923ffd2 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -364,7 +364,6 @@ class bug extends control return $this->send($response); } - $executionID = $_POST['execution']; $bugID = $bugResult['id']; if($bugResult['status'] == 'exists') { @@ -409,6 +408,7 @@ class bug extends control } else { + $executionID = $this->post->execution ? $this->post->execution : $output['executionID']; $location = $this->createLink('execution', 'bug', "executionID=$executionID"); } } From 1c4ceda1684fee72982da270cb844bc18f371044 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 1 Nov 2021 17:19:25 +0800 Subject: [PATCH 6/6] Fix bug 15784 --- module/bug/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/bug/control.php b/module/bug/control.php index d4b923ffd2..ffd5a18765 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -409,7 +409,7 @@ class bug extends control else { $executionID = $this->post->execution ? $this->post->execution : $output['executionID']; - $location = $this->createLink('execution', 'bug', "executionID=$executionID"); + $location = $this->createLink('execution', 'bug', "executionID=$executionID"); } } elseif($this->app->tab == 'project')