From f0c120373fa3a76261c145b57edecd9ddc9b9180 Mon Sep 17 00:00:00 2001 From: Hao Sun Date: Wed, 20 Apr 2022 20:39:04 +0800 Subject: [PATCH 01/16] * fix picker control not initialized in search form. --- module/search/view/buildform.html.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/module/search/view/buildform.html.php b/module/search/view/buildform.html.php index 7af76e8e24..46057353f5 100644 --- a/module/search/view/buildform.html.php +++ b/module/search/view/buildform.html.php @@ -295,6 +295,14 @@ $(function() $chosen.toggleClass('chosen-up', $drop.height() + $drop.offset().top - $(document).scrollTop() > $(window).height()); }); + $searchForm.find('.picker-select').each(function() + { + var $select = $(this); + var pickerOptions = {chosenMode: true} + if($select.attr('data-pickertype') == 'remote') pickerOptions.remote = $select.attr('data-pickerremote'); + $select.picker(pickerOptions); + }); + /* Toggle user queries action. */ $('#toggle-queries').click(function() { From c87d9a96a58415f5813114ca622d8c57d6ce64da Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Thu, 21 Apr 2022 13:15:49 +0800 Subject: [PATCH 02/16] * Fix bug#2598. --- module/story/lang/zh-cn.php | 4 ++-- module/story/lang/zh-tw.php | 4 ++-- module/story/view/edit.html.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/module/story/lang/zh-cn.php b/module/story/lang/zh-cn.php index e0303c441a..e93141a2b5 100644 --- a/module/story/lang/zh-cn.php +++ b/module/story/lang/zh-cn.php @@ -137,8 +137,8 @@ $lang->story->comment = '备注'; $lang->story->children = "子需求"; $lang->story->childrenAB = "子"; $lang->story->linkStories = "相关{$lang->SRCommon}"; -$lang->story->childStories = "细分{$lang->SRCommon}"; -$lang->story->duplicateStory = "重复{$lang->SRCommon}ID"; +$lang->story->childStories = "细分需求"; +$lang->story->duplicateStory = "重复需求ID"; $lang->story->reviewResult = '评审意见'; $lang->story->preVersion = '之前版本'; $lang->story->keywords = '关键词'; diff --git a/module/story/lang/zh-tw.php b/module/story/lang/zh-tw.php index 723d3bbf03..ce380f2a41 100644 --- a/module/story/lang/zh-tw.php +++ b/module/story/lang/zh-tw.php @@ -136,8 +136,8 @@ $lang->story->comment = '備註'; $lang->story->children = "子需求"; $lang->story->childrenAB = "子"; $lang->story->linkStories = "相關{$lang->SRCommon}"; -$lang->story->childStories = "細分{$lang->SRCommon}"; -$lang->story->duplicateStory = "重複{$lang->SRCommon}ID"; +$lang->story->childStories = "細分需求"; +$lang->story->duplicateStory = "重複需求ID"; $lang->story->reviewResult = '評審意見'; $lang->story->preVersion = '之前版本'; $lang->story->keywords = '關鍵詞'; diff --git a/module/story/view/edit.html.php b/module/story/view/edit.html.php index 63fe2c1d49..401800657f 100644 --- a/module/story/view/edit.html.php +++ b/module/story/view/edit.html.php @@ -244,7 +244,7 @@ status == 'closed'):?> - + From 700c7069162c0f30088b223ef674a14131d70bfa Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Thu, 21 Apr 2022 05:33:41 +0000 Subject: [PATCH 03/16] * Fix bug #18266. --- module/doc/css/view.css | 1 + 1 file changed, 1 insertion(+) diff --git a/module/doc/css/view.css b/module/doc/css/view.css index 30c81239a0..10db9ec13d 100644 --- a/module/doc/css/view.css +++ b/module/doc/css/view.css @@ -20,3 +20,4 @@ .doc-fullscreen .fullscreen-btn > .icon-fullscreen:before {content: '\e972';} .right-icon a {color: #1183fb;} .cell th,td {word-break: break-word;} +.main-actions {width: 100% !important;} From 8ec6de5fb5acfd2cea925ad48e193c13d218e40e Mon Sep 17 00:00:00 2001 From: zhouxin Date: Thu, 21 Apr 2022 05:50:05 +0000 Subject: [PATCH 04/16] * Fix bug #2296,#1832. --- module/product/css/view.css | 1 + module/product/view/view.html.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/module/product/css/view.css b/module/product/css/view.css index 71d10b732b..f8860cc652 100644 --- a/module/product/css/view.css +++ b/module/product/css/view.css @@ -9,3 +9,4 @@ td.acl {white-space: nowrap;} .c-openedBy ,.c-acl ,.c-prs ,.c-common {width:110px !important;} .c-bugs ,.c-type {width:120px !important;} .c-release {padding-right: 20px !important;} +.c-feedback {padding-right: 20px !important;} diff --git a/module/product/view/view.html.php b/module/product/view/view.html.php index 21cf06752c..e05d64fdba 100644 --- a/module/product/view/view.html.php +++ b/module/product/view/view.html.php @@ -37,7 +37,7 @@ -
+
product->manager;?>
story->duplicateStory;?>story->duplicateStory;?> duplicateStory == 0 ? '' : $story->duplicateStory, "class='form-control'");?>
From 48ffd9973312a0b1c18740a524914dd0fa017525 Mon Sep 17 00:00:00 2001 From: zhengrunyu Date: Thu, 21 Apr 2022 14:38:38 +0800 Subject: [PATCH 05/16] * Fix api for story USR. --- api/v1/entries/stories.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/v1/entries/stories.php b/api/v1/entries/stories.php index c5f3bf82dd..fa64edb6c2 100644 --- a/api/v1/entries/stories.php +++ b/api/v1/entries/stories.php @@ -54,7 +54,7 @@ class storiesEntry extends entry if(!$productID and isset($this->requestBody->product)) $productID = $this->requestBody->product; if(!$productID) return $this->sendError(400, 'Need product id.'); - $fields = 'title,spec,verify,reviewer,type,parent,plan,module,moduleOptionMenu,source,sourceNote,category,pri,estimate,mailto,keywords,notifyemail,uid'; + $fields = 'title,spec,verify,reviewer,type,parent,plan,module,moduleOptionMenu,source,sourceNote,category,pri,estimate,mailto,keywords,notifyemail,uid,URS'; $this->batchSetPost($fields); /* If reviewer is not post, set needNotReview. */ From 1bc448da584c113971f790a0063ec05e4f3e2382 Mon Sep 17 00:00:00 2001 From: Hao Sun Date: Thu, 21 Apr 2022 14:46:41 +0800 Subject: [PATCH 06/16] * fix cards sorting in kanban column not work. --- www/js/zui/kanban/min.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/js/zui/kanban/min.js b/www/js/zui/kanban/min.js index 9607dc32a0..6552dc91c3 100644 --- a/www/js/zui/kanban/min.js +++ b/www/js/zui/kanban/min.js @@ -1,7 +1,7 @@ /*! - * ZUI: ZUI Kanban View - v1.10.0 - 2022-03-24 + * ZUI: ZUI Kanban View - v1.10.0 - 2022-04-21 * http://openzui.com * GitHub: https://github.com/easysoft/zui.git * Copyright (c) 2022 cnezsoft.com; Licensed MIT */ -!function(){"use strict";function a(a,e){return n&&!e?requestAnimationFrame(a):setTimeout(a,e||0)}function e(a){return n?cancelAnimationFrame(a):void clearTimeout(a)}var n="function"==typeof window.requestAnimationFrame;$.zui({asap:a,clearAsap:e})}(),function(a){"use strict";function e(e,n){"string"==typeof e&&(e=a(e)),e instanceof a&&(e=e[0]);var t=e.getBoundingClientRect(),r=window.innerHeight||document.documentElement.clientHeight,d=window.innerWidth||document.documentElement.clientWidth;if(n)return t.left>=0&&t.top>=0&&t.left+t.width<=d&&t.top+t.height<=r;var i=t.top<=r&&t.top+t.height>=0,o=t.left<=d&&t.left+t.width>=0;return i&&o}var n="zui.virtualRender",t=function(e,r){"function"==typeof r&&(r={render:r});var d=this;d.name=n,d.$=a(e),d.options=r=a.extend({},t.DEFAULTS,this.$.data(),r),d.rendered=!1;var i=r.container;"function"==typeof i&&(i=i(d));var o=a(i?i:window);d.tryRender()||(d.$container=o,d.scrollListener=d.tryRender.bind(d),r.pendingClass&&d.$.addClass(r.pendingClass),o.on("scroll",d.scrollListener))};t.prototype.tryRender=function(){var n=this;return!(n.rendered||!e(n.$))&&(n.renderTaskID&&a.zui.clearAsap(n.renderTaskID),n.renderTaskID=a.zui.asap(function(){n.renderTaskID=null;var a=n.options.render(n.$);a!==!1&&(n.rendered=!0,n.destroy())},n.options.delay),!0)},t.prototype.destroy=function(){var e=this;e.renderTaskID&&a.zui.clearAsap(e.renderTaskID),e.scrollListener&&(e.$container.off("scroll",e.scrollListener),e.scrollListener=null);var t=e.options.pendingClass;t&&e.$.removeClass(t),e.$.removeData(n)},t.DEFAULTS={pendingClass:"virtual-pending"},a.fn.virtualRender=function(e){return this.each(function(){var r=a(this),d=r.data(n);if(d){if("string"==typeof e)return d[e]();d.destroy()}r.data(n,d=new t(this,e))})},a.zui.isElementInViewport=e}(jQuery),function(a){"use strict";var e="zui.kanban",n="object"==typeof CSS&&CSS.supports("display","flex"),t=function(n,r){var d=this;if(d.name=e,d.$=a(n).addClass("kanban"),r=d.setOptions(a.extend({},t.DEFAULTS,this.$.data(),r)),r.onAction){var i=function(e){var n=a(this);r.onAction(n.data("action"),n,e,d)};d.$.on("click",".action",i).on("dblclick",".action-dbc",i)}var o=r.droppable;if("auto"===o&&(o=!r.readonly),o){var s=r.sortable;"function"==typeof s?s={finish:s}:s&&"object"!=typeof s&&(s={});var l=0;"function"==typeof o?o={drop:o}:"object"!=typeof o&&(o={});var c=a.extend({dropOnMouseleave:!0,selector:".kanban-item",target:".kanban-lane-col:not(.kanban-col-sorting)",mouseButton:"left"},o,{before:function(e){if(o.before){var n=o.before(e);if(n===!1)return n}if(s){var t=e.element.closest(".kanban-lane-items");t.closest(".kanban-col").addClass("kanban-col-sorting"),d._sortResult=null,d._$sortItems=t;var r=t.data("zui.sortable");r||t.sortable(a.extend({},s,{selector:".kanban-item",trigger:".kanban-card",dragCssClass:"kanban-item-sorting",noShadow:!0,finish:function(a){a.list.length>1&&(d._sortResult=a)}})).triggerHandler(e.event)}},drop:function(a){o.drop&&o.drop(a),r.onAction&&r.onAction("dropItem",a.element,a,d)},start:function(e){d.$.addClass("kanban-dragging"),l&&clearTimeout(l),l=setTimeout(function(){a(e.shadowElement).addClass("in"),l=0},50),o.start&&o.start(e)},always:function(a){d.$.removeClass("kanban-dragging"),l&&(clearTimeout(l),l=0),s&&(d._$sortItems.sortable("destroy").closest(".kanban-col").removeClass("kanban-col-sorting"),!a.isIn&&d._sortResult&&s.finish&&s.finish(d._sortResult)),o.always&&o.always(a)}});d.$.droppable(c)}r.onCreate&&r.onCreate(d)};t.prototype.setOptions=function(e){var t=this,r=a.extend({},t.options,{data:t.data},e);t.options=r,r.useFlex&&!n&&(r.useFlex=!1),t.$.toggleClass("no-flex",!r.useFlex).toggleClass("use-flex",!!r.useFlex);var d=!!a.fn.virtualRender&&r.virtualize;return d&&("object"!=typeof d&&(d={lane:!0}),t.virtualize=a.extend({},d)),t.data=r.data||[],t.render(t.data),r},t.prototype.render=function(a){var e=this;a&&(e.data=a),e.data&&!Array.isArray(e.data)&&(e.data=[e.data]);var n=e.options,t=e.data||[];n.beforeRender&&n.beforeRender(e,t),e.$.toggleClass("kanban-readonly",!!n.readonly).toggleClass("kanban-no-lane-name",!!n.noLaneName),e.$.children(".kanban-board").addClass("kanban-expired"),e.maxKanbanBoardWidth=0;for(var r=0;r1&&e.$.children(".kanban-board").css("min-width",e.maxKanbanBoardWidth),n.onRender&&n.onRender(e)},t.prototype.layoutKanban=function(a,e){for(var n=this,t=n.options,r=t.noLaneName?0:t.laneNameWidth,d=0,i={},o=!1,s=[],l=0;l0&&t.subLaneSpace&&(k.$height+=t.subLaneSpace)}}else for(var y=k.items||k.cards||{},C=0;C-1){var r=n.data[t];e=a.extend(r,e),n.data[t]=e}else n.data.push(e)}e.id||(e.id=a.zui.uuid());var d=e.id,i=n.options,o=n.$,s=o.children('.kanban-board[data-id="'+d+'"]');s.length?s.removeClass("kanban-expired"):s=a('
').appendTo(o),n.layoutKanban(e,s),n.renderKanbanHeader(e,s),s.children(".kanban-lane").addClass("kanban-expired");for(var l=e.lanes||[],c=0;c
').prependTo(n),r.useFlex||i.addClass("clearfix")),i.css("height",(d?2:1)*r.headerHeight).toggleClass("kanban-header-has-parent",!!d);var o=i.children(".kanban-cols");o.css("left",e.$layout.laneNameWidth).children(".kanban-col").addClass("kanban-expired");for(var s=e.columns,l=e.$layout.columnsMap||{},c=null,u=null,h=0;h.kanban-col").addClass("kanban-expired"):o=a(['
','
','
','','',i.showCount?'':"","
","
",'
',"
","
"].join("")),s&&s.length?s.after(o):n.prepend(o),o.data("col",e).attr("data-type",e.type);var l=r.$layout.columnWidth;i.useFlex?o.css("flex",e.subs.length+" "+e.subs.length+" "+l*e.subs.length+"%"):o.css({width:l*e.subs.length+"%",left:e.$index*l+"%"});var c=o.children(".kanban-header-col");c.find(".title>.icon").attr("class","icon icon-"+(e.icon||""));var u=c.find(".title>.text").text(e.name).attr("title",e.name);if(e.color&&u.css("color",e.color),i.showCount){var h=void 0!==e.count?e.count:e.$cardsCount;i.showZeroCount||h||(h="");var p=c.find(".title>.count").text(h);i.onRenderCount&&i.onRenderCount(p,h,e,d)}i.onRenderHeaderCol&&i.onRenderHeaderCol(o,e,n,r)},t.prototype.renderHeaderCol=function(e,n,t,r,d){var i=this,o=i.options;if(e.parentType&&t){var s=n.children('.kanban-header-parent-col[data-id="'+t.id+'"]');n=s.children(".kanban-header-sub-cols")}var l=n.children('.kanban-header-col[data-id="'+e.id+'"]'),c=r?n.children('.kanban-header-col[data-id="'+r.id+'"]:not(.kanban-expired)'):null;l.length?l.removeClass("kanban-expired"):l=a(['
','
','','',o.showCount?'':"","
",'
',"
"].join("")),c&&c.length?c.after(l):n.prepend(l),l.data("col",e).attr("data-type",e.type);var u=t?100/t.subs.length:d.$layout.columnWidth;o.useFlex?l.css("flex","1 1 "+u+"%"):l.css({left:(t?e.$subIndex:e.$index)*u+"%",width:u+"%"}),l.find(".title>.icon").attr("class","icon icon-"+(e.icon||""));var h=l.find(".title>.text").text(e.name).attr("title",e.name);if(e.color&&h.css("color",e.color),o.showCount){var p=void 0!==e.count?e.count:e.$cardsCount;o.showZeroCount||p||(p="");var b=l.find(".title>.count").text(p);o.onRenderCount&&o.onRenderCount(b,p,e,i)}o.onRenderHeaderCol&&o.onRenderHeaderCol(l,e,n,d)},t.prototype.renderLane=function(e,t,r,d){var i=this,o=i.options;r=r||i.$.children('.kanban-board[data-id="'+e.kanban+'"]');var s=r.children('.kanban-lane[data-id="'+e.id+'"]');s.length?s.removeClass("kanban-expired"):(s=a('
').appendTo(r),n||s.addClass("clearfix"));var l=e.subLanes?e.subLanes.length:0;s.attr("data-index",e.$index).data("lane",e).toggleClass("has-sub-lane",l>0).css({height:e.$height||"auto"}),i.virtualizeRender(d,"lane",s,function(){if(!o.noLaneName){var n=s.children('.kanban-lane-name[data-id="'+e.id+'"]');n.length||(n=a('
').prependTo(s)),n.empty().css("width",o.laneNameWidth).attr("title",e.name).append(a('').text(e.name)),e.color&&n.css("background-color",e.color),o.onRenderLaneName&&o.onRenderLaneName(n,e,r,t,d)}s.children(".kanban-cols,.kanban-sub-lanes").addClass("kanban-expired");var l;l=e.subLanes?i.renderSubLanes(e,t,s,d):i.renderLaneCols(t,e.items||e.cards||{},s,e,d),o.useFlex||l.css("left",d.$layout.laneNameWidth),s.children(".kanban-expired").remove()},{lane:e,columns:t,kanban:d})},t.prototype.virtualizeRender=function(e,n,t,r,d){var i=this,o=i.virtualize,s=o?o[n]:null;return s?("function"==typeof s&&(s=s(d,t)),"number"==typeof s&&t.height(s),void t.virtualRender(a.extend({render:r},i.options.virtualRenderOptions))):r()},t.prototype.renderSubLanes=function(e,n,t,r){var d=this,i=t.children(".kanban-sub-lanes");i.length?i.removeClass("kanban-expired"):i=a('
').appendTo(t),i.children(".kanban-sub-lane").addClass("kanban-expired");for(var o=0;o').appendTo(r),n||o.addClass("clearfix")),o.attr("data-index",i).data("lane",e).css({height:e.$height||"auto"}),o.children(".kanban-col").addClass("kanban-expired");var s=e.items||e.cards;s&&this.renderLaneCols(t,s,o,e,d),o.children(".kanban-expired").remove()},t.prototype.renderLaneCols=function(e,n,t,r,d){var i=this,o=t.children(".kanban-cols");o.length?o.removeClass("kanban-expired"):o=a('
').appendTo(t),o.children(".kanban-col").addClass("kanban-expired");for(var s=null,l=0;l0?e[i-1]:null;o.$index=i,o.$col=a,o.$lane=t,this.renderCard(o,d,s,a,t,r)}var l=a.cardsPerRow||t.cardsPerRow||r.cardsPerRow||this.options.cardsPerRow;d.css("padding",this.options.cardSpace/2).toggleClass("kanban-items-grid",l>1).attr("data-cards-per-row",l),d.children(".kanban-expired").remove()},t.prototype.renderLaneCol=function(e,n,t){var r=this,d=r.options,i=n.children('.kanban-lane-col[data-id="'+e.id+'"]'),o=t?n.children('.kanban-lane-col[data-id="'+t.id+'"]:not(.kanban-expired)'):null;i.length?i.removeClass("kanban-expired"):(i=a(['
','
',"
"].join("")),r.options.readonly||i.append(['
','","
"].join("")),d.laneItemsClass&&i.find(".kanban-lane-items").addClass(d.laneItemsClass),d.laneColClass&&i.addClass(d.laneColClass)),o&&o.length?o.after(i):n.prepend(i),i.attr({"data-parent":e.parentType?e.parentType:null,"data-type":e.type}).data("col",e);var s=e.$kanbanData.$layout.columnWidth;return d.useFlex?i.css("flex","1 1 "+s+"%"):i.css({left:e.$index*s+"%",width:s+"%"}),i},t.prototype.renderCard=function(e,n,t,r,d,i){var o=this.options,s=n.children('.kanban-item[data-id="'+e.id+'"]'),l=t?n.children('.kanban-item[data-id="'+t.id+'"]:not(.kanban-expired)'):null;s.length?s.removeClass("kanban-expired"):(s=a('
'),o.wrapCard&&s.append('
')),l&&l.length?l.after(s):n.prepend(s);var c=r.cardsPerRow||d.cardsPerRow||i.cardsPerRow||o.cardsPerRow;s.data("item",e).css({padding:o.cardSpace/2,width:c>1?100/c+"%":""});var u=o.wrapCard?s.children(".kanban-card"):s;u.css("height",o.cardHeight);var h=o.cardRender||o.itemRender;if(h)h(e,u,r,d,i);else{var p=u.find(".title");p.length||(p=a('
').appendTo(u)),p.text(e.name||e.title)}return u},t.DEFAULTS={minColWidth:100,maxColHeight:400,minColHeight:90,minSubColHeight:40,subLaneSpace:2,laneNameWidth:20,headerHeight:32,cardHeight:40,cardSpace:10,cardsPerRow:1,wrapCard:!0,fluidBoardWidth:!0,addItemText:"添加条目",useFlex:!0,droppable:"auto",laneColClass:"",showCount:!0},a.fn.kanban=function(n){return this.each(function(){var r=a(this),d=r.data(e),i="object"==typeof n&&n;d||r.data(e,d=new t(this,i)),"string"==typeof n&&d[n]()})},t.NAME=e,a.fn.kanban.Constructor=t}(jQuery); \ No newline at end of file +!function(){"use strict";function a(a,e){return n&&!e?requestAnimationFrame(a):setTimeout(a,e||0)}function e(a){return n?cancelAnimationFrame(a):void clearTimeout(a)}var n="function"==typeof window.requestAnimationFrame;$.zui({asap:a,clearAsap:e})}(),function(a){"use strict";function e(e,n){"string"==typeof e&&(e=a(e)),e instanceof a&&(e=e[0]);var t=e.getBoundingClientRect(),r=window.innerHeight||document.documentElement.clientHeight,d=window.innerWidth||document.documentElement.clientWidth;if(n)return t.left>=0&&t.top>=0&&t.left+t.width<=d&&t.top+t.height<=r;var i=t.top<=r&&t.top+t.height>=0,o=t.left<=d&&t.left+t.width>=0;return i&&o}var n="zui.virtualRender",t=function(e,r){"function"==typeof r&&(r={render:r});var d=this;d.name=n,d.$=a(e),d.options=r=a.extend({},t.DEFAULTS,this.$.data(),r),d.rendered=!1;var i=r.container;"function"==typeof i&&(i=i(d));var o=a(i?i:window);d.tryRender()||(d.$container=o,d.scrollListener=d.tryRender.bind(d),r.pendingClass&&d.$.addClass(r.pendingClass),o.on("scroll",d.scrollListener))};t.prototype.tryRender=function(){var n=this;return!(n.rendered||!e(n.$))&&(n.renderTaskID&&a.zui.clearAsap(n.renderTaskID),n.renderTaskID=a.zui.asap(function(){n.renderTaskID=null;var a=n.options.render(n.$);a!==!1&&(n.rendered=!0,n.destroy())},n.options.delay),!0)},t.prototype.destroy=function(){var e=this;e.renderTaskID&&a.zui.clearAsap(e.renderTaskID),e.scrollListener&&(e.$container.off("scroll",e.scrollListener),e.scrollListener=null);var t=e.options.pendingClass;t&&e.$.removeClass(t),e.$.removeData(n)},t.DEFAULTS={pendingClass:"virtual-pending"},a.fn.virtualRender=function(e){return this.each(function(){var r=a(this),d=r.data(n);if(d){if("string"==typeof e)return d[e]();d.destroy()}r.data(n,d=new t(this,e))})},a.zui.isElementInViewport=e}(jQuery),function(a){"use strict";var e="zui.kanban",n="object"==typeof CSS&&CSS.supports("display","flex"),t=function(n,r){var d=this;if(d.name=e,d.$=a(n).addClass("kanban"),r=d.setOptions(a.extend({},t.DEFAULTS,this.$.data(),r)),r.onAction){var i=function(e){var n=a(this);r.onAction(n.data("action"),n,e,d)};d.$.on("click",".action",i).on("dblclick",".action-dbc",i)}var o=r.droppable;if("auto"===o&&(o=!r.readonly),o){var s=r.sortable;"function"==typeof s?s={finish:s}:s&&"object"!=typeof s&&(s={});var l=0;"function"==typeof o?o={drop:o}:"object"!=typeof o&&(o={});var c=a.extend({dropOnMouseleave:!0,selector:".kanban-item",target:".kanban-lane-col:not(.kanban-col-sorting)",mouseButton:"left"},o,{before:function(e){if(o.before){var n=o.before(e);if(n===!1)return n}if(s){var t=e.element.closest(".kanban-lane-items");t.closest(".kanban-col").addClass("kanban-col-sorting"),d._sortResult=null,d._$sortItems=t;var r=t.data("zui.sortable");r||t.sortable(a.extend({},s,{selector:".kanban-item",trigger:".kanban-card",dragCssClass:"kanban-item-sorting",noShadow:!0,finish:function(a){a.changed&&a.list.length>1&&(d._sortResult=a)}})).triggerHandler(e.event)}},drop:function(a){o.drop&&o.drop(a),r.onAction&&r.onAction("dropItem",a.element,a,d)},start:function(e){d.$.addClass("kanban-dragging"),l&&clearTimeout(l),l=setTimeout(function(){a(e.shadowElement).addClass("in"),l=0},50),o.start&&o.start(e)},always:function(a){d.$.removeClass("kanban-dragging"),l&&(clearTimeout(l),l=0),s&&(d._$sortItems.sortable("destroy").closest(".kanban-col").removeClass("kanban-col-sorting"),a.target[0]===a.element.closest(".kanban-lane-col")[0]&&d._sortResult&&s.finish&&s.finish(d._sortResult)),o.always&&o.always(a)}});d.$.droppable(c)}r.onCreate&&r.onCreate(d)};t.prototype.setOptions=function(e){var t=this,r=a.extend({},t.options,{data:t.data},e);t.options=r,r.useFlex&&!n&&(r.useFlex=!1),t.$.toggleClass("no-flex",!r.useFlex).toggleClass("use-flex",!!r.useFlex);var d=!!a.fn.virtualRender&&r.virtualize;return d&&("object"!=typeof d&&(d={lane:!0}),t.virtualize=a.extend({},d)),t.data=r.data||[],t.render(t.data),r},t.prototype.render=function(a){var e=this;a&&(e.data=a),e.data&&!Array.isArray(e.data)&&(e.data=[e.data]);var n=e.options,t=e.data||[];n.beforeRender&&n.beforeRender(e,t),e.$.toggleClass("kanban-readonly",!!n.readonly).toggleClass("kanban-no-lane-name",!!n.noLaneName),e.$.children(".kanban-board").addClass("kanban-expired"),e.maxKanbanBoardWidth=0;for(var r=0;r1&&e.$.children(".kanban-board").css("min-width",e.maxKanbanBoardWidth),n.onRender&&n.onRender(e)},t.prototype.layoutKanban=function(a,e){for(var n=this,t=n.options,r=t.noLaneName?0:t.laneNameWidth,d=0,i={},o=!1,s=[],l=0;l0&&t.subLaneSpace&&(k.$height+=t.subLaneSpace)}}else for(var y=k.items||k.cards||{},C=0;C-1){var r=n.data[t];e=a.extend(r,e),n.data[t]=e}else n.data.push(e)}e.id||(e.id=a.zui.uuid());var d=e.id,i=n.options,o=n.$,s=o.children('.kanban-board[data-id="'+d+'"]');s.length?s.removeClass("kanban-expired"):s=a('
').appendTo(o),n.layoutKanban(e,s),n.renderKanbanHeader(e,s),s.children(".kanban-lane").addClass("kanban-expired");for(var l=e.lanes||[],c=0;c
').prependTo(n),r.useFlex||i.addClass("clearfix")),i.css("height",(d?2:1)*r.headerHeight).toggleClass("kanban-header-has-parent",!!d);var o=i.children(".kanban-cols");o.css("left",e.$layout.laneNameWidth).children(".kanban-col").addClass("kanban-expired");for(var s=e.columns,l=e.$layout.columnsMap||{},c=null,u=null,h=0;h.kanban-col").addClass("kanban-expired"):o=a(['
','
','
','','',i.showCount?'':"","
","
",'
',"
","
"].join("")),s&&s.length?s.after(o):n.prepend(o),o.data("col",e).attr("data-type",e.type);var l=r.$layout.columnWidth;i.useFlex?o.css("flex",e.subs.length+" "+e.subs.length+" "+l*e.subs.length+"%"):o.css({width:l*e.subs.length+"%",left:e.$index*l+"%"});var c=o.children(".kanban-header-col");c.find(".title>.icon").attr("class","icon icon-"+(e.icon||""));var u=c.find(".title>.text").text(e.name).attr("title",e.name);if(e.color&&u.css("color",e.color),i.showCount){var h=void 0!==e.count?e.count:e.$cardsCount;i.showZeroCount||h||(h="");var p=c.find(".title>.count").text(h);i.onRenderCount&&i.onRenderCount(p,h,e,d)}i.onRenderHeaderCol&&i.onRenderHeaderCol(o,e,n,r)},t.prototype.renderHeaderCol=function(e,n,t,r,d){var i=this,o=i.options;if(e.parentType&&t){var s=n.children('.kanban-header-parent-col[data-id="'+t.id+'"]');n=s.children(".kanban-header-sub-cols")}var l=n.children('.kanban-header-col[data-id="'+e.id+'"]'),c=r?n.children('.kanban-header-col[data-id="'+r.id+'"]:not(.kanban-expired)'):null;l.length?l.removeClass("kanban-expired"):l=a(['
','
','','',o.showCount?'':"","
",'
',"
"].join("")),c&&c.length?c.after(l):n.prepend(l),l.data("col",e).attr("data-type",e.type);var u=t?100/t.subs.length:d.$layout.columnWidth;o.useFlex?l.css("flex","1 1 "+u+"%"):l.css({left:(t?e.$subIndex:e.$index)*u+"%",width:u+"%"}),l.find(".title>.icon").attr("class","icon icon-"+(e.icon||""));var h=l.find(".title>.text").text(e.name).attr("title",e.name);if(e.color&&h.css("color",e.color),o.showCount){var p=void 0!==e.count?e.count:e.$cardsCount;o.showZeroCount||p||(p="");var b=l.find(".title>.count").text(p);o.onRenderCount&&o.onRenderCount(b,p,e,i)}o.onRenderHeaderCol&&o.onRenderHeaderCol(l,e,n,d)},t.prototype.renderLane=function(e,t,r,d){var i=this,o=i.options;r=r||i.$.children('.kanban-board[data-id="'+e.kanban+'"]');var s=r.children('.kanban-lane[data-id="'+e.id+'"]');s.length?s.removeClass("kanban-expired"):(s=a('
').appendTo(r),n||s.addClass("clearfix"));var l=e.subLanes?e.subLanes.length:0;s.attr("data-index",e.$index).data("lane",e).toggleClass("has-sub-lane",l>0).css({height:e.$height||"auto"}),i.virtualizeRender(d,"lane",s,function(){if(!o.noLaneName){var n=s.children('.kanban-lane-name[data-id="'+e.id+'"]');n.length||(n=a('
').prependTo(s)),n.empty().css("width",o.laneNameWidth).attr("title",e.name).append(a('').text(e.name)),e.color&&n.css("background-color",e.color),o.onRenderLaneName&&o.onRenderLaneName(n,e,r,t,d)}s.children(".kanban-cols,.kanban-sub-lanes").addClass("kanban-expired");var l;l=e.subLanes?i.renderSubLanes(e,t,s,d):i.renderLaneCols(t,e.items||e.cards||{},s,e,d),o.useFlex||l.css("left",d.$layout.laneNameWidth),s.children(".kanban-expired").remove()},{lane:e,columns:t,kanban:d})},t.prototype.virtualizeRender=function(e,n,t,r,d){var i=this,o=i.virtualize,s=o?o[n]:null;return s?("function"==typeof s&&(s=s(d,t)),"number"==typeof s&&t.height(s),void t.virtualRender(a.extend({render:r},i.options.virtualRenderOptions))):r()},t.prototype.renderSubLanes=function(e,n,t,r){var d=this,i=t.children(".kanban-sub-lanes");i.length?i.removeClass("kanban-expired"):i=a('
').appendTo(t),i.children(".kanban-sub-lane").addClass("kanban-expired");for(var o=0;o').appendTo(r),n||o.addClass("clearfix")),o.attr("data-index",i).data("lane",e).css({height:e.$height||"auto"}),o.children(".kanban-col").addClass("kanban-expired");var s=e.items||e.cards;s&&this.renderLaneCols(t,s,o,e,d),o.children(".kanban-expired").remove()},t.prototype.renderLaneCols=function(e,n,t,r,d){var i=this,o=t.children(".kanban-cols");o.length?o.removeClass("kanban-expired"):o=a('
').appendTo(t),o.children(".kanban-col").addClass("kanban-expired");for(var s=null,l=0;l0?e[i-1]:null;o.$index=i,o.$col=a,o.$lane=t,this.renderCard(o,d,s,a,t,r)}var l=a.cardsPerRow||t.cardsPerRow||r.cardsPerRow||this.options.cardsPerRow;d.css("padding",this.options.cardSpace/2).toggleClass("kanban-items-grid",l>1).attr("data-cards-per-row",l),d.children(".kanban-expired").remove()},t.prototype.renderLaneCol=function(e,n,t){var r=this,d=r.options,i=n.children('.kanban-lane-col[data-id="'+e.id+'"]'),o=t?n.children('.kanban-lane-col[data-id="'+t.id+'"]:not(.kanban-expired)'):null;i.length?i.removeClass("kanban-expired"):(i=a(['
','
',"
"].join("")),r.options.readonly||i.append(['
','","
"].join("")),d.laneItemsClass&&i.find(".kanban-lane-items").addClass(d.laneItemsClass),d.laneColClass&&i.addClass(d.laneColClass)),o&&o.length?o.after(i):n.prepend(i),i.attr({"data-parent":e.parentType?e.parentType:null,"data-type":e.type}).data("col",e);var s=e.$kanbanData.$layout.columnWidth;return d.useFlex?i.css("flex","1 1 "+s+"%"):i.css({left:e.$index*s+"%",width:s+"%"}),i},t.prototype.renderCard=function(e,n,t,r,d,i){var o=this.options,s=n.children('.kanban-item[data-id="'+e.id+'"]'),l=t?n.children('.kanban-item[data-id="'+t.id+'"]:not(.kanban-expired)'):null;s.length?s.removeClass("kanban-expired"):(s=a('
'),o.wrapCard&&s.append('
')),l&&l.length?l.after(s):n.prepend(s);var c=r.cardsPerRow||d.cardsPerRow||i.cardsPerRow||o.cardsPerRow;s.data("item",e).css({padding:o.cardSpace/2,width:c>1?100/c+"%":""});var u=o.wrapCard?s.children(".kanban-card"):s;u.css("height",o.cardHeight);var h=o.cardRender||o.itemRender;if(h)h(e,u,r,d,i);else{var p=u.find(".title");p.length||(p=a('
').appendTo(u)),p.text(e.name||e.title)}return u},t.DEFAULTS={minColWidth:100,maxColHeight:400,minColHeight:90,minSubColHeight:40,subLaneSpace:2,laneNameWidth:20,headerHeight:32,cardHeight:40,cardSpace:10,cardsPerRow:1,wrapCard:!0,fluidBoardWidth:!0,addItemText:"添加条目",useFlex:!0,droppable:"auto",laneColClass:"",showCount:!0},a.fn.kanban=function(n){return this.each(function(){var r=a(this),d=r.data(e),i="object"==typeof n&&n;d||r.data(e,d=new t(this,i)),"string"==typeof n&&d[n]()})},t.NAME=e,a.fn.kanban.Constructor=t}(jQuery); \ No newline at end of file From 2dc575a7609856d47dcceecc75dbbaf8f81bc10e Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Thu, 21 Apr 2022 14:53:38 +0800 Subject: [PATCH 07/16] * Fix bug #11074. --- module/testtask/model.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/testtask/model.php b/module/testtask/model.php index c56e78032c..0c44197e46 100644 --- a/module/testtask/model.php +++ b/module/testtask/model.php @@ -1704,7 +1704,8 @@ class testtaskModel extends model elseif(!isset($existCases[$case->title])) { $this->dao->insert(TABLE_CASE)->data($case, 'steps')->exec(); - $caseID = $this->dao->lastInsertID(); + $caseID = $this->dao->lastInsertID(); + $case->steps = isset($case->steps) ? $case->steps : array(); foreach($case->steps as $caseStep) { $caseStep->case = $caseID; From 5f5cc8768e95e1cafb34eac7a77c2d1571079f5d Mon Sep 17 00:00:00 2001 From: mayue Date: Thu, 21 Apr 2022 15:04:59 +0800 Subject: [PATCH 08/16] * Fix bug #21904. --- module/branch/model.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/module/branch/model.php b/module/branch/model.php index ff54cb859b..6e87a07734 100644 --- a/module/branch/model.php +++ b/module/branch/model.php @@ -753,7 +753,9 @@ class branchModel extends model ->andWhere('product')->eq($productID) ->fetchGroup('project'); - $this->dao->delete()->from(TABLE_PROJECTPRODUCT)->where('branch')->in($mergedBranches . ",$targetBranch")->exec(); + $this->dao->delete()->from(TABLE_PROJECTPRODUCT)->where('branch')->in($mergedBranches . ",$targetBranch") + ->andWhere('product')->eq($productID) + ->exec(); foreach($linkedProject as $projectID => $projectProducts) { $plan = 0; From 7ae35d4a12f15c8ce2b7636a96559b6969c45c63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=80=A1=E6=A0=8B?= Date: Thu, 21 Apr 2022 15:38:33 +0800 Subject: [PATCH 09/16] * fix bug #21806. --- module/execution/config.php | 6 ++ module/execution/lang/en.php | 12 ++++ module/execution/lang/zh-cn.php | 12 ++++ module/programplan/control.php | 2 +- module/programplan/model.php | 34 +++++++--- module/programplan/view/gantt.html.php | 87 +++++++++++++++++--------- 6 files changed, 112 insertions(+), 41 deletions(-) diff --git a/module/execution/config.php b/module/execution/config.php index 0c20808ff2..a0d653269c 100644 --- a/module/execution/config.php +++ b/module/execution/config.php @@ -129,3 +129,9 @@ $config->execution->kanbanSetting->colorList['pause'] = '#fdc137'; $config->execution->kanbanSetting->colorList['done'] = '#0BD986'; $config->execution->kanbanSetting->colorList['cancel'] = '#CBD0DB'; $config->execution->kanbanSetting->colorList['closed'] = '#838A9D'; + +$config->execution->gantt = new stdclass(); +$config->execution->gantt->linkType['end']['begin'] = 0; +$config->execution->gantt->linkType['begin']['begin'] = 1; +$config->execution->gantt->linkType['end']['end'] = 2; +$config->execution->gantt->linkType['begin']['end'] = 3; diff --git a/module/execution/lang/en.php b/module/execution/lang/en.php index fdbb61d59d..c9aa6aa2f0 100644 --- a/module/execution/lang/en.php +++ b/module/execution/lang/en.php @@ -477,4 +477,16 @@ $lang->execution->statusColorList['doing'] = '#0BD986'; $lang->execution->statusColorList['suspended'] = '#fdc137'; $lang->execution->statusColorList['closed'] = '#838A9D'; +if(!isset($lang->execution->gantt)) $lang->execution->gantt = new stdclass(); +$lang->execution->gantt->color[0] = 'bbb'; +$lang->execution->gantt->color[1] = 'ff5d5d'; +$lang->execution->gantt->color[2] = 'ff9800'; +$lang->execution->gantt->color[3] = '16a8f8'; +$lang->execution->gantt->color[4] = '00da88'; + +$lang->execution->gantt->exportImg = 'Export as Image'; +$lang->execution->gantt->exportPDF = 'Export as PDF'; +$lang->execution->gantt->exporting = 'Exporting...'; +$lang->execution->gantt->exportFail = 'Failed to export.'; + $lang->execution->boardColorList = array('#32C5FF', '#006AF1', '#9D28B2', '#FF8F26', '#7FBB00', '#424BAC', '#66c5f8', '#EC2761'); diff --git a/module/execution/lang/zh-cn.php b/module/execution/lang/zh-cn.php index c896f7b8ae..990d41a1f6 100644 --- a/module/execution/lang/zh-cn.php +++ b/module/execution/lang/zh-cn.php @@ -477,4 +477,16 @@ $lang->execution->statusColorList['doing'] = '#0BD986'; $lang->execution->statusColorList['suspended'] = '#fdc137'; $lang->execution->statusColorList['closed'] = '#838A9D'; +if(!isset($lang->execution->gantt)) $lang->execution->gantt = new stdclass(); +$lang->execution->gantt->color[0] = 'bbb'; +$lang->execution->gantt->color[1] = 'ff5d5d'; +$lang->execution->gantt->color[2] = 'ff9800'; +$lang->execution->gantt->color[3] = '16a8f8'; +$lang->execution->gantt->color[4] = '00da88'; + +$lang->execution->gantt->exportImg = '导出图片'; +$lang->execution->gantt->exportPDF = '导出 PDF'; +$lang->execution->gantt->exporting = '正在导出……'; +$lang->execution->gantt->exportFail = '导出失败。'; + $lang->execution->boardColorList = array('#32C5FF', '#006AF1', '#9D28B2', '#FF8F26', '#7FBB00', '#424BAC', '#66c5f8', '#EC2761'); diff --git a/module/programplan/control.php b/module/programplan/control.php index 2e57c04a49..08884b9877 100644 --- a/module/programplan/control.php +++ b/module/programplan/control.php @@ -83,7 +83,7 @@ class programplan extends control $selectCustom = $this->loadModel('setting')->getItem("owner={$owner}&module={$module}§ion={$section}&key={$object}"); if(strpos($selectCustom, 'date') !== false) $dateDetails = 0; - $plans = $this->programplan->getDataForGantt($projectID, $this->productID, $baselineID); + $plans = $this->programplan->getDataForGantt($projectID, $this->productID, $baselineID, $selectCustom, false); } if($type == 'lists') diff --git a/module/programplan/model.php b/module/programplan/model.php index 61d5044520..89fe560112 100644 --- a/module/programplan/model.php +++ b/module/programplan/model.php @@ -169,12 +169,12 @@ class programplanModel extends model } $datas = array(); - $planIDList = array(); + $planIdList = array(); $isMilestone = " "; $stageIndex = array(); foreach($plans as $plan) { - $planIDList[$plan->id] = $plan->id; + $planIdList[$plan->id] = $plan->id; $start = helper::isZeroDate($plan->begin) ? '' : $plan->begin; $end = helper::isZeroDate($plan->end) ? '' : $plan->end; @@ -216,10 +216,7 @@ class programplanModel extends model if(empty($selectCustom)) $selectCustom = $this->loadModel('setting')->getItem("owner={$owner}&module={$module}§ion={$section}&key={$object}"); $tasks = array(); - if(strpos($selectCustom, 'task') !== false) - { - $tasks = $this->dao->select('*')->from(TABLE_TASK)->where('deleted')->eq(0)->andWhere('execution')->in($planIDList)->fetchAll('id'); - } + if(strpos($selectCustom, 'task') !== false) $tasks = $this->dao->select('*')->from(TABLE_TASK)->where('deleted')->eq(0)->andWhere('execution')->in($planIdList)->fetchAll('id'); if($baselineID) { @@ -254,10 +251,12 @@ class programplanModel extends model $data->deadline = $end; $data->realBegan = $realBegan; $data->realEnd = $realEnd; + $data->pri = $task->pri; $data->parent = $task->parent > 0 ? $task->execution . '-' . $task->parent : $task->execution; $data->open = true; - $progress = $task->consumed ? round($task->consumed / ($task->left + $task->consumed), 3) * 100 : 0; - $data->taskProgress = $progress . '%'; + $progress = $task->consumed ? round($task->consumed / ($task->left + $task->consumed), 3) : 0; + $data->progress = $progress; + $data->taskProgress = ($progress * 100) . '%'; $data->start_date = $data->realBegan ? $data->realBegan : $data->begin; $data->endDate = $data->realEnd ? $data->realEnd : $data->deadline; $data->duration = 0; @@ -280,11 +279,26 @@ class programplanModel extends model /* Calculate the progress of the phase. */ foreach($stageIndex as $index => $stage) { - $progress = empty($stage['progress']['totalConsumed']) ? 0 : round($stage['progress']['totalConsumed'] / $stage['progress']['totalReal'], 3) * 100; - $progress .= '%'; + $progress = empty($stage['progress']['totalConsumed']) ? 0 : round($stage['progress']['totalConsumed'] / $stage['progress']['totalReal'], 3); + $datas['data'][$index]->progress = $progress; + + $progress = ($progress * 100) . '%'; $datas['data'][$index]->taskProgress = $progress; } + $datas['links'] = array(); + if($this->config->edition != 'open') + { + $relations = $this->dao->select('*')->from(TABLE_RELATIONOFTASKS)->where('execution')->in($planIdList)->orderBy('task,pretask')->fetchAll(); + foreach($relations as $relation) + { + $link['source'] = $relation->execution . '-' . $relation->pretask; + $link['target'] = $relation->execution . '-' . $relation->task; + $link['type'] = $this->config->execution->gantt->linkType[$relation->condition][$relation->action]; + $datas['links'][] = $link; + } + } + return $returnJson ? json_encode($datas) : $datas; } diff --git a/module/programplan/view/gantt.html.php b/module/programplan/view/gantt.html.php index aa84cbe895..741570d644 100644 --- a/module/programplan/view/gantt.html.php +++ b/module/programplan/view/gantt.html.php @@ -22,11 +22,34 @@ .gantt_task_content{display: none;} .checkbox-primary {margin-top: 0px; margin-left: 10px;} form {display: block; margin-top: 0em; margin-block-end: 1em;} - -.gantt_grid .gantt_grid_scale{width:100% !important;} -.gantt_grid .gantt_grid_data{width:100% !important;} -.gantt_grid .gantt_grid_data .gantt_row{width:100% !important;} - +.gantt_task_progress {background: rgba(0,0,0,.1)} +#ganttPris > span {display: inline-block; line-height: 20px; min-width: 20px; border-radius: 2px;} +.gantt_task_line {background: #execution->gantt->color[0]?>; border-color: #execution->gantt->color[0]?>;} +.gantt_task_line.pri-1 {background: #execution->gantt->color[1]?>; border-color: #execution->gantt->color[1]?>} +.gantt_task_line.pri-2 {background: #execution->gantt->color[2]?>; border-color: #execution->gantt->color[2]?>} +.gantt_task_line.pri-3 {background: #execution->gantt->color[3]?>; border-color: #execution->gantt->color[3]?>} +.gantt_task_line.pri-4 {background: #execution->gantt->color[4]?>; border-color: #execution->gantt->color[4]?>} +.gantt_task_line.gantt_selected {box-shadow: 0 1px 1px rgba(0,0,0,.05), 0 2px 6px 0 rgba(0,0,0,.045)} +.gantt_link_arrow_right {border-left-color: #2196F3;} +.gantt_link_arrow_left {border-right-color: #2196F3;} +.gantt_task_link .gantt_line_wrapper div{background-color: #2196F3;} +.gantt_critical_link .gantt_line_wrapper>div {background-color: #e63030 !important;} +.gantt_critical_link.start_to_start .gantt_link_arrow_right {border-left-color: #e63030 !important;} +.gantt_critical_link.finish_to_start .gantt_link_arrow_right {border-left-color: #e63030 !important;} +.gantt_critical_link.start_to_finish .gantt_link_arrow_left {border-right-color: #e63030 !important;} +.gantt_critical_link.finish_to_finish .gantt_link_arrow_left {border-right-color: #e63030 !important;} +.gantt_task_link.start_to_start .gantt_line_wrapper div { background-color: #DD55EA; } +.gantt_task_link.start_to_start:hover .gantt_line_wrapper div { box-shadow: 0 0 5px 0px #DD55EA; } +.gantt_task_link.start_to_start .gantt_link_arrow_right { border-left-color: #DD55EA; } +.gantt_task_link.finish_to_start .gantt_line_wrapper div { background-color: #7576ba; } +.gantt_task_link.finish_to_start:hover .gantt_line_wrapper div { box-shadow: 0 0 5px 0px #7576ba; } +.gantt_task_link.finish_to_start .gantt_link_arrow_right { border-left-color: #7576ba; } +.gantt_task_link.finish_to_finish .gantt_line_wrapper div { background-color: #55d822; } +.gantt_task_link.finish_to_finish:hover .gantt_line_wrapper div { box-shadow: 0 0 5px 0px #55d822; } +.gantt_task_link.finish_to_finish .gantt_link_arrow_left { border-right-color: #55d822; } +.gantt_task_link.start_to_finish .gantt_line_wrapper div { background-color: #975000; } +.gantt_task_link.start_to_finish:hover .gantt_line_wrapper div { box-shadow: 0 0 5px 0px #975000; } +.gantt_task_link.start_to_finish .gantt_link_arrow_left { border-right-color: #975000; } createLink('programplan', 'ajaxCustom'));?> @@ -35,9 +58,15 @@ form {display: block; margin-top: 0em; margin-block-end: 1em;}
- programplan->full, 'id="fullScreenBtn"', 'btn btn-primary btn-sm')?> - rawModule == 'review' and $app->rawMethod == 'assess') unset($lang->programplan->stageCustom->date); ?> - programplan->stageCustom, $selectCustom);?> + programplan->full, 'id="fullScreenBtn"', 'btn btn-primary btn-sm')?> + rawModule == 'review' and $app->rawMethod == 'assess') unset($lang->programplan->stageCustom->date); ?> + programplan->stageCustom, $selectCustom);?> +
@@ -75,15 +104,14 @@ function drawGanttToCanvas(exportType, successCallback, errorCallback) var $ganttContainer = $('#ganttContainer'); var $ganttDataArea = $ganttView.find('.gantt_data_area'); var $ganttDridData = $ganttView.find('.gantt_grid_data'); - var ganttHeight = $ganttView.find('.gantt_task_bg').outerHeight() + $ganttView.find('.gantt_grid_scale').outerHeight() + 1; + + var ganttHeight = $ganttView.find('.gantt_grid_scale').outerHeight(); + ganttHeight += * 25; var ganttWidth = $ganttDridData.width() - 100; - var ganttHeight = $ganttView.find('.gantt_grid_scale').outerHeight(); - $ganttDridData.find('.gantt_row').each(function() {ganttHeight += $(this).outerHeight();}); - var ganttWidth = $ganttDataArea.outerWidth() + $ganttDridData.outerWidth(); - var ganttHeight = $ganttView.find('.gantt_task_bg').outerHeight() + $ganttView.find('.gantt_grid_scale').outerHeight() + 1; + var ganttWidth = $ganttDataArea.outerWidth() + $ganttDridData.outerWidth(); $ganttContainer.css( @@ -245,13 +273,14 @@ function updateCriticalPath() $("#fullScreenBtn").on("click", function() { - $("#mainContent").css("z-index", "9999"); - $("#ganttView").css("z-index", "9999"); + $("#mainContent").css("z-index", "5"); + $("#ganttView").css("z-index", "5"); }); function exitHandler() { - if (module == 'review' && method == 'assess' && !document.fullscreenElement && !document.webkitIsFullScreen && !document.mozFullScreen && !document.msFullscreenElement) { + if (module == 'review' && method == 'assess' && !document.fullscreenElement && !document.webkitIsFullScreen && !document.mozFullScreen && !document.msFullscreenElement) + { location.reload(); } } @@ -268,7 +297,7 @@ $(function() $('#ganttView').css('height', Math.max(200, Math.floor($(window).height() - $('#footer').outerHeight() - $('#header').outerHeight() - $('#mainMenu').outerHeight() - 80))); }; - var ganttData = $.parseJSON(); + var ganttData = $.parseJSON(); if(!ganttData.data) ganttData.data = []; gantt.config.readonly = true; @@ -304,19 +333,7 @@ $(function() if((module == 'review' && method == 'assess') || dateDetails) { - layout = gantt.config.layout; - - gantt.config.layout = { - css: "gantt_container", - cols: [ - { - rows:[ - {view: "grid", scrollX: "gridScroll", scrollable: true, scrollY: "scrollVer"}, - {view: "scrollbar", id: "gridScroll", group:"horizontal"} - ] - } - ] - }; + gantt.config.show_chart = false; } var date2Str = gantt.date.date_to_str(gantt.config.task_date); @@ -329,11 +346,21 @@ $(function() title: todayTips + ": " + date2Str(today) }); + gantt.templates.task_class = function(start, end, task){return 'pri-' + (task.pri || 0);}; gantt.templates.scale_cell_class = function(date) { if(date.getDay() == 0 || date.getDay() == 6) return 'weekend'; }; + gantt.templates.link_class = function(link) + { + var types = gantt.config.links; + if(link.type == types.finish_to_start) return 'finish_to_start'; + if(link.type == types.start_to_start) return 'start_to_start'; + if(link.type == types.finish_to_finish) return 'finish_to_finish'; + if(link.type == types.start_to_finish) return 'start_to_finish'; + }; + gantt.templates.timeline_cell_class = function(item, date) { if(date.getDay() == 0 || date.getDay() == 6) return 'weekend'; From edbc8e5d0b4c0391406956a22ae232e146de5f3d Mon Sep 17 00:00:00 2001 From: tianshujie Date: Thu, 21 Apr 2022 15:52:57 +0800 Subject: [PATCH 10/16] * Fix bug #18060. --- module/product/model.php | 1 + module/testcase/control.php | 4 +- module/testcase/css/showimport.css | 2 + module/testcase/js/batchcreate.js | 35 --- module/testcase/js/common.js | 35 +++ module/testcase/js/showimport.js | 12 + module/testcase/model.php | 15 ++ module/testcase/view/caseheader.html.php | 14 +- module/testcase/view/showimport.html.php | 273 ++++++++++++----------- 9 files changed, 212 insertions(+), 179 deletions(-) diff --git a/module/product/model.php b/module/product/model.php index 1222111415..884f03d4b5 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -563,6 +563,7 @@ class productModel extends model if($currentModule == 'product' and strpos($this->config->product->showBranchMethod, $currentMethod) !== false) $isShowBranch = true; if($this->app->tab == 'qa' and strpos(',testsuite,testreport,testtask,', ",$currentModule,") === false) $isShowBranch = true; if($this->app->tab == 'qa' and $currentModule == 'testtask' and strpos(',create,edit,browseunits,importunitresult,unitcases,', ",$currentMethod,") === false) $isShowBranch = true; + if($currentModule == 'testcase' and $currentMethod == 'showimport') $isShowBranch = false; if($isShowBranch) { $this->lang->product->branch = sprintf($this->lang->product->branch, $this->lang->product->branchName[$currentProduct->type]); diff --git a/module/testcase/control.php b/module/testcase/control.php index 85bda938e8..dc570845a5 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -2093,7 +2093,7 @@ class testcase extends control $this->view->stories = $stories; $this->view->modules = $modules; - $this->view->cases = $this->dao->select('id, module, story, stage, status, pri, type')->from(TABLE_CASE)->where('product')->eq($productID)->andWhere('deleted')->eq(0)->fetchAll('id'); + $this->view->cases = $this->testcase->getByProduct($productID); $this->view->caseData = $caseData; $this->view->stepData = $stepData; $this->view->productID = $productID; @@ -2103,7 +2103,7 @@ class testcase extends control $this->view->allPager = $allPager; $this->view->pagerID = $pagerID; $this->view->branch = $branch; - $this->view->product = $this->products[$productID]; + $this->view->product = $this->product->getByID($productID); $this->view->maxImport = $maxImport; $this->view->dataInsert = $insert; diff --git a/module/testcase/css/showimport.css b/module/testcase/css/showimport.css index 8abde8f1e0..e3294261dd 100644 --- a/module/testcase/css/showimport.css +++ b/module/testcase/css/showimport.css @@ -1,8 +1,10 @@ .table table td,.outer .table table tbody > tr:last-child td {padding: 2px 0 2px 5px !important; border: none !important;} +.c-branch {width: 120px;} .c-line-number {width: 50px;} .c-id {width: 40px;} .c-story, .c-module, .c-type {width: 120px;} .c-stage {width: 160px;} +.c-condition {width: 80px;} .c-step {width: 300px;} .form-actions .btn {margin-right: 20px;} .table td textarea {height: 32px;} diff --git a/module/testcase/js/batchcreate.js b/module/testcase/js/batchcreate.js index b95b099be7..009b944c14 100644 --- a/module/testcase/js/batchcreate.js +++ b/module/testcase/js/batchcreate.js @@ -27,38 +27,3 @@ $(document).ready(function() } }); }); - -/** - * Set modules. - * - * @param int $branchID - * @param int $productID - * @param int $num - * @access public - * @return void - */ -function setModules(branchID, productID, num) -{ - moduleLink = createLink('tree', 'ajaxGetModules', 'productID=' + productID + '&viewType=story&branch=' + branchID + '&num=' + num); - $.get(moduleLink, function(modules) - { - if(!modules) modules = ''; - $('#module' + num).replaceWith(modules); - $("#module" + num + "_chosen").remove(); - $("#module" + num).next('.picker').remove(); - $("#module" + num).attr('onchange', "loadStories("+ productID + ", this.value, " + num + ")").chosen(); - }); - - loadStories(productID, 0, num); - - /* If the branch of the current row is inconsistent with the one below, clear the module and story of the nex row. */ - var nextBranchID = $('#branch' + (num + 1)).val(); - if(nextBranchID != branchID) - { - $('#module' + (num + 1)).find("option[value='ditto']").remove(); - $('#module' + (num + 1)).trigger("chosen:updated"); - - $('#plan' + (num + 1)).find("option[value='ditto']").remove(); - $('#plan' + (num + 1)).trigger("chosen:updated"); - } -} diff --git a/module/testcase/js/common.js b/module/testcase/js/common.js index d29efaf6cd..c351866f47 100644 --- a/module/testcase/js/common.js +++ b/module/testcase/js/common.js @@ -390,3 +390,38 @@ function loadStories(productID, moduleID, num) } }); } + +/** + * Set modules. + * + * @param int $branchID + * @param int $productID + * @param int $num + * @access public + * @return void + */ +function setModules(branchID, productID, num) +{ + moduleLink = createLink('tree', 'ajaxGetModules', 'productID=' + productID + '&viewType=story&branch=' + branchID + '&num=' + num); + $.get(moduleLink, function(modules) + { + if(!modules) modules = ''; + $('#module' + num).replaceWith(modules); + $("#module" + num + "_chosen").remove(); + $("#module" + num).next('.picker').remove(); + $("#module" + num).attr('onchange', "loadStories("+ productID + ", this.value, " + num + ")").chosen(); + }); + + loadStories(productID, 0, num); + + /* If the branch of the current row is inconsistent with the one below, clear the module and story of the nex row. */ + var nextBranchID = $('#branch' + (num + 1)).val(); + if(nextBranchID != branchID) + { + $('#module' + (num + 1)).find("option[value='ditto']").remove(); + $('#module' + (num + 1)).trigger("chosen:updated"); + + $('#plan' + (num + 1)).find("option[value='ditto']").remove(); + $('#plan' + (num + 1)).trigger("chosen:updated"); + } +} diff --git a/module/testcase/js/showimport.js b/module/testcase/js/showimport.js index b6490a25c1..4741a30fd6 100644 --- a/module/testcase/js/showimport.js +++ b/module/testcase/js/showimport.js @@ -10,6 +10,12 @@ $("[name^='branch']").each(function() $(this).attr('id', 'branch' + id.match(/\d+/)); }); +$("[name^='module']").each(function() +{ + var id = $(this).attr('id'); + $(this).attr('id', 'module' + id.match(/\d+/)); +}); + $("[name^='story']").each(function() { var id = $(this).attr('id'); @@ -19,6 +25,7 @@ $("[name^='story']").each(function() var moduleID = $('#module' + num).val(); var storyID = $("#story" + num).val(); var storyLink = createLink('story', 'ajaxGetProductStories', 'productID=' + productID + '&branch=' + branchID + '&moduleID=' + moduleID + '&storyID=0&onlyOption=false&status=noclosed&limit=50&type=full&hasParent=1&executionID=0&number=' + num); + $.get(storyLink, function(stories) { if(!stories) stories = ''; @@ -29,3 +36,8 @@ $("[name^='story']").each(function() $('#story' + num).val(storyID).trigger('chosen:updated'); }); }); + +$(function() +{ + if(parseInt($('.c-name').css('width')) < 90) $('.c-name').css('width', '90px'); +}); diff --git a/module/testcase/model.php b/module/testcase/model.php index 5a40c8347f..acd61b1a33 100644 --- a/module/testcase/model.php +++ b/module/testcase/model.php @@ -643,6 +643,21 @@ class testcaseModel extends model return $this->appendData($cases); } + /** + * Get cases by product id. + * + * @param int $productID + * @access public + * @return array + */ + public function getByProduct($productID) + { + return $this->dao->select('*')->from(TABLE_CASE) + ->where('deleted')->eq(0) + ->andWhere('product')->eq($productID) + ->fetchAll('id'); + } + /** * Get cases of a story. * diff --git a/module/testcase/view/caseheader.html.php b/module/testcase/view/caseheader.html.php index 2ca6320c31..219c21962e 100644 --- a/module/testcase/view/caseheader.html.php +++ b/module/testcase/view/caseheader.html.php @@ -133,21 +133,15 @@
- +
diff --git a/module/testcase/view/showimport.html.php b/module/testcase/view/showimport.html.php index 5ff2178510..85ec5cd286 100644 --- a/module/testcase/view/showimport.html.php +++ b/module/testcase/view/showimport.html.php @@ -18,149 +18,158 @@ $(function() { if(parseInt($('#maxImport').val())) $('#times').html(Math.ceil(parseInt($('#allCount').html()) / parseInt($('#maxImport').val()))); }); - $('#import').click(function(){location.href = createLink('testcase', 'showImport', "productID=&branch=&pageID=1&maxImport=" + $('#maxImport').val())}) + $('#import').click(function(){location.href = createLink('testcase', 'showImport', "productID=&branch=&pageID=1&maxImport=" + $('#maxImport').val())}); }); -
+

testcase->import;?>

-
- - - - - - - - - - - - - - - - - - - - - - $case):?> - title)) continue;?> - - - - - - - - - - - - loadModel('flow');?> - - - - - - - - - - - - + + + + + $case):?> + title)) continue;?> + + + + + type != 'normal'):?> lang->save : $this->lang->file->saveAndNext; - if(!$insert and $dataInsert === '') - { - echo ""; - } - else - { - echo html::submitButton($submitText); - if($dataInsert !== '') echo html::hidden('insert', $dataInsert); - } - echo html::hidden('isEndPage', $isEndPage ? 1 : 0); - echo html::hidden('pagerID', $pagerID); - echo html::linkButton($lang->goback, $this->inlink('browse', "productID=$productID"), 'self', '', 'btn btn-wide'); - echo sprintf($lang->file->importPager, $allCount, $pagerID, $allPager); + if(isset($case->branch)) $branchID = $case->branch; + if(!empty($case->id) and !empty($cases[$case->id]->branch)) $branchID = $cases[$case->id]->branch; + if(!isset($branches[$branchID])) $branchID = $branch; ?> - - - -
lineNumber?>idAB?>testcase->title?>testcase->module?>testcase->story?>testcase->pri?>testcase->type?>testcase->stage?>testcase->precondition?>testcase->{$appendField->field}?> - - - - - -
testcase->stepDesc?>testcase->stepExpect?>
-
- id)) - { - echo $case->id . html::hidden("id[$key]", $case->id); - $insert = false; - } - else - { - echo "{$lang->testcase->new}"; - } - echo html::hidden("product[$key]", $productID); - if(!empty($branches)) - { - $branchID = $branch; - if(isset($case->branch)) $branchID = $case->branch; - if(!empty($case->id) and !empty($cases[$case->id]->branch)) $branchID = $cases[$case->id]->branch; - echo html::hidden("branch[$key]", $branchID); - } - echo html::hidden("keywords[$key]", isset($case->keywords) ? $case->keywords : ""); - ?> - title, ENT_QUOTES), "class='form-control'")?> - branch) and $case->branch != 0) ? $modules[BRANCH_MAIN] + $modules[$case->branch] : $modules[BRANCH_MAIN];?> - module) ? $case->module : ((!empty($case->id) and isset($cases[$case->id])) ? $cases[$case->id]->module : ''), "class='form-control chosen moduleChange' onchange='loadStories($productID, this.value, $key)'")?> - - story) ? $case->story : ((!empty($case->id) and isset($cases[$case->id])) ? $cases[$case->id]->story : '');?> - zget($stories, $storyID, '')), $storyID, "class='form-control chosen storyChange'")?>testcase->priList, isset($case->pri) ? $case->pri : ((!empty($case->id) and isset($cases[$case->id])) ? $cases[$case->id]->pri : ''), "class='form-control chosen'")?>testcase->typeList, isset($case->type) ? $case->type : '', "class='form-control chosen'")?>testcase->stageList, !empty($case->stage) ? $case->stage : ((!empty($case->id) and isset($cases[$case->id])) ? $cases[$case->id]->stage : ''), "multiple='multiple' class='form-control chosen'")?>precondition) ? htmlSpecialString($case->precondition) : "", "class='form-control'")?>flow->buildControl($appendField, zget($case, $appendField->field, ''), "{$appendField->field}[$key]");?> - - - - $desc):?> - - - - - - - +
+
+ + + + + type != 'normal'):?> + + + + + + + + + + + + - - - - - - -
lineNumber?>idAB?>testcase->branch?>testcase->title?>testcase->module?>testcase->story?>testcase->pri?>testcase->type?>testcase->stage?>testcase->precondition?>testcase->{$appendField->field}?>
- - - - - - - -
- -
+ + + + + + +
testcase->stepDesc?>testcase->stepExpect?>
+
+ id)) + { + echo $case->id . html::hidden("id[$key]", $case->id); + $insert = false; + } + else + { + echo "{$lang->testcase->new}"; + } + echo html::hidden("product[$key]", $productID); + echo html::hidden("keywords[$key]", isset($case->keywords) ? $case->keywords : ""); + ?> +
+ + + title, ENT_QUOTES), "class='form-control'")?> + + + module) ? $case->module : ((!empty($case->id) and isset($cases[$case->id])) ? $cases[$case->id]->module : ''), "class='form-control chosen moduleChange' onchange='loadStories($productID, this.value, $key)'")?> + + + story) ? $case->story : ((!empty($case->id) and isset($cases[$case->id])) ? $cases[$case->id]->story : '');?> + zget($stories, $storyID, '')), $storyID, "class='form-control chosen storyChange'")?> + testcase->priList, isset($case->pri) ? $case->pri : ((!empty($case->id) and isset($cases[$case->id])) ? $cases[$case->id]->pri : ''), "class='form-control chosen'")?> + testcase->typeList, isset($case->type) ? $case->type : '', "class='form-control chosen'")?> + testcase->stageList, !empty($case->stage) ? $case->stage : ((!empty($case->id) and isset($cases[$case->id])) ? $cases[$case->id]->stage : ''), "multiple='multiple' class='form-control chosen'")?> + precondition) ? htmlSpecialString($case->precondition) : "", "class='form-control'")?> + + loadModel('flow');?> + + flow->buildControl($appendField, zget($case, $appendField->field, ''), "{$appendField->field}[$key]");?> + + + + + + + $desc):?> + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + + + + + + + + lang->save : $this->lang->file->saveAndNext; + if(!$insert and $dataInsert === '') + { + echo ""; + } + else + { + echo html::submitButton($submitText); + if($dataInsert !== '') echo html::hidden('insert', $dataInsert); + } + echo html::hidden('isEndPage', $isEndPage ? 1 : 0); + echo html::hidden('pagerID', $pagerID); + echo html::linkButton($lang->goback, $this->inlink('browse', "productID=$productID"), 'self', '', 'btn btn-wide'); + echo sprintf($lang->file->importPager, $allCount, $pagerID, $allPager); + ?> + + + + + From 6726e6520684263d547695f75af34cdf15ea9156 Mon Sep 17 00:00:00 2001 From: liyuchun Date: Thu, 21 Apr 2022 15:59:21 +0800 Subject: [PATCH 11/16] * Fix bug #20178. --- module/mr/css/diff.css | 1 + module/repo/css/diff.css | 2 ++ 2 files changed, 3 insertions(+) diff --git a/module/mr/css/diff.css b/module/mr/css/diff.css index 5db97ecce4..01c74502ad 100644 --- a/module/mr/css/diff.css +++ b/module/mr/css/diff.css @@ -20,3 +20,4 @@ table.diff {margin-bottom: 0px;} .label-exchange {background-color: #566F7C; cursor: pointer;} .label-exchange i {padding: 0;} .btn-download {border-right: none;} +.body-modal #back {display: none;} diff --git a/module/repo/css/diff.css b/module/repo/css/diff.css index 5db97ecce4..c35af3a9d7 100644 --- a/module/repo/css/diff.css +++ b/module/repo/css/diff.css @@ -20,3 +20,5 @@ table.diff {margin-bottom: 0px;} .label-exchange {background-color: #566F7C; cursor: pointer;} .label-exchange i {padding: 0;} .btn-download {border-right: none;} +.body-modal .repo-diff {display: none;} +.body-modal #mainMenu {padding-bottom: 40px;} From ec0faba8082e6a95e909508cb84c5255a9e70cec Mon Sep 17 00:00:00 2001 From: tianshujie Date: Thu, 21 Apr 2022 15:59:45 +0800 Subject: [PATCH 12/16] * Fix bug #18060. --- module/testcase/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/testcase/control.php b/module/testcase/control.php index dc570845a5..b986bd54ab 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -1913,7 +1913,7 @@ class testcase extends control $caseLang = $this->lang->testcase; $caseConfig = $this->config->testcase; - $branches = $this->loadModel('branch')->getPairs($productID); + $branches = $this->loadModel('branch')->getPairs($productID, 'active'); $stories = $this->loadModel('story')->getProductStoryPairs($productID, $branch); $fields = $this->testcase->getImportFields($productID); $fields = array_flip($fields); From 5da98433b63bed196f8398e955a92f544f33752b Mon Sep 17 00:00:00 2001 From: mayue Date: Thu, 21 Apr 2022 16:30:32 +0800 Subject: [PATCH 13/16] * Fix bug #19933#21785. --- module/bug/js/common.js | 2 +- module/bug/view/edit.html.php | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/module/bug/js/common.js b/module/bug/js/common.js index 96afeeee40..fdd384c8f1 100644 --- a/module/bug/js/common.js +++ b/module/bug/js/common.js @@ -341,7 +341,7 @@ function loadExecutionRelated(executionID) loadExecutionTasks(executionID); loadExecutionStories(executionID); loadExecutionBuilds(executionID); - loadAssignedTo(executionID); + loadAssignedTo(executionID, $('#assignedTo').val()); loadTestTasks($('#product').val(), executionID); } else diff --git a/module/bug/view/edit.html.php b/module/bug/view/edit.html.php index 4872fc2ac6..5b6a8e5805 100644 --- a/module/bug/view/edit.html.php +++ b/module/bug/view/edit.html.php @@ -145,7 +145,12 @@ if($this->app->tab == 'project') js::set('objectID', $bug->project); bug->assignedTo;?> - assignedTo, "class='form-control chosen'");?> + +
+ assignedTo, "class='form-control chosen'");?> + bug->allUsers, "class='btn btn-default' onclick='loadAllUsers()' data-toggle='tooltip'");?> +
+ bug->deadline;?> From 59f717ddb9361c5a61c012dc5bb080dabed5de60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=B9=BF=E6=98=8E?= Date: Thu, 21 Apr 2022 16:34:31 +0800 Subject: [PATCH 14/16] * Fix bug #21804. --- module/story/model.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/module/story/model.php b/module/story/model.php index 4240c85c9e..2cd9faee00 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -4275,7 +4275,10 @@ class storyModel extends model $stories[$id]->tasks = $this->loadModel('task')->getStoryTasks($id); if($this->config->edition == 'max') { - $stories[$id]->designs = $this->dao->select('id, name')->from(TABLE_DESIGN)->where('story')->eq($id)->fetchAll('id'); + $stories[$id]->designs = $this->dao->select('id, name')->from(TABLE_DESIGN) + ->where('story')->eq($id) + ->andWhere('deleted')->eq('0') + ->fetchAll('id'); $stories[$id]->revisions = $this->dao->select('BID, extra')->from(TABLE_RELATION) ->where('AType')->eq('design') ->andWhere('BType')->eq('commit') @@ -4345,7 +4348,10 @@ class storyModel extends model $stories[$id]->tasks = $this->loadModel('task')->getStoryTasks($id); if($this->config->edition == 'max') { - $stories[$id]->designs = $this->dao->select('id, name')->from(TABLE_DESIGN)->where('story')->eq($id)->fetchAll('id'); + $stories[$id]->designs = $this->dao->select('id, name')->from(TABLE_DESIGN) + ->where('story')->eq($id) + ->andWhere('deleted')->eq('0') + ->fetchAll('id'); $stories[$id]->revisions = $this->dao->select('BID, extra')->from(TABLE_RELATION) ->where('AType')->eq('design') ->andWhere('BType')->eq('commit') @@ -4385,7 +4391,10 @@ class storyModel extends model $track[$id]->task = $this->loadModel('task')->getStoryTasks($id); if($this->config->edition == 'max') { - $track[$id]->design = $this->dao->select('id, name')->from(TABLE_DESIGN)->where('story')->eq($id)->fetchAll('id'); + $track[$id]->design = $this->dao->select('id, name')->from(TABLE_DESIGN) + ->where('story')->eq($id) + ->andWhere('deleted')->eq('0') + ->fetchAll('id'); $track[$id]->revision = $this->dao->select('BID, extra')->from(TABLE_RELATION)->where('AType')->eq('design')->andWhere('BType')->eq('commit')->andWhere('AID')->in(array_keys($track[$id]->design))->fetchPairs(); } } From 4abb32445978f6b405b229bc86c4346afd6adcd4 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Thu, 21 Apr 2022 16:46:09 +0800 Subject: [PATCH 15/16] * Fix bug#21896. --- module/todo/control.php | 2 ++ module/todo/view/assignto.html.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/module/todo/control.php b/module/todo/control.php index 3644d47731..f34e92a214 100644 --- a/module/todo/control.php +++ b/module/todo/control.php @@ -359,6 +359,8 @@ class todo extends control $this->view->todo = $this->todo->getById($todoID); $this->view->members = $this->loadModel('user')->getPairs('noclosed'); $this->view->times = date::buildTimeList($this->config->todo->times->begin, $this->config->todo->times->end, $this->config->todo->times->delta); + $this->view->actions = $this->loadModel('action')->getList('todo', $todoID); + $this->view->users = $this->user->getPairs('noletter'); $this->view->time = date::now(); $this->display(); } diff --git a/module/todo/view/assignto.html.php b/module/todo/view/assignto.html.php index a203114aeb..3f670d6813 100755 --- a/module/todo/view/assignto.html.php +++ b/module/todo/view/assignto.html.php @@ -63,6 +63,8 @@ +
+
From 0a5ef1e4fa83637f563ca088427476e58c2fa345 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Thu, 21 Apr 2022 16:51:57 +0800 Subject: [PATCH 16/16] * Fix bug #18060. --- module/testcase/view/showimport.html.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/module/testcase/view/showimport.html.php b/module/testcase/view/showimport.html.php index 85ec5cd286..c9ddfc9cd9 100644 --- a/module/testcase/view/showimport.html.php +++ b/module/testcase/view/showimport.html.php @@ -18,11 +18,11 @@ $(function() { if(parseInt($('#maxImport').val())) $('#times').html(Math.ceil(parseInt($('#allCount').html()) / parseInt($('#maxImport').val()))); }); - $('#import').click(function(){location.href = createLink('testcase', 'showImport', "productID=&branch=&pageID=1&maxImport=" + $('#maxImport').val())}); + $('#import').click(function(){location.href = createLink('testcase', 'showImport', "productID=&branch=&pageID=1&maxImport=" + $('#maxImport').val())}) }); -
+

testcase->import;?>

@@ -86,7 +86,6 @@ $(function() type != 'normal'):?> branch)) $branchID = $case->branch; - if(!empty($case->id) and !empty($cases[$case->id]->branch)) $branchID = $cases[$case->id]->branch; if(!isset($branches[$branchID])) $branchID = $branch; ?>