From f500822991dc71b3f75c334b9d4680cd669285e5 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Mon, 28 Mar 2022 10:11:39 +0800 Subject: [PATCH 1/2] * Fix bug#20875. --- module/bug/view/batchcreate.html.php | 17 ++++++++++++++++- module/common/view/pastetext.html.php | 6 +++++- module/story/view/batchcreate.html.php | 17 ++++++++++++++++- 3 files changed, 37 insertions(+), 3 deletions(-) diff --git a/module/bug/view/batchcreate.html.php b/module/bug/view/batchcreate.html.php index 5e412be2fa..0f6a8bc7a6 100644 --- a/module/bug/view/batchcreate.html.php +++ b/module/bug/view/batchcreate.html.php @@ -17,7 +17,7 @@ bug->batchCreate;?>
- createLink('file', 'uploadImages', 'module=bug¶ms=' . helper::safe64Encode("productID=$productID&executionID=$executionID&moduleID=$moduleID")), $lang->uploadImages, '', "data-toggle='modal' data-type='iframe' class='btn btn-primary' data-width='70%'")?> + createLink('file', 'uploadImages', 'module=bug¶ms=' . helper::safe64Encode("productID=$productID&branch=$branch&executionID=$executionID&moduleID=$moduleID")), $lang->uploadImages, '', "data-toggle='modal' data-type='iframe' class='btn btn-primary' data-width='70%'")?> createLink('custom', 'ajaxSaveCustomFields', 'module=bug§ion=custom&key=batchCreateFields')?> @@ -219,5 +219,20 @@ + + +
';?> + + diff --git a/module/common/view/pastetext.html.php b/module/common/view/pastetext.html.php index 8a34f24345..fe4a62bb10 100644 --- a/module/common/view/pastetext.html.php +++ b/module/common/view/pastetext.html.php @@ -50,7 +50,11 @@ $(function() { line = $.trim(line); if (!line.length) return; - if (!$lastRow) $row = $form.find('tbody>tr:first'); + if (!$lastRow) + { + $row = $form.find('tbody>tr .title-import').first().closest('tr'); + if(!$row && batchForm) $row = batchForm.createRow(); + } else $row = $lastRow.next(); while ($row.length && $row.find('.title-import').val().length) { diff --git a/module/story/view/batchcreate.html.php b/module/story/view/batchcreate.html.php index 61d35f5d4b..9be8c80774 100644 --- a/module/story/view/batchcreate.html.php +++ b/module/story/view/batchcreate.html.php @@ -150,7 +150,7 @@ $(function() $select.next('.chosen-container').find('.chosen-drop').width($select.closest('td').width() + 50); }, 200); }); - var storyTitle = storyTitles && storyTitles[index]; + var storyTitle = storyTitles && storyTitles[index - 1]; if (storyTitle !== undefined && storyTitle !== null) { $row.find('.input-story-title').val(storyTitle).after(''); @@ -172,5 +172,20 @@ $(function() + + +';?> + + From f72da77a5d870a3924623f88267265e9702ecc4e Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Mon, 28 Mar 2022 13:52:42 +0800 Subject: [PATCH 2/2] * Code for bug#20875. --- module/bug/view/batchcreate.html.php | 6 ++++-- module/story/view/batchcreate.html.php | 6 ++++-- module/task/view/batchcreate.html.php | 15 +++++++-------- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/module/bug/view/batchcreate.html.php b/module/bug/view/batchcreate.html.php index 0f6a8bc7a6..7c3e8c87f7 100644 --- a/module/bug/view/batchcreate.html.php +++ b/module/bug/view/batchcreate.html.php @@ -21,6 +21,10 @@ createLink('custom', 'ajaxSaveCustomFields', 'module=bug§ion=custom&key=batchCreateFields')?> + +
+ + @@ -224,12 +228,10 @@ .body-modal .main-header {padding-right: 0px;} .btn-toolbar > .dropdown {margin: 0px;} -';?> diff --git a/module/story/view/batchcreate.html.php b/module/story/view/batchcreate.html.php index 9be8c80774..8a89e14a39 100644 --- a/module/story/view/batchcreate.html.php +++ b/module/story/view/batchcreate.html.php @@ -19,6 +19,10 @@ createLink('custom', 'ajaxSaveCustomFields', 'module=story§ion=custom&key=batchCreateFields')?> + +
+ + .dropdown {margin: 0px;} -';?> diff --git a/module/task/view/batchcreate.html.php b/module/task/view/batchcreate.html.php index 857db49589..d04d94a0ac 100644 --- a/module/task/view/batchcreate.html.php +++ b/module/task/view/batchcreate.html.php @@ -33,7 +33,10 @@ createLink('custom', 'ajaxSaveCustomFields', 'module=task§ion=custom&key=batchCreateFields')?> +
+ + -';?>