This is an automated email from the ASF dual-hosted git repository. nmalin pushed a commit to branch release24.09 in repository https://gitbox.apache.org/repos/asf/ofbiz-plugins.git
The following commit(s) were added to refs/heads/release24.09 by this push: new f205a96b2 Improved: slim down groovy scriptlet (OFBIZ-13146) f205a96b2 is described below commit f205a96b25b4a284323f29e1be4c0a902e66ceaf Author: Nicolas Malin <nicolas.ma...@nereide.fr> AuthorDate: Wed Oct 16 09:40:38 2024 +0200 Improved: slim down groovy scriptlet (OFBIZ-13146) Convert to groovy natural language or uel function --- birt/widget/facility/FacilityForms.xml | 2 +- ebay/widget/EbayForms.xml | 10 +- ebaystore/widget/EbayStoreForms.xml | 2 +- projectmgr/widget/TaskScreens.xml | 2 +- scrum/minilang/ScrumEvents.xml | 2 +- scrum/minilang/ScrumServices.xml | 2 +- scrum/widget/TimeSheetForms.xml | 13 +- scrum/widget/scrumForms.xml | 285 ++++++++++++++++----------------- 8 files changed, 153 insertions(+), 165 deletions(-) diff --git a/birt/widget/facility/FacilityForms.xml b/birt/widget/facility/FacilityForms.xml index 303e90299..79d902dd9 100644 --- a/birt/widget/facility/FacilityForms.xml +++ b/birt/widget/facility/FacilityForms.xml @@ -62,7 +62,7 @@ under the License. <field name="offsetQOHQty" title="${uiLabelMap.ProductQtyOffsetQOHBelow}"><text/></field> <field name="offsetATPQty" title="${uiLabelMap.ProductQtyOffsetATPBelow}"><text/></field> <field name="productsSoldThruTimestamp" title="${uiLabelMap.ProductShowProductsSoldThruTimestamp}"> - <date-time default-value="${groovy: org.apache.ofbiz.base.util.UtilDateTime.nowTimestamp()}"/> + <date-time default-value="${date:nowTimestamps()}"/> </field> <field name="VIEW_SIZE" entry-name="viewSize" title="${uiLabelMap.ProductShowProductsPerPage}"><text/></field> <field name="monthsInPastLimit" entry-name="monthsInPastLimit"><text/></field> diff --git a/ebay/widget/EbayForms.xml b/ebay/widget/EbayForms.xml index 1c50606e2..26991d22d 100644 --- a/ebay/widget/EbayForms.xml +++ b/ebay/widget/EbayForms.xml @@ -36,8 +36,8 @@ under the License. <form name="ListOrdersFromEbay" type="multi" use-row-submit="true" list-name="orderList" target="ImportOrderFromEbay" odd-row-style="alternate-row" default-table-style="basic-table hover-bar"> <row-actions> - <set field="canImportOrder" value="${groovy: org.apache.ofbiz.base.util.UtilValidate.isEmpty(orderId) && org.apache.ofbiz.base.util.UtilValidate.isEmpty(errorMessage)}" type="Boolean"/> - <set field="allowProductIdChange" value="${groovy: org.apache.ofbiz.base.util.UtilValidate.isEmpty(orderId) && org.apache.ofbiz.base.util.UtilValidate.isNotEmpty(errorMessage)}" type="Boolean"/> + <set field="canImportOrder" value="${groovy: !orderId && !errorMessage}" type="Boolean"/> + <set field="allowProductIdChange" value="${groovy: !orderId && errorMessage}" type="Boolean"/> </row-actions> <field name="productStoreId"><hidden/></field> <field name="externalId" title="${uiLabelMap.EbayImportEbayItem}"><display/></field> @@ -105,9 +105,9 @@ under the License. <form name="ListEbayOrders" type="multi" use-row-submit="true" list-name="orderList" target="importEbayOrders" odd-row-style="alternate-row" default-table-style="basic-table hover-bar"> <row-actions> - <set field="canImportOrder" value="${groovy: org.apache.ofbiz.base.util.UtilValidate.isEmpty(orderId)}" type="Boolean"/> - <set field="isEbayOrder" value="${groovy: org.apache.ofbiz.base.util.UtilValidate.isNotEmpty(isEbayOrder)}" type="Boolean"/> - <set field="isEbayTransaction" value="${groovy: org.apache.ofbiz.base.util.UtilValidate.isNotEmpty(isEbayTransaction)}" type="Boolean"/> + <set field="canImportOrder" value="${groovy: !orderId}" type="Boolean"/> + <set field="isEbayOrder" value="${groovy: isEbayOrder}" type="Boolean"/> + <set field="isEbayTransaction" value="${groovy: isEbayTransaction}" type="Boolean"/> </row-actions> <field name="productStoreId"><hidden/></field> <field name="externalId" title="${uiLabelMap.EbayEbayOrderIdOrTransactionId}" use-when="${isEbayOrder}" tooltip="eBay Order"><display/></field> diff --git a/ebaystore/widget/EbayStoreForms.xml b/ebaystore/widget/EbayStoreForms.xml index 30a5118b8..e46b3b3db 100644 --- a/ebaystore/widget/EbayStoreForms.xml +++ b/ebaystore/widget/EbayStoreForms.xml @@ -103,7 +103,7 @@ under the License. </hyperlink> </field> <field name="comments" title="Ebay Category Id"><display description="${ebayCategoryId}"></display></field> - <field name="subCategory"><display description="${groovy:prodCategoryRollup.size()}"></display></field> + <field name="subCategory"><display description="${util:size(prodCategoryRollup)}"></display></field> <field name="updateButton" title="${uiLabelMap.CommonDelete}"><submit button-type="button"/></field> </form> <form name="NewEbayAccount" type="single" target="createEbayAccount"> diff --git a/projectmgr/widget/TaskScreens.xml b/projectmgr/widget/TaskScreens.xml index a236f3be6..402536598 100644 --- a/projectmgr/widget/TaskScreens.xml +++ b/projectmgr/widget/TaskScreens.xml @@ -564,7 +564,7 @@ under the License. <screen name="ListWorkEffortSurveyAppls"> <section> <actions> - <set field="nowTimeStampString" default-value="${groovy: org.apache.ofbiz.base.util.UtilDateTime.nowTimestamp()}"/> + <set field="nowTimeStampString" default-value="${date:nowTimestamps()}"/> <entity-and entity-name="WorkEffortSurveyAppl" list="workEffortSurveyAppls"> <field-map field-name="workEffortId" from-field="parameters.workEffortId"/> <order-by field-name="workEffortId"/> diff --git a/scrum/minilang/ScrumEvents.xml b/scrum/minilang/ScrumEvents.xml index 9dbfb2e84..72019f7e5 100644 --- a/scrum/minilang/ScrumEvents.xml +++ b/scrum/minilang/ScrumEvents.xml @@ -683,7 +683,7 @@ <!-- Check if there are duplicate value will reorder and change it --> <set field="custRequestIndex" type="List"/> - <set field="custRequestIndexToSet" value="${groovy: import java.util.Set; new HashSet(custRequestIndexList);}"/> + <set field="custRequestIndexToSet" value="${groovy: custRequestIndexList.unique()}"/> <iterate list="custRequestIndexToSet" entry="custRequestIndexMap"> <set field="count" value="0" type="Integer"/> <loop count="${custRequestListSize}" field="l"> diff --git a/scrum/minilang/ScrumServices.xml b/scrum/minilang/ScrumServices.xml index b503eda24..6057e499b 100644 --- a/scrum/minilang/ScrumServices.xml +++ b/scrum/minilang/ScrumServices.xml @@ -1364,7 +1364,7 @@ </iterate> </if-not-empty> <if-not-empty field="billingItemIndexList"> - <set field="billingItemIndexToSet" value="${groovy: import java.util.Set; new HashSet(billingItemIndexList);}"/> + <set field="billingItemIndexToSet" value="${groovy: billingItemIndexList.unique()}"/> <set field="billingItemIndexList" from-field="billingItemIndexToSet" /> <iterate list="billingItemIndexList" entry="billingItemIndexMap"> <set field="inputMap" type="NewMap"/> diff --git a/scrum/widget/TimeSheetForms.xml b/scrum/widget/TimeSheetForms.xml index 430099054..d45d5877e 100644 --- a/scrum/widget/TimeSheetForms.xml +++ b/scrum/widget/TimeSheetForms.xml @@ -56,13 +56,6 @@ </form> <form name="ListTimeSheets" type="list" list-name="timesheets" paginate-target="FindTimeSheet" odd-row-style="alternate-row" default-table-style="basic-table hover-bar"> - <actions> - <set field="complete" value="${uiLabelMap.ScrumToComplete}"/> - <set field="inProcess" value="Set To In-progress"/> - </actions> - <row-actions> - <set field="completeLink" value="${groovy:"TIMESHEET_IN_PROCESS".equals(statusId)?complete:""}"/> - </row-actions> <field name="timesheetId" title="${uiLabelMap.WorkEffortTimesheetTimesheetId}" widget-style="buttontext"> <hyperlink description="${timesheetId}" target="ViewTimeSheet" also-hidden="false"> <parameter param-name="timesheetId"/> @@ -75,13 +68,13 @@ <field name="thruDate" title="${uiLabelMap.CommonThruDate}"><display type="date"/></field> <!--field name="comments" title="${uiLabelMap.CommonComments}"><display/></field--> <field name="completeLink" title="${uiLabelMap.CommonStatustoComplete}" widget-style="buttontext"> - <hyperlink description="${groovy:statusId.equals("TIMESHEET_IN_PROCESS")?complete:""}" target="TimeSheetStatusToComplete"> + <hyperlink description="${groovy: statusId == 'TIMESHEET_IN_PROCESS' ? uiLabelMap.ScrumToComplete : ''}" target="TimeSheetStatusToComplete"> <parameter param-name="timesheetId"/> <parameter param-name="statusId" value="TIMESHEET_COMPLETED"/> </hyperlink> </field> <field name="inProcessLink" title="${uiLabelMap.StatusToInProcess}" widget-style="buttontext"> - <hyperlink description="${groovy:statusId.equals("TIMESHEET_COMPLETED")?inProcess:""}" target="processTimesheet" > + <hyperlink description="${groovy: statusId == 'TIMESHEET_COMPLETED' ? 'Set To In-progress' : ''}" target="processTimesheet" > <parameter param-name="timesheetId"/> <parameter param-name="statusId" value="TIMESHEET_IN_PROCESS"/> </hyperlink> @@ -104,7 +97,7 @@ <field name="hours"><display/></field> <field name="comments" title="${uiLabelMap.CommonComments}"><display/></field> <field name="completeLink" title="${uiLabelMap.CommonStatustoComplete}" widget-style="buttontext"> - <hyperlink description="${groovy:statusId.equals("TIMESHEET_IN_PROCESS")?complete:""}" target="TimeSheetStatusToComplete" also-hidden="false"> + <hyperlink description="${groovy: statusId == 'TIMESHEET_IN_PROCESS' ? complete : ''}" target="TimeSheetStatusToComplete" also-hidden="false"> <parameter param-name="timesheetId"/> <parameter param-name="statusId" value="TIMESHEET_COMPLETED"/> </hyperlink> diff --git a/scrum/widget/scrumForms.xml b/scrum/widget/scrumForms.xml index e49f7331f..508b84f49 100644 --- a/scrum/widget/scrumForms.xml +++ b/scrum/widget/scrumForms.xml @@ -115,7 +115,7 @@ under the License. </service> <set field="planHours" from-field="taskPlanHourOutMap.planHours"/> <!-- condition --> - <set field="showPosition1" value="${groovy:String prev=(String)previousItem.get("custRequestId");return new Boolean(!(prev!=null&&prev.equals(custRequestId)));}" type="Boolean"/> + <set field="showPosition1" value="${groovy: previousItem?.custRequestId == custRequestId}" type="Boolean"/> <!-- Get list of task for each sprint backlog --> <entity-and entity-name="WorkEffortPartyAssignView" list="sprintMember"> <field-map field-name="workEffortId" from-field="sprintId"/> @@ -149,7 +149,7 @@ under the License. <field name="taskId" position="2"><hidden/></field> <field name="VIEW_SIZE_2" position="2"><hidden value="${parameters.VIEW_SIZE_2}"/></field> <field name="VIEW_INDEX_2" position="2"><hidden value="${parameters.VIEW_INDEX_2}"/></field> - <field name="custRequestId" title="${uiLabelMap.ScrumSprintBacklog}" position="1" use-when="showPosition1&&"${custRequestTypeId}"!="RF_SCRUM_MEETINGS""> + <field name="custRequestId" title="${uiLabelMap.ScrumSprintBacklog}" position="1" use-when="showPosition1&&'${custRequestTypeId}'!='RF_SCRUM_MEETINGS'"> <display-entity entity-name="CustRequest" key-field-name="custRequestId" description=" "> <sub-hyperlink target="ViewProdBacklogItem" description="${context.description} - [${custRequestId}]" link-type="hidden-form" target-window="_BLANK" link-style="buttontext"> <parameter param-name="custRequestId"/> @@ -157,14 +157,14 @@ under the License. </sub-hyperlink> </display-entity> </field> - <field name="custRequestId" title="${uiLabelMap.ScrumSprintBacklog}" position="1" use-when="showPosition1&&"${custRequestTypeId}"=="RF_SCRUM_MEETINGS"" widget-style="disabled"> + <field name="custRequestId" title="${uiLabelMap.ScrumSprintBacklog}" position="1" use-when="showPosition1&&'${custRequestTypeId}'=='RF_SCRUM_MEETINGS'" widget-style="disabled"> <display-entity entity-name="CustRequest" key-field-name="custRequestId" description="${context.description} - [${custRequestId}]"> </display-entity> </field> - <field name="custRequest.statusId" title="${uiLabelMap.ScrumStatusBacklog}" position="1" use-when="showPosition1&&"Any".equals(paraBacklogStatusId)"> + <field name="custRequest.statusId" title="${uiLabelMap.ScrumStatusBacklog}" position="1" use-when="showPosition1&&'Any'.equals(paraBacklogStatusId)"> <display-entity entity-name="StatusItem" key-field-name="statusId"/> </field> - <field name="taskId" title="${uiLabelMap.ScrumTab} ${uiLabelMap.ScrumTask}" position="2" parameter-name="workEffortId" use-when="!"SCRUM_SPRINT".equals(taskTypeId)"> + <field name="taskId" title="${uiLabelMap.ScrumTab} ${uiLabelMap.ScrumTask}" position="2" parameter-name="workEffortId" use-when="!'SCRUM_SPRINT'.equals(taskTypeId)"> <display-entity entity-name="WorkEffort" key-field-name="workEffortId" description=" "> <sub-hyperlink target="taskView" description="${uiLabelMap.ScrumTab} ${taskName} - [${taskId}]" link-type="hidden-form" target-window="_BLANK"> <parameter param-name="projectId"/> @@ -172,45 +172,45 @@ under the License. </sub-hyperlink> </display-entity> </field> - <field name="taskTypeId" title="${uiLabelMap.ScrumTab} ${uiLabelMap.ScrumTaskType}" position="2" use-when="!"SCRUM_SPRINT".equals(taskTypeId)"> + <field name="taskTypeId" title="${uiLabelMap.ScrumTab} ${uiLabelMap.ScrumTaskType}" position="2" use-when="!'SCRUM_SPRINT'.equals(taskTypeId)"> <display-entity entity-name="WorkEffortType" key-field-name="workEffortTypeId" description="${uiLabelMap.ScrumTab} ${description}"/> </field> - <field name="taskCurrentStatusId" title="${uiLabelMap.CommonStatus}" position="2" use-when="!"STS_COMPLETED".equals(taskCurrentStatusId)&&!"SCRUM_SPRINT".equals(taskTypeId)"><display-entity entity-name="StatusItem" key-field-name="statusId"/></field> - <field name="taskCurrentStatusId" title="${uiLabelMap.CommonStatus}" position="2" use-when=""STS_COMPLETED".equals(taskCurrentStatusId)&&!"SCRUM_SPRINT".equals(taskTypeId)" widget-style="alert"><display-entity entity-name="StatusItem" key-field-name="statusId"/></field> + <field name="taskCurrentStatusId" title="${uiLabelMap.CommonStatus}" position="2" use-when="!'STS_COMPLETED'.equals(taskCurrentStatusId)&&!'SCRUM_SPRINT'.equals(taskTypeId)"><display-entity entity-name="StatusItem" key-field-name="statusId"/></field> + <field name="taskCurrentStatusId" title="${uiLabelMap.CommonStatus}" position="2" use-when="'STS_COMPLETED'.equals(taskCurrentStatusId)&&!'SCRUM_SPRINT'.equals(taskTypeId)" widget-style="alert"><display-entity entity-name="StatusItem" key-field-name="statusId"/></field> <field name="dummy1" title=" " position="1" use-when="showPosition1"><display description=" "/></field> <field name="dummy2" title=" " position="1" use-when="showPosition1"><display description=" "/></field> <field name="dummy3" title=" " position="1" use-when="showPosition1"><display description=" "/></field> <field name="initialPlannedHours" title="Initial Plan / Total Plan" position="1" use-when="showPosition1"><display description="${initialPlannedHours} / ${backlogPlanHours}"/></field> <field name="dummy4" title=" " position="1" use-when="showPosition1"><display description=" "/></field> <field name="dummy5" title=" " position="1" use-when="showPosition1"><display description=" "/></field> - <field name="taskActualHours" title="${uiLabelMap.ScrumActualHours}" position="2" use-when="!"SCRUM_SPRINT".equals(taskTypeId)"><display/></field> - <field name="planHours" title="${uiLabelMap.ScrumPlannedHours}" position="2" use-when="!"SCRUM_SPRINT".equals(taskTypeId)"><display></display> + <field name="taskActualHours" title="${uiLabelMap.ScrumActualHours}" position="2" use-when="!'SCRUM_SPRINT'.equals(taskTypeId)"><display/></field> + <field name="planHours" title="${uiLabelMap.ScrumPlannedHours}" position="2" use-when="!'SCRUM_SPRINT'.equals(taskTypeId)"><display></display> </field> - <field name="deleteButton" title=" " position="1" use-when="showPosition1&&!"CRQ_COMPLETED".equals("${custRequest.statusId}")" widget-style="buttontext"> + <field name="deleteButton" title=" " position="1" use-when="showPosition1&&!'CRQ_COMPLETED'.equals('${custRequest.statusId}')" widget-style="buttontext"> <hyperlink description="Delete" target="DeleteSprintBackLogs" confirmation-message="Are you sure to delete this sprint backlog ?" link-type="hidden-form"> <parameter param-name="custRequestId"/> <parameter param-name="sprintId"/> <parameter param-name="projectId"/> </hyperlink> </field> - <field name="newTask" title=" " position="1" use-when="showPosition1&&!"CRQ_COMPLETED".equals("${custRequest.statusId}")" widget-style="buttontext"> + <field name="newTask" title=" " position="1" use-when="showPosition1&&!'CRQ_COMPLETED'.equals('${custRequest.statusId}')" widget-style="buttontext"> <hyperlink description="Add Task" target="NewSprintBacklogTask" link-type="hidden-form"> <parameter param-name="custRequestId"/> <parameter param-name="sprintId"/> <parameter param-name="projectId"/> </hyperlink> </field> - <field name="dummy6" title=" " position="2" use-when="!"SCRUM_SPRINT".equals(taskTypeId)"><display description=" "/></field> - <field name="partyId" title="${uiLabelMap.ScrumAssignedTo}" position="2" parameter-name="partyId" use-when="!"SCRUM_SPRINT".equals(taskTypeId)"> + <field name="dummy6" title=" " position="2" use-when="!'SCRUM_SPRINT'.equals(taskTypeId)"><display description=" "/></field> + <field name="partyId" title="${uiLabelMap.ScrumAssignedTo}" position="2" parameter-name="partyId" use-when="!'SCRUM_SPRINT'.equals(taskTypeId)"> <display-entity entity-name="PartyNameView" description="${lastName}, ${firstName} ${middleName}" key-field-name="partyId"/> </field> - <field name="editTaskParty" title=" " position="2" use-when="!"STS_COMPLETED".equals(taskCurrentStatusId)&&!"SCRUM_SPRINT".equals(taskTypeId)" widget-style="buttontext"> + <field name="editTaskParty" title=" " position="2" use-when="!'STS_COMPLETED'.equals(taskCurrentStatusId)&&!'SCRUM_SPRINT'.equals(taskTypeId)" widget-style="buttontext"> <hyperlink description="${uiLabelMap.CommonEdit}" target="EditTask" link-type="hidden-form" target-window="_BLANK"> <parameter param-name="taskId"/> <parameter param-name="sprintId"></parameter> </hyperlink> </field> - <field name="deleteTaskButton" title=" " position="2" use-when="!"STS_COMPLETED".equals(taskCurrentStatusId)&&!"SCRUM_SPRINT".equals(taskTypeId)" widget-style="buttontext"> + <field name="deleteTaskButton" title=" " position="2" use-when="!'STS_COMPLETED'.equals(taskCurrentStatusId)&&!'SCRUM_SPRINT'.equals(taskTypeId)" widget-style="buttontext"> <hyperlink description="Delete" target="DeleteTaskFromSprintOverview" confirmation-message="Are you sure to delete this task ?" link-type="hidden-form"> <parameter param-name="workEffortId" from-field="taskId"/> <parameter param-name="custRequestId"/> @@ -218,20 +218,20 @@ under the License. <parameter param-name="projectId"/> </hyperlink> </field> - <field name="setCompleteButton" title=" " widget-style="buttontext" use-when="!"STS_COMPLETED".equals(taskCurrentStatusId)&&!"SCRUM_SPRINT".equals(taskTypeId)" + <field name="setCompleteButton" title=" " widget-style="buttontext" use-when="!'STS_COMPLETED'.equals(taskCurrentStatusId)&&!'SCRUM_SPRINT'.equals(taskTypeId)" position="2"> <hyperlink description="${uiLabelMap.ScrumSetComplete}" target="setCompleteTask" link-type="hidden-form"> <parameter param-name="workEffortId" from-field="taskId"/> <parameter param-name="sprintId"></parameter> </hyperlink> </field> - <field name="dummy7" title=" " position="2" use-when="!"SCRUM_SPRINT".equals(taskTypeId)"><display description=" "/></field> + <field name="dummy7" title=" " position="2" use-when="!'SCRUM_SPRINT'.equals(taskTypeId)"><display description=" "/></field> </form> <form name="SprintBacklogListItemsHideDelete" extends="SprintBacklogListItems"> - <field name="planHours" title="${uiLabelMap.ScrumPlannedHours}" position="2" use-when="!"SCRUM_SPRINT".equals(taskTypeId)"><display/></field> + <field name="planHours" title="${uiLabelMap.ScrumPlannedHours}" position="2" use-when="!'SCRUM_SPRINT'.equals(taskTypeId)"><display/></field> <field name="deleteButton" position="1" use-when="showPosition1"><hidden/></field> - <field name="deleteTaskButton" position="2" use-when="!"STS_COMPLETED".equals(taskCurrentStatusId)&&!"SCRUM_SPRINT".equals(taskTypeId)"><hidden/></field> + <field name="deleteTaskButton" position="2" use-when="!'STS_COMPLETED'.equals(taskCurrentStatusId)&&!'SCRUM_SPRINT'.equals(taskTypeId)"><hidden/></field> <sort-order> <sort-field name="custRequestId"/> <sort-field name="taskId"/> @@ -269,8 +269,7 @@ under the License. <field-map field-name="productId" from-field="workeffAndProList[0].productId"/> </entity-one> <set field="maxHours" value="${groovy: - def memberSize = delegator.findByAnd("WorkEffortPartyAssignment", ["workEffortId": parameters.sprintId], null, false); - maxHours = memberSize.size() * context.estimatedHrs * 40; + from('WorkEffortPartyAssignment').where(workEffortId: parameters.sprintId).queryCount() * context.estimatedHrs * 40 }"/> <service service-name="getScrumPlanHour" result-map="planHourOutMap"> <field-map field-name="sprintId" from-field="parameters.sprintId"/> @@ -398,12 +397,12 @@ under the License. <set field="sprintId" from-field="parameters.sprintId"/> </actions> <field name="productId"><hidden/></field> - <field name="partyId" title="${uiLabelMap.Person}" tooltip="${uiLabelMap.CommonPerson}" use-when="parameters.get("partyId")!=null" parameter-name="partyId"> + <field name="partyId" title="${uiLabelMap.Person}" tooltip="${uiLabelMap.CommonPerson}" use-when="parameters.get('partyId')!=null" parameter-name="partyId"> <display-entity entity-name="PartyNameView" description="${lastName}, ${firstName} ${middleName}" key-field-name="partyId"> <sub-hyperlink target="SprintMember?sprintId=${parameters.sprintId}" description="[${uiLabelMap.CommonChange}]"/> </display-entity> </field> - <field name="partyId" title="${uiLabelMap.Person}" tooltip="${uiLabelMap.CommonPerson}" event="onchange" action="javascript:document.addSprintMember.action='SprintMember';document.addSprintMember.submit();" use-when="parameters.get("partyId")==null" parameter-name="partyId"> + <field name="partyId" title="${uiLabelMap.Person}" tooltip="${uiLabelMap.CommonPerson}" event="onchange" action="javascript:document.addSprintMember.action='SprintMember';document.addSprintMember.submit();" use-when="parameters.get('partyId')==null" parameter-name="partyId"> <drop-down allow-empty="false"> <option key="" description="- ${uiLabelMap.CommonSelectOne} -"/> <list-options key-name="partyId" list-name="listPerson" description="${lastName} ${firstName} ${middleName}"/> @@ -898,8 +897,8 @@ under the License. <entity-one entity-name="CustRequest" value-field="custRequest"/> <set field="description" from-field="custRequest.description"/> <set field="custRequestCategoryGroupId" from-field="parentCustRequestId"/> - <set field="estimatedHours" value="${groovy:custEstimatedMilliSeconds!=null?custEstimatedMilliSeconds/3600000:0;}"/> - <set field="showPosition1" value="${groovy:String prev=(String)previousItem.get("parentCustRequestId");return new Boolean(!(prev!=null&&prev.equals(parentCustRequestId)));}" type="Boolean"/> + <set field="estimatedHours" value="${groovy: custEstimatedMilliSeconds ? custEstimatedMilliSeconds / 3600000 : 0}"/> + <set field="showPosition1" value="${groovy: parentCustRequestId == previousItem.parentCustRequestId}" type="Boolean"/> </row-actions> <field name="postWorkHours"><hidden value="1"/></field> <field name="priority"><hidden/></field> @@ -1019,7 +1018,7 @@ under the License. <row-actions> <entity-one entity-name="CustRequest" value-field="custRequest"/> <set field="product" from-field="custRequest.description"/> - <set field="estimatedHours" value="${groovy:custEstimatedMilliSeconds!=null?custEstimatedMilliSeconds/3600000:0;}"/> + <set field="estimatedHours" value="${groovy:custEstimatedMilliSeconds ? custEstimatedMilliSeconds / 3600000 : 0}"/> </row-actions> <field name="sequence"><hidden value="Y"/></field> <field name="custRequestCategoryGroupId"><hidden/></field> @@ -1147,28 +1146,28 @@ under the License. </form> <form name="ProjectList" type="list" target="main" odd-row-style="alternate-row" default-table-style="basic-table hover-bar" paginate-target="Sprints" list-name="sprints"> <actions> - <set field="isCurrentProject" value="${groovy: request.setAttribute("isCurrentProject", false);}" type="Boolean"/> - <set field="currentProject" value="${groovy: request.setAttribute("currentProject", ' ');}" type="String"/> + <set field="isCurrentProject" value="${groovy: request.setAttribute('isCurrentProject', false)}" type="Boolean"/> + <set field="currentProject" value="${groovy: request.setAttribute('currentProject', ' ')}" type="String"/> </actions> <row-actions> <set field="isCurrentProject" value="${groovy: - if (request.getAttribute("currentProject") != context.projectId) - request.setAttribute("isCurrentProject", false); + if (request.getAttribute('currentProject') != context.projectId) + request.setAttribute('isCurrentProject', false) else - request.setAttribute("isCurrentProject", true); - if (request.getAttribute("currentProject") != context.projectId) - request.setAttribute("currentProject", context.projectId); - return (boolean)request.getAttribute("isCurrentProject"); + request.setAttribute('isCurrentProject', true) + if (request.getAttribute('currentProject') != context.projectId) + request.setAttribute('currentProject', context.projectId) + return (boolean)request.getAttribute('isCurrentProject') }" type="Boolean"/> <set field="isCurrentCompany" value="${groovy: - if (request.getAttribute("currentCompany") != context.companyId) - request.setAttribute("isCurrentCompany", false); + if (request.getAttribute('currentCompany') != context.companyId) + request.setAttribute('isCurrentCompany', false) else - request.setAttribute("isCurrentCompany", true); - if (request.getAttribute("currentCompany") != context.companyId) - request.setAttribute("currentCompany", context.companyId); - return (boolean)request.getAttribute("isCurrentCompany"); + request.setAttribute('isCurrentCompany', true) + if (request.getAttribute('currentCompany') != context.companyId) + request.setAttribute('currentCompany', context.companyId) + return (boolean)request.getAttribute('isCurrentCompany') }" type="Boolean"/> <set field="estimatedHrs" value="${sprintEstimatedMilliSeconds/1000/60/60/40}" type="Integer"/> @@ -1220,22 +1219,22 @@ under the License. <parameter param-name="partyId" from-field="productOwnerId"/> </hyperlink> </field> - <field name="dummy" title=" " position="2" use-when=""${sprintId}"!="""><display description=" "/></field> - <field name="sprintName" title="${uiLabelMap.ScrumTab} ${uiLabelMap.ScrumSprint}" position="2" use-when=""${sprintId}"!="""> + <field name="dummy" title=" " position="2" use-when="sprintId!=''"><display description=" "/></field> + <field name="sprintName" title="${uiLabelMap.ScrumTab} ${uiLabelMap.ScrumSprint}" position="2" use-when="sprintId!=''"> <hyperlink description="${uiLabelMap.ScrumTab} ${sprintName} [${sprintId}]" target="ViewSprint"> <parameter param-name="projectId"/> <parameter param-name="sprintId"/> </hyperlink> </field> - <field name="sprintCurrentStatusId" title="${uiLabelMap.CommonStatus}" position="2" use-when=""${sprintId}"!="""> + <field name="sprintCurrentStatusId" title="${uiLabelMap.CommonStatus}" position="2" use-when="sprintId!=''"> <display-entity entity-name="StatusItem" key-field-name="statusId"/> </field> - <field name="estimatedHrs" title="${uiLabelMap.ScrumSprintLengthWeeks}" position="2" use-when=""${sprintId}"!="""><display/></field> - <field name="planHours" title="${uiLabelMap.ScrumPlannedHours}" position="2" use-when=""${sprintId}"!="""><display/></field> - <field name="actualHours" title="${uiLabelMap.ScrumActualHours}" position="2" use-when=""${sprintId}"!="""><display/></field> - <field name="actualHoursNotBillYet" title="${uiLabelMap.ScrumActualHoursNotBill}" position="2" use-when=""${sprintId}"!="""><display/></field> - <field name="sprintActualStartDate" title="${uiLabelMap.CommonStartDate}" position="2" use-when=""${sprintId}"!="""><display type="date"></display></field> - <field name="sprintActualCompletionDate" title="${uiLabelMap.CommonEndDate}" position="2" use-when=""${sprintId}"!="""><display type="date"></display></field> + <field name="estimatedHrs" title="${uiLabelMap.ScrumSprintLengthWeeks}" position="2" use-when="sprintId!=''"><display/></field> + <field name="planHours" title="${uiLabelMap.ScrumPlannedHours}" position="2" use-when="sprintId!=''"><display/></field> + <field name="actualHours" title="${uiLabelMap.ScrumActualHours}" position="2" use-when="sprintId!=''"><display/></field> + <field name="actualHoursNotBillYet" title="${uiLabelMap.ScrumActualHoursNotBill}" position="2" use-when="sprintId!=''"><display/></field> + <field name="sprintActualStartDate" title="${uiLabelMap.CommonStartDate}" position="2" use-when="sprintId!=''"><display type="date"></display></field> + <field name="sprintActualCompletionDate" title="${uiLabelMap.CommonEndDate}" position="2" use-when="sprintId!=''"><display type="date"></display></field> </form> <form name="ProjectListWithNoLinkProfile" extends="ProjectList"> <field name="companyId" title="${uiLabelMap.ScrumOwnerCompany}" position="1" use-when="!isCurrentCompany" widget-style="buttontext"> @@ -1248,18 +1247,18 @@ under the License. <form name="ProjectAndSprintListInfo" type="list" target="ViewProduct" paginate-target="ViewProduct" odd-row-style="alternate-row" default-table-style="basic-table hover-bar" list-name="sprints"> <actions> - <set field="isCurrentProject" value="${groovy: request.setAttribute("isCurrentProject", false);}" type="Boolean"/> - <set field="currentProject" value="${groovy: request.setAttribute("currentProject", ' ');}" type="String"/> + <set field="isCurrentProject" value="${groovy: request.setAttribute('isCurrentProject', false)}" type="Boolean"/> + <set field="currentProject" value="${groovy: request.setAttribute('currentProject', ' ')}" type="String"/> </actions> <row-actions> <set field="isCurrentProject" value="${groovy: - if (request.getAttribute("currentProject") != context.projectId) - request.setAttribute("isCurrentProject", false); + if (request.getAttribute('currentProject') != context.projectId) + request.setAttribute('isCurrentProject', false) else - request.setAttribute("isCurrentProject", true); - if (request.getAttribute("currentProject") != context.projectId) - request.setAttribute("currentProject", context.projectId); - return (boolean)request.getAttribute("isCurrentProject"); + request.setAttribute('isCurrentProject', true) + if (request.getAttribute('currentProject') != context.projectId) + request.setAttribute('currentProject', context.projectId) + return (boolean)request.getAttribute('isCurrentProject') }" type="Boolean"/> <service service-name="getScrumProject" result-map="result"> @@ -1293,21 +1292,21 @@ under the License. <parameter param-name="projectId" from-field="workEffortId"/> </hyperlink> </field> - <field name="sprintName" title="${uiLabelMap.ScrumTab} ${uiLabelMap.ScrumSprint}" position="2" use-when=""${sprintId}"!="""> + <field name="sprintName" title="${uiLabelMap.ScrumTab} ${uiLabelMap.ScrumSprint}" position="2" use-when="sprintId!=''"> <hyperlink description="${uiLabelMap.ScrumTab} ${sprintName} [${sprintId}]" target="ViewSprint"> <parameter param-name="projectId"/> <parameter param-name="sprintId"/> </hyperlink> </field> - <field name="sprintCurrentStatusId" title="${uiLabelMap.CommonStatus}" position="2" use-when=""${sprintId}"!="""> + <field name="sprintCurrentStatusId" title="${uiLabelMap.CommonStatus}" position="2" use-when="sprintId!=''"> <display-entity entity-name="StatusItem" key-field-name="statusId"/> </field> - <field name="estimatedHrs" title="${uiLabelMap.ScrumSprintLengthWeeks}" position="2" use-when=""${sprintId}"!="""><display/></field> - <field name="planHours" title="${uiLabelMap.ScrumPlannedHours}" position="2" use-when=""${sprintId}"!="""><display/></field> - <field name="actualHours" title="${uiLabelMap.ScrumActualHours}" position="2" use-when=""${sprintId}"!="""><display/></field> - <field name="actualHoursNotBillYet" title="${uiLabelMap.ScrumActualHoursNotBill}" position="2" use-when=""${sprintId}"!="""><display/></field> - <field name="sprintActualStartDate" title="${uiLabelMap.CommonStartDate}" position="2" use-when=""${sprintId}"!="""><display type="date"></display></field> - <field name="sprintActualCompletionDate" title="${uiLabelMap.CommonEndDate}" position="2" use-when=""${sprintId}"!="""><display type="date"></display></field> + <field name="estimatedHrs" title="${uiLabelMap.ScrumSprintLengthWeeks}" position="2" use-when="sprintId!=''"><display/></field> + <field name="planHours" title="${uiLabelMap.ScrumPlannedHours}" position="2" use-when="sprintId!=''"><display/></field> + <field name="actualHours" title="${uiLabelMap.ScrumActualHours}" position="2" use-when="sprintId!=''"><display/></field> + <field name="actualHoursNotBillYet" title="${uiLabelMap.ScrumActualHoursNotBill}" position="2" use-when="sprintId!=''"><display/></field> + <field name="sprintActualStartDate" title="${uiLabelMap.CommonStartDate}" position="2" use-when="sprintId!=''"><display type="date"></display></field> + <field name="sprintActualCompletionDate" title="${uiLabelMap.CommonEndDate}" position="2" use-when="sprintId!=''"><display type="date"></display></field> </form> <form name="SprintListInfo" extends="SprintList" odd-row-style="alternate-row" even-row-style="even-row" header-row-style="header-row" default-table-style="basic-table hover-bar" paginate-target="viewScrumProject"> <actions> @@ -1388,25 +1387,25 @@ under the License. <entity-and entity-name="CustRequestNote" list="custRequestNote"> <field-map field-name="custRequestId" from-field="parameters.custRequestId"/> </entity-and> - <set field="test" value="${groovy: println("dddddddddddddddddddddddddddddd"+custRequestNote)}"/> + <set field="test" value="${groovy: logInfo('dddddddddddddddddddddddddddddd' + custRequestNote)}"/> <set field="noteId" from-field="custRequestNote[0].noteId"/> <entity-and entity-name="NoteData" list="Question1"> <field-map field-name="noteId" from-field="custRequestNote[0].noteId"/> <field-map field-name="noteName" value="Question1"/> </entity-and> - <set field="test" value="${groovy: println("dddddddddddddddddddddddddddddd"+Question1)}"/> + <set field="test" value="${groovy: logInfo('dddddddddddddddddddddddddddddd' + Question1)}"/> <set field="noteId" from-field="custRequestNote[1].noteId"/> <entity-and entity-name="NoteData" list="Question2"> <field-map field-name="noteId" from-field="custRequestNote[1].noteId"/> <field-map field-name="noteName" value="Question1"/> </entity-and> - <set field="test" value="${groovy: println("dddddddddddddddddddddddddddddd"+Question2)}"/> + <set field="test" value="${groovy: logInfo('dddddddddddddddddddddddddddddd' + Question2)}"/> <set field="noteId" from-field="custRequestNote[2].noteId"/> <entity-and entity-name="NoteData" list="Question1"> <field-map field-name="noteId" from-field="custRequestNote[2].noteId"/> <field-map field-name="noteName" value="Question3"/> </entity-and> - <set field="test" value="${groovy: println("dddddddddddddddddddddddddddddd"+Question3)}"/> + <set field="test" value="${groovy: logInfo('dddddddddddddddddddddddddddddd' + Question3)}"/> </actions> <field name="custRequestId"><hidden value="${parameters.custRequestId}"/></field> <field name="createdDate" title="Create Date Perform"><display/></field> @@ -1432,7 +1431,7 @@ under the License. </condition-list> <order-by field-name="custSequenceNum"/> </entity-condition> - <set field="maxNum" value="${groovy: return productBacklog.size();}"/> + <set field="maxNum" value="${util:size(productBacklog)}"/> </actions> <field name="projectId"><hidden></hidden></field> <field name="sprintId"><hidden/></field> @@ -1452,14 +1451,14 @@ under the License. <display-entity entity-name="CustRequest" key-field-name="custRequestId" description="${custRequestName}"></display-entity> </field> <field name="custSequenceNum"><display/></field> - <field name="estimatedHours" title="${uiLabelMap.ScrumPlannedHours}"><text default-value="${groovy:return custRequest.custEstimatedMilliSeconds/3600000}"/></field> + <field name="estimatedHours" title="${uiLabelMap.ScrumPlannedHours}"><text default-value="${groovy: custRequest.custEstimatedMilliSeconds / 3600000}"/></field> <field name="submitButton" title="${uiLabelMap.CommonUpdate}"><submit/></field> </form> <!-- Product --> <form name="EditProduct" type="single" target="createProductAndRole" default-map-name="product"> <actions> <set field="supportDiscontinuationDate" from-field="supportDiscontinuationDate"/> - <set field="statusId" value="${groovy: if(supportDiscontinuationDate == null) return 'PRODUCT_ACTIVE' else return 'PRODUCT_CLOSED'}"/> + <set field="statusId" value="${groovy: supportDiscontinuationDate ? 'PRODUCT_ACTIVE' : 'PRODUCT_CLOSED'}"/> </actions> <alt-target use-when="product!=null" target="updateProduct"/> <field name="partyCompany"><hidden/></field> @@ -1535,7 +1534,7 @@ under the License. <field-map field-name="partyId" from-field="productRole[0].partyId"/> </entity-and> <set field="supportDiscontinuationDate" from-field="product.supportDiscontinuationDate"/> - <set field="statusMap.statusId" value="${groovy: if(supportDiscontinuationDate == null) return 'PRODUCT_ACTIVE' else return 'PRODUCT_CLOSED'}"/> + <set field="statusMap.statusId" value="${groovy: supportDiscontinuationDate ? 'PRODUCT_ACTIVE' : 'PRODUCT_CLOSED'}"/> </actions> <field name="productOwerId" title="${uiLabelMap.ScrumCompanyAndProductOwner}"> <hyperlink description="${parties[0].groupName} -- ${parties[0].lastName} ${parties[0].firstName} ${parties[0].middleName}" target="viewprofile"> @@ -1630,7 +1629,7 @@ under the License. <field-map field-name="productId" from-field="productId"/> </entity-one> <set field="longDescription" from-field="product.longDescription"/> - <set field="statusId" value="${groovy: if(product.supportDiscontinuationDate == null) return 'PRODUCT_ACTIVE' else return 'PRODUCT_CLOSED'}"/> + <set field="statusId" value="${groovy: !product.supportDiscontinuationDate ? 'PRODUCT_ACTIVE' : 'PRODUCT_CLOSED'}"/> <entity-and entity-name="PartyRelationshipAndPartyDetail" list="company"> <field-map field-name="partyId" from-field="partyId"/> <field-map field-name="roleTypeIdFrom" value="ACCOUNT"/> @@ -1716,7 +1715,7 @@ under the License. </entity-one> <set field="internalName" from-field="product.internalName"/> <set field="longDescription" from-field="product.longDescription"/> - <set field="statusId" value="${groovy: if(product.supportDiscontinuationDate == null) return 'PRODUCT_ACTIVE' else return 'PRODUCT_CLOSED'}"/> + <set field="statusId" value="${groovy: !product.supportDiscontinuationDate ? 'PRODUCT_ACTIVE' : 'PRODUCT_CLOSED'}"/> <entity-and entity-name="PartyRelationshipAndPartyDetail" list="company"> <field-map field-name="partyId" from-field="partyId"/> <field-map field-name="roleTypeIdFrom" value="ACCOUNT"/> @@ -1775,7 +1774,7 @@ under the License. <form name="HoursNotYetBilled" type="multi" list-name="hoursNotYetBilledTasks" use-row-submit="false" paginate-target="ProductBilling" odd-row-style="alternate-row" default-table-style="basic-table hover-bar" target="updateNotBilledBacklog?productId=${productId}&fromDate=${fromDate}&thruDate=${thruDate}&includeMeeting=${includeMeeting}&VIEW_SIZE_1=${parameters.VIEW_SIZE_1}&VIEW_INDEX_1=${parameters.VIEW_INDEX_1}"> <row-actions> - <set field="showPosition1" value="${groovy:String prev=(String)previousItem.get("custRequestId");return !(prev!=null&&prev.equals(custRequestId));}" type="Boolean"/> + <set field="showPosition1" value="${groovy: previousItem.custRequestId != custRequestId}" type="Boolean"/> <entity-one entity-name="WorkEffort" value-field="project"> <field-map field-name="workEffortId" from-field="projectId"/> </entity-one> @@ -1851,13 +1850,13 @@ under the License. <option key="N"/> </drop-down> </field> - <field name="reCreate" position="1" title="${uiLabelMap.ScrumRecreateInvoice}: ${invoiceId}" use-when="context.get("invoiceId")!=null"> + <field name="reCreate" position="1" title="${uiLabelMap.ScrumRecreateInvoice}: ${invoiceId}" use-when="context.get('invoiceId')!=null"> <drop-down no-current-selected-key="N"> <option key="Y" description="${uiLabelMap.CommonYes}"/> <option key="N" description="${uiLabelMap.CommonNo}"/> </drop-down> </field> - <field name="invoiceDate" title="${uiLabelMap.ScrumInvoiceDate}" use-when="context.get("invoiceId")!=null"><date-time type="date"></date-time></field> + <field name="invoiceDate" title="${uiLabelMap.ScrumInvoiceDate}" use-when="context.get('invoiceId')!=null"><date-time type="date"></date-time></field> <field name="submitButton" title="${uiLabelMap.PageTitleAddProjectTimeToNewInvoice}" widget-style="smallSubmit"><submit button-type="button"/></field> </form> <form name="FindProductBilling" type="single" target="ProductBilling"> @@ -1928,10 +1927,8 @@ under the License. <field-map field-name="statusId" from-field="statusId"/> </entity-one> <set field="custRequestType" value="${groovy: - if (custRequest.custRequestTypeId.equals("RF_UNPLAN_BACKLOG")) - custRequestType = "Y" - else - custRequestType = "N" + custRequest.custRequestTypeId == 'RF_UNPLAN_BACKLOG' ? + custRequestType = 'Y' : 'N' }"/> <service service-name="getScrumActualHour" result-map="resultMap"> <field-map field-name="custRequestId" from-field="custRequestId"/> @@ -1985,8 +1982,8 @@ under the License. <entity-one entity-name="CustRequest" value-field="custRequest"/> <set field="description" from-field="custRequest.description"/> <set field="custRequestCategoryGroupId" from-field="parentCustRequestId"/> - <set field="estimatedHours" value="${groovy:custEstimatedMilliSeconds!=null?custEstimatedMilliSeconds/3600000:0;}"/> - <set field="showPosition1" value="${groovy:String prev=(String)previousItem.get("parentCustRequestId");return new Boolean(!(prev!=null&&prev.equals(parentCustRequestId)));}" type="Boolean"/> + <set field="estimatedHours" value="${groovy:custEstimatedMilliSeconds ? custEstimatedMilliSeconds / 3600000 : 0}"/> + <set field="showPosition1" value="${groovy:previousItem.parentCustRequestId != parentCustRequestId}" type="Boolean"/> </row-actions> <field name="custSequenceNum" position="2" title="${uiLabelMap.ScrumSeq}"><display/></field> <field name="custRequestId" position="2" title="${uiLabelMap.ScrumProductBacklogItem}"> @@ -1998,7 +1995,7 @@ under the License. <field name="statusId" title="${uiLabelMap.CommonStatus}" position="2"> <display-entity entity-name="StatusItem" key-field-name="statusId"/> </field> - <field name="custRequestCategoryGroupId" position="1" use-when="${groovy:showPosition1==true&&sequence.equals("N")}" title="${uiLabelMap.ScrumCategory}" widget-style="h3"> + <field name="custRequestCategoryGroupId" position="1" use-when="${groovy:showPosition1 && sequence == 'N'}" title="${uiLabelMap.ScrumCategory}" widget-style="h3"> <display-entity entity-name="CustRequest" key-field-name="custRequestId" description="${custRequestName}"/> </field> <field name="parentCustRequestId" position="2" title="${uiLabelMap.ScrumCategory}"> @@ -2018,8 +2015,8 @@ under the License. <row-actions> <entity-one entity-name="CustRequest" value-field="custRequest"/> <set field="description" from-field="custRequest.description"/> - <set field="estimatedHours" value="${groovy:custEstimatedMilliSeconds!=null?custEstimatedMilliSeconds/3600000:0;}"/> - <set field="showPosition1" value="${groovy:String prev=(String)previousItem.get("productId");return new Boolean(!(prev!=null&&prev.equals(productId)));}" type="Boolean"/> + <set field="estimatedHours" value="${groovy:custEstimatedMilliSeconds ? custEstimatedMilliSeconds / 3600000 : 0}"/> + <set field="showPosition1" value="${groovy:productId != previousItem.productId}" type="Boolean"/> </row-actions> <field name="productId" title="${uiLabelMap.PageTitleProduct}" position="1" use-when="showPosition1"> <display-entity entity-name="Product" description="${internalName} " key-field-name="productId"> @@ -2064,12 +2061,12 @@ under the License. <field name="submitButton" title="${uiLabelMap.CommonDelete}"><hidden/></field> </form> <form name="ViewSprintBacklogListItemsNoAction" extends="SprintBacklogListItems"> - <field name="planHours" title="${uiLabelMap.ScrumPlannedHours}" position="2" use-when="!"SCRUM_SPRINT".equals(taskTypeId)"><display/></field> + <field name="planHours" title="${uiLabelMap.ScrumPlannedHours}" position="2" use-when="!'SCRUM_SPRINT'.equals(taskTypeId)"><display/></field> <field name="deleteButton" position="1" use-when="showPosition1"><hidden/></field> - <field name="deleteTaskButton" position="2" use-when="!"STS_COMPLETED".equals(taskCurrentStatusId)&&!"SCRUM_SPRINT".equals(taskTypeId)"><hidden/></field> - <field name="setCompleteButton" position="2" use-when="!"STS_COMPLETED".equals(taskCurrentStatusId)&&!"SCRUM_SPRINT".equals(taskTypeId)"><hidden/></field> - <field name="editTaskParty" position="2" use-when="!"STS_COMPLETED".equals(taskCurrentStatusId)&&!"SCRUM_SPRINT".equals(taskTypeId)"><hidden/></field> - <field name="newTask" use-when="showPosition1&&!"CRQ_COMPLETED".equals("${custRequest.statusId}")"><hidden/></field> + <field name="deleteTaskButton" position="2" use-when="!'STS_COMPLETED'.equals(taskCurrentStatusId)&&!'SCRUM_SPRINT'.equals(taskTypeId)"><hidden/></field> + <field name="setCompleteButton" position="2" use-when="!'STS_COMPLETED'.equals(taskCurrentStatusId)&&!'SCRUM_SPRINT'.equals(taskTypeId)"><hidden/></field> + <field name="editTaskParty" position="2" use-when="!'STS_COMPLETED'.equals(taskCurrentStatusId)&&!'SCRUM_SPRINT'.equals(taskTypeId)"><hidden/></field> + <field name="newTask" use-when="showPosition1&&!'CRQ_COMPLETED'.equals('${custRequest.statusId}')"><hidden/></field> <sort-order> <sort-field name="custRequestId"/> <sort-field name="taskId"/> @@ -2095,7 +2092,7 @@ under the License. <entity-and entity-name="PartyDetailAndWorkEffortAssign" list="sprintMembers" filter-by-date="true"> <field-map field-name="workEffortId" from-field="sprintId"/> </entity-and> - <set field="partyId" value="${groovy: if (assignTo.size() != 0) return assignTo.get(0).getString("partyId")}"/> + <set field="partyId" value="${groovy: if (assignTo.size() != 0) return assignTo.first().partyId}"/> <service service-name="getScrumActualHour" result-map="results"> <field-map field-name="taskId" from-field="taskId"/> </service> @@ -2357,7 +2354,7 @@ under the License. <field name="actualHours"><hidden/></field> <field name="UpdateButton"><hidden/></field> <field name="custRequestId1" title="${uiLabelMap.ScrumSprintBacklog}"> - <display description="${groovy:return sprint.getString("workEffortName")+' - '+backlog.getString("description");}"/> + <display description="${groovy: sprint.workEffortName + ' - ' + backlog.description}"/> </field> <field name="createButton"><hidden/></field> <field name="createButton1" title="${uiLabelMap.CommonCreate}"><submit/></field> @@ -2366,8 +2363,8 @@ under the License. <form name="ListProduct" type="list" default-entity-name="ProductRole" use-row-submit="true" list-name="listIt" target="deleteProduct" paginate-target="main" separate-columns="true" odd-row-style="alternate-row" even-row-style="even-row" header-row-style="header-row" default-table-style="basic-table hover-bar"> <actions> - <set field="isCurrentCompany" value="${groovy: request.setAttribute("isCurrentCompany", false);}" type="Boolean"/> - <set field="currentCompany" value="${groovy: request.setAttribute("currentCompany", ' ');}" type="String"/> + <set field="isCurrentCompany" value="${groovy: request.setAttribute('isCurrentCompany', false)}" type="Boolean"/> + <set field="currentCompany" value="${groovy: request.setAttribute('currentCompany', ' ')}" type="String"/> </actions> <row-actions> <entity-one entity-name="Product" value-field="product"> @@ -2389,26 +2386,26 @@ under the License. <field-map field-name="partyId" from-field="ownerRoles[0].partyId"/> </entity-one> <set field="isCurrentCompany" value="${groovy: - if (request.getAttribute("currentCompany") != context.groupName) - request.setAttribute("isCurrentCompany", false); + if (request.getAttribute('currentCompany') != context.groupName) + request.setAttribute('isCurrentCompany', false) else - request.setAttribute("isCurrentCompany", true); - if (request.getAttribute("currentCompany") != context.groupName) - request.setAttribute("currentCompany", context.groupName); - return (boolean)request.getAttribute("isCurrentCompany"); + request.setAttribute('isCurrentCompany', true) + if (request.getAttribute('currentCompany') != context.groupName) + request.setAttribute('currentCompany', context.groupName) + return (boolean)request.getAttribute('isCurrentCompany'); }" type="Boolean"/> <set field="groupId" from-field="partyAndSecurityGroupList[0].groupId"/> <set field="productTartget" value="${groovy: - if ("SCRUM_PRODUCT_OWNER".equals(groupId)) - productTartget = "AddProdBacklog" - else if ("SCRUM_MASTER".equals(groupId) || "SCRUM_TEAM".equals(groupId) || "SCRUM_STAKEHOLDER".equals(groupId)) - productTartget = "ViewTotalBacklog" + if (groupId == 'SCRUM_PRODUCT_OWNER') + productTartget = 'AddProdBacklog' + else if (['SCRUM_MASTER', 'SCRUM_TEAM', 'SCRUM_STAKEHOLDER'].contains(groupId)) + productTartget = 'ViewTotalBacklog' else - productTartget = "ViewProduct" + productTartget = 'ViewProduct' }"/> <set field="supportDiscontinuationDate" from-field="supportDiscontinuationDate"/> - <set field="statusId" value="${groovy: if(supportDiscontinuationDate == null) return 'PRODUCT_ACTIVE' else return 'PRODUCT_CLOSED'}"/> + <set field="statusId" value="${groovy: !supportDiscontinuationDate ? 'PRODUCT_ACTIVE' : 'PRODUCT_CLOSED'}"/> </row-actions> <field name="isCurrentCompany"><hidden/></field> <field name="partyId"><hidden/></field> @@ -2506,12 +2503,12 @@ under the License. <field name="workEffortContentTypeId"><hidden/></field> <field name="mimeTypeId"><hidden/></field> <field name="contentTypeId"><display description="${descContent.description}"/></field> - <field name="contentName" use-when="headerItem.equals("EditProjectContents")"> + <field name="contentName" use-when="headerItem.equals('EditProjectContents')"> <display description="${contentMap.contentName} ${contentId}"/> </field> <field name="thruDate"><ignored/></field> <field name="submitButton"><ignored/></field> - <field name="deleteLink" title=" " widget-style="buttontext" use-when="headerItem.equals("EditProjectContents")"> + <field name="deleteLink" title=" " widget-style="buttontext" use-when="headerItem.equals('EditProjectContents')"> <hyperlink description="${uiLabelMap.CommonDelete}" target="deleteProjectContent" also-hidden="false" request-confirmation="true"> <parameter param-name="contentId"/> <parameter param-name="workEffortId"/> @@ -2744,8 +2741,8 @@ under the License. <entity-and entity-name="WorkEffortPartyAssignment" list="assignTo" filter-by-date="true"> <field-map field-name="workEffortId" from-field="taskId"/> </entity-and> - <set field="partyId" value="${groovy: if (assignTo.size() != 0) return assignTo.get(0).getString("partyId")}"/> - <set field="taskActualMilliSeconds" value="${groovy: if (resultTask.actualMilliSeconds != null) return actualMilliSeconds/3600000}"/> + <set field="partyId" value="${groovy: if (assignTo.size() != 0) return assignTo.first().partyId}"/> + <set field="taskActualMilliSeconds" value="${groovy: if (resultTask.actualMilliSeconds) return actualMilliSeconds/3600000}"/> <service service-name="getScrumActualHour" result-map="result"> <field-map field-name="taskId" from-field="taskId"/> </service> @@ -2789,10 +2786,9 @@ under the License. </service> <set field="actualHours" from-field="resultMap.actualHours" default-value="0" type="Double"/> <set field="actualHoursMessage" value="${groovy: - if (actualHours > 0) - actualHoursMessage = "There are already "+ actualHours +" hours have been spent on this backlog item, Are you sure you want to delete?" - else - actualHoursMessage = "Are you sure to delete selected product backlog item(s)?" + actualHours > 0 + ? 'There are already '+ actualHours +' hours have been spent on this backlog item, Are you sure you want to delete?' + : 'Are you sure to delete selected product backlog item(s)?' }"/> </actions> <field name="reason"><textarea/> </field> @@ -2805,10 +2801,9 @@ under the License. </service> <set field="actualHours" from-field="resultMap.actualHours" default-value="0" type="Double"/> <set field="actualHoursMessage" value="${groovy: - if (actualHours > 0) - actualHoursMessage = "There are already "+ actualHours +" hours have been spent on this backlog item, Are you sure you want to delete?" - else - actualHoursMessage = "Are you sure to delete selected product backlog item(s)?" + actualHours > 0 + ? 'There are already '+ actualHours +' hours have been spent on this backlog item, Are you sure you want to delete?' + : 'Are you sure to delete selected product backlog item(s)?' }"/> </actions> <field name="reason"><textarea/> </field> @@ -2837,7 +2832,7 @@ under the License. <option key="N" description="${uiLabelMap.CommonNo}"/> </drop-down> </field> - <field name="productId" title="${uiLabelMap.ScrumProductName}" use-when="${groovy: unplanned.equals("Y")}" event="onchange" action="javascript:document.QuickAddBacklog.action='QuickAddBacklog';document.QuickAddBacklog.submit();" + <field name="productId" title="${uiLabelMap.ScrumProductName}" use-when="${groovy: unplanned == 'Y'}" event="onchange" action="javascript:document.QuickAddBacklog.action='QuickAddBacklog';document.QuickAddBacklog.submit();" required-field="true"> <drop-down allow-empty="true"> <entity-options description="${groupName} -- ${internalName}[${productId}]" entity-name="ProductAndRole" key-field-name="productId"> @@ -2848,7 +2843,7 @@ under the License. </entity-options> </drop-down> </field> - <field name="keyId" title="${uiLabelMap.ScrumProduct} ${uiLabelMap.ScrumProject} ${uiLabelMap.ScrumSprint}" use-when="${groovy: unplanned.equals("N")}" event="onchange" action="javascript:document.QuickAddBacklog.action='QuickAddBacklog';document.QuickAddBacklog.submit();" + <field name="keyId" title="${uiLabelMap.ScrumProduct} ${uiLabelMap.ScrumProject} ${uiLabelMap.ScrumSprint}" use-when="${groovy: unplanned == 'N'}" event="onchange" action="javascript:document.QuickAddBacklog.action='QuickAddBacklog';document.QuickAddBacklog.submit();" required-field="true"> <drop-down allow-empty="true"> <list-options key-name="keyId" list-name="workEffortList" description="[${productId}] ${internalName} -- [${projectId}] ${projectName} -- [${sprintId}] ${sprintName}"/> @@ -2920,7 +2915,7 @@ under the License. <row-actions> <entity-one entity-name="CustRequest" value-field="custRequest"/> <set field="product" from-field="custRequest.description"/> - <set field="estimatedHours" value="${groovy:custEstimatedMilliSeconds!=null?custEstimatedMilliSeconds/3600000:0;}"/> + <set field="estimatedHours" value="${groovy:custEstimatedMilliSeconds ? custEstimatedMilliSeconds / 3600000 : 0}"/> <set field="custRequestCategoryGroupId" from-field="parentCustRequestId"/> </row-actions> <field name="UnplannedSequence"><hidden value="Y"/></field> @@ -2931,8 +2926,8 @@ under the License. <parameter param-name="statusId" from-field="parameters.statusId"/> </hyperlink> </field> - <!--<field name="estimatedHours" title="${uiLabelMap.ScrumPlannedHours}" use-when=""${statusId}"=="CRQ_ACCEPTED""><text size="3"/></field> - <field name="estimatedHours" title="${uiLabelMap.ScrumPlannedHours}" use-when=""${statusId}"=="CRQ_REVIEWED""><display/></field>--> + <!--<field name="estimatedHours" title="${uiLabelMap.ScrumPlannedHours}" use-when="statusId=='CRQ_ACCEPTED'"><text size="3"/></field> + <field name="estimatedHours" title="${uiLabelMap.ScrumPlannedHours}" use-when="statusId=='CRQ_REVIEWED'"><display/></field>--> <field name="parentCustRequestId" title="${uiLabelMap.ScrumCategory}"> <drop-down allow-empty="true"> <entity-options description="${custRequestName}" entity-name="CustRequestAndCustRequestItem" key-field-name="custRequestId"> @@ -2941,14 +2936,14 @@ under the License. </entity-options> </drop-down> </field> - <field name="setToReview" title="${uiLabelMap.ScrumMoveToUnplannedSprint}" widget-style="buttontext" use-when=""${statusId}"=="CRQ_ACCEPTED"||"${statusId}"=="CRQ_REOPENED"" > + <field name="setToReview" title="${uiLabelMap.ScrumMoveToUnplannedSprint}" widget-style="buttontext" use-when="['CRQ_ACCEPTED', 'CRQ_REOPENED'].contains(statusId)" > <hyperlink description="${uiLabelMap.ScrumMoveToUnplannedSprint}" target="setUnplannedSprint"> <parameter param-name="custRequestId" from-field="parameters.custRequestId"/> <parameter param-name="productId" from-field="parameters.productId"/> <parameter param-name="statusId" from-field="custRequest.statusId"/> </hyperlink> </field> - <field name="setToReview" title="${uiLabelMap.ScrumMoveToUnplannedSprint}" use-when=""${statusId}"=="CRQ_REVIEWED""><hidden /></field> + <field name="setToReview" title="${uiLabelMap.ScrumMoveToUnplannedSprint}" use-when="statusId == 'CRQ_REVIEWED'"><hidden /></field> <field name="dummy2" title="${uiLabelMap.CommonDelete}"><display description=" "/></field> <field name="submitButton" widget-style="buttontext"><submit button-type="text-link"/></field> </form> @@ -2976,7 +2971,7 @@ under the License. </service> <set field="planHours" from-field="taskPlanHourOutMap.planHours"/> <!-- condition --> - <set field="showPosition1" value="${groovy:String prev=(String)previousItem.get("custRequestId");return new Boolean(!(prev!=null&&prev.equals(custRequestId)));}" type="Boolean"/> + <set field="showPosition1" value="${groovy:previousItem.custRequestId != custRequestId}" type="Boolean"/> <!-- Get list of task for each sprint backlog --> <entity-and entity-name="WorkEffortPartyAssignView" list="assignedTos"> <field-map field-name="workEffortId" from-field="workEffortId"/> @@ -3005,18 +3000,18 @@ under the License. <set field="productId" from-field="custRequestItems[0].productId"/> </row-actions> <field name="productId" position="2"><hidden/></field> - <field name="custRequestId" title="${uiLabelMap.PageTitleUnplanBacklogItem}" position="1" use-when="showPosition1&&"${custRequestTypeId}"!="RF_SCRUM_MEETINGS""> + <field name="custRequestId" title="${uiLabelMap.PageTitleUnplanBacklogItem}" position="1" use-when="showPosition1&&'${custRequestTypeId}'!='RF_SCRUM_MEETINGS'"> <display-entity entity-name="CustRequest" key-field-name="custRequestId" description=" "> <sub-hyperlink target="ViewProdBacklogItem" description="${context.description} - [${custRequestId}]" link-type="hidden-form" target-window="_BLANK" link-style="buttontext"> <parameter param-name="custRequestId"/> </sub-hyperlink> </display-entity> </field> - <field name="custRequestId" title="${uiLabelMap.ScrumSprintBacklog}" position="1" use-when="showPosition1&&"${custRequestTypeId}"=="RF_SCRUM_MEETINGS"" widget-style="disabled"> + <field name="custRequestId" title="${uiLabelMap.ScrumSprintBacklog}" position="1" use-when="showPosition1&&'${custRequestTypeId}'=='RF_SCRUM_MEETINGS'" widget-style="disabled"> <display-entity entity-name="CustRequest" key-field-name="custRequestId" description="${context.description} - [${custRequestId}]"> </display-entity> </field> - <field name="statusId" title="${uiLabelMap.ScrumStatusBacklog}" position="1" use-when="showPosition1&&"Any".equals(paraBacklogStatusId)"> + <field name="statusId" title="${uiLabelMap.ScrumStatusBacklog}" position="1" use-when="showPosition1&&'Any'.equals(paraBacklogStatusId)"> <display-entity entity-name="StatusItem" key-field-name="statusId"/> </field> <field name="workEffortId" title="${uiLabelMap.ScrumTab} ${uiLabelMap.ScrumTask}" position="2" use-when="workEffortId!=null"> @@ -3029,8 +3024,8 @@ under the License. <field name="workEffortTypeId" title="${uiLabelMap.ScrumTab} ${uiLabelMap.ScrumTaskType}" position="2" use-when="workEffortId!=null"> <display-entity entity-name="WorkEffortType" key-field-name="workEffortTypeId" description="${uiLabelMap.ScrumTab} ${description}"/> </field> - <field name="currentStatusId" title="${uiLabelMap.CommonStatus}" position="2" use-when="!"STS_COMPLETED".equals(currentStatusId)"><display-entity entity-name="StatusItem" key-field-name="statusId"/></field> - <field name="currentStatusId" title="${uiLabelMap.CommonStatus}" position="2" use-when=""STS_COMPLETED".equals(currentStatusId)" widget-style="alert"><display-entity entity-name="StatusItem" key-field-name="statusId"/></field> + <field name="currentStatusId" title="${uiLabelMap.CommonStatus}" position="2" use-when="!'STS_COMPLETED'.equals(currentStatusId)"><display-entity entity-name="StatusItem" key-field-name="statusId"/></field> + <field name="currentStatusId" title="${uiLabelMap.CommonStatus}" position="2" use-when="'STS_COMPLETED'.equals(currentStatusId)" widget-style="alert"><display-entity entity-name="StatusItem" key-field-name="statusId"/></field> <field name="dummy1" title=" " position="1" use-when="showPosition1"><display description=" "/></field> <field name="dummy2" title=" " position="1" use-when="showPosition1"><display description=" "/></field> <field name="dummy3" title=" " position="1" use-when="showPosition1"><display description=" "/></field> @@ -3041,14 +3036,14 @@ under the License. <field name="planHours" title="${uiLabelMap.ScrumPlannedHours}" position="2" use-when="workEffortId!=null"> <display/> </field> - <field name="deleteButton" title=" " position="1" use-when="showPosition1&&!"CRQ_COMPLETED".equals("${custRequest.statusId}")" widget-style="buttontext"> + <field name="deleteButton" title=" " position="1" use-when="showPosition1&&!'CRQ_COMPLETED'.equals('${custRequest.statusId}')" widget-style="buttontext"> <hyperlink description="Delete" target="DeleteUnplanBacklog" confirmation-message="Are you sure to delete this sprint backlog ?" link-type="hidden-form"> <parameter param-name="workEffortId"/> <parameter param-name="custRequestId"/> <parameter param-name="productId"/> </hyperlink> </field> - <field name="newTask" title=" " use-when="showPosition1&&!"CRQ_COMPLETED".equals("${custRequest.statusId}")" widget-style="buttontext"> + <field name="newTask" title=" " use-when="showPosition1&&!'CRQ_COMPLETED'.equals('${custRequest.statusId}')" widget-style="buttontext"> <hyperlink description="Add Task" target="NewUnplanBacklogTask" link-type="hidden-form"> <parameter param-name="custRequestId"/> <parameter param-name="productId"/> @@ -3058,19 +3053,19 @@ under the License. <field name="partyId" title="${uiLabelMap.ScrumAssignedTo}" position="2" use-when="workEffortId!=null" > <display description="${partyList[0].lastName} ${partyList[0].firstName} ${partyList[0].middleName}"></display> </field> - <field name="editTaskParty" title=" " position="2" use-when="workEffortId!=null&&!"STS_COMPLETED".equals(currentStatusId)" widget-style="buttontext"> + <field name="editTaskParty" title=" " position="2" use-when="workEffortId!=null&&!'STS_COMPLETED'.equals(currentStatusId)" widget-style="buttontext"> <hyperlink description="${uiLabelMap.CommonEdit}" target="EditTask" link-type="hidden-form" target-window="_BLANK"> <parameter param-name="taskId" from-field="${workEffortId}"/> </hyperlink> </field> - <field name="deleteTaskButton" title=" " position="2" use-when="workEffortId!=null&&!"STS_COMPLETED".equals(currentStatusId)" widget-style="buttontext"> + <field name="deleteTaskButton" title=" " position="2" use-when="workEffortId!=null&&!'STS_COMPLETED'.equals(currentStatusId)" widget-style="buttontext"> <hyperlink description="Delete" target="DeleteTaskFromUnplanBacklog" confirmation-message="Are you sure to delete this task ?" link-type="hidden-form"> <parameter param-name="workEffortId" from-field="workEffortId"/> <parameter param-name="custRequestId"/> <parameter param-name="productId" from-field="parameters.productId"/> </hyperlink> </field> - <field name="setCompleteButton" title=" " widget-style="buttontext" use-when="workEffortId!=null&&!"STS_COMPLETED".equals(currentStatusId)" + <field name="setCompleteButton" title=" " widget-style="buttontext" use-when="workEffortId!=null&&!'STS_COMPLETED'.equals(currentStatusId)" position="2"> <hyperlink description="${uiLabelMap.ScrumSetComplete}" target="setCompleteFromUnplanBacklog" link-type="hidden-form"> <parameter param-name="workEffortId" from-field="workEffortId"/> @@ -3106,7 +3101,7 @@ under the License. <field name="deleteTaskButton" position="2" use-when="workEffortId!=null"><hidden/></field> <field name="setCompleteButton" position="2" use-when="workEffortId!=null"><hidden/></field> <field name="editTaskParty" position="2" use-when="workEffortId!=null"><hidden/></field> - <field name="newTask" use-when="showPosition1&&!"CRQ_COMPLETED".equals("${custRequest.statusId}")"><hidden/></field> + <field name="newTask" use-when="showPosition1&&!'CRQ_COMPLETED'.equals('${custRequest.statusId}')"><hidden/></field> <sort-order> <sort-field name="custRequestId"/> <sort-field name="workEffortId"/> @@ -3128,23 +3123,23 @@ under the License. <entity-one entity-name="CustRequest" value-field="custRequest"/> <set field="description" from-field="custRequest.description"/> <set field="custRequestCategoryGroupId" from-field="parentCustRequestId"/> - <set field="estimatedHours" value="${groovy:custEstimatedMilliSeconds!=null?custEstimatedMilliSeconds/3600000:0;}"/> - <set field="showPosition1" value="${groovy:String prev=(String)previousItem.get("parentCustRequestId");return new Boolean(!(prev!=null&&prev.equals(parentCustRequestId)));}" type="Boolean"/> + <set field="estimatedHours" value="${groovy: custEstimatedMilliSeconds ? custEstimatedMilliSeconds / 3600000 : 0}"/> + <set field="showPosition1" value="${groovy: previousItem.parentCustRequestId != parentCustRequestId}" type="Boolean"/> </row-actions> <!--<field name="custRequestCategoryGroupId" position="1" use-when="${groovy:showPosition1}" title="${uiLabelMap.ScrumCategory}"> <display-entity entity-name="CustRequest" key-field-name="custRequestId" description="${custRequestName}"/> </field>--> <field name="submitButton" widget-style="buttontext"><submit button-type="text-link"/></field> - <field name="setToReview" title="${uiLabelMap.ScrumMoveToUnplannedSprint}" widget-style="buttontext" use-when=""${statusId}"=="CRQ_ACCEPTED"" position="2"> + <field name="setToReview" title="${uiLabelMap.ScrumMoveToUnplannedSprint}" widget-style="buttontext" use-when="statusId=='CRQ_ACCEPTED'" position="2"> <hyperlink description="${uiLabelMap.ScrumMoveToUnplannedSprint}" target="setUnplannedSprint"> <parameter param-name="custRequestId" from-field="custRequest.custRequestId"/> <parameter param-name="productId" from-field="parameters.productId"/> <parameter param-name="statusId" value="parameters.statusId"/> </hyperlink> </field> - <field name="setToReview" title="${uiLabelMap.ScrumMoveToUnplannedSprint}" use-when=""${statusId}"=="CRQ_REVIEWED"" position="2"><hidden /></field> + <field name="setToReview" title="${uiLabelMap.ScrumMoveToUnplannedSprint}" use-when="statusId=='CRQ_REVIEWED'" position="2"><hidden /></field> <field name="deleteFlag" position="2" title="${uiLabelMap.CommonDelete}"/> - <field name="dummy1" title="${uiLabelMap.ScrumMoveToUnplannedSprint}" use-when=""${statusId}"=="CRQ_REVIEWED"" position="2"><display description=" "/></field> + <field name="dummy1" title="${uiLabelMap.ScrumMoveToUnplannedSprint}" use-when="statusId=='CRQ_REVIEWED'" position="2"><display description=" "/></field> </form> <form name="UnplannedBacklogListByCategoriesForOwner" extends="UnplannedBacklogListByCategories"> <field name="estimatedHours" position="2" title="${uiLabelMap.ScrumPlannedHours}"><display/></field>