Author: hansbak
Date: Tue Dec 13 04:23:50 2011 New Revision: 1213562 URL: http://svn.apache.org/viewvc?rev=1213562&view=rev Log: update the system info messages: remove dependency on my portal and provide links directly into workeffort, projectmanager and scrum Modified: ofbiz/trunk/applications/commonext/script/org/ofbiz/SystemInfoServices.xml ofbiz/trunk/applications/commonext/servicedef/services.xml ofbiz/trunk/applications/commonext/widget/CommonScreens.xml Modified: ofbiz/trunk/applications/commonext/script/org/ofbiz/SystemInfoServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/script/org/ofbiz/SystemInfoServices.xml?rev=1213562&r1=1213561&r2=1213562&view=diff ============================================================================== --- ofbiz/trunk/applications/commonext/script/org/ofbiz/SystemInfoServices.xml (original) +++ ofbiz/trunk/applications/commonext/script/org/ofbiz/SystemInfoServices.xml Tue Dec 13 04:23:50 2011 @@ -81,27 +81,78 @@ under the License. <entity-one entity-name="WorkEffort" value-field="workEffort"> <field-map field-name="workEffortId" from-field="parameters.entityNameId"/> </entity-one> - <if-compare field="workEffort.workEffortTypeId" value="TASK" operator="equals"> - <call-simple-method method-name="getPortletAttributeMap"/> - <if-compare field="haveUserLogin" value="true" operator="equals"> - <if-compare field="attributeMap.taskAssignment" value="Y" operator="not-equals"> - <entity-and entity-name="WorkEffortPartyAssignment" list="assigns" filter-by-date="true"> - <field-map field-name="workEffortId" from-field="parameters.entityNameId"/> - <order-by field-name="-fromDate"/> - </entity-and> - <first-from-list entry="assign" list="assigns"/> - <make-value value-field="noteData" entity-name="NoteData"/> - <now-timestamp field="noteData.noteDateTime"/> - <sequenced-id sequence-name="NoteData" field="noteData.noteId"/> - <set field="noteData.noteParty" from-field="assign.partyId"/> - <set field="noteData.noteName" value="SYSTEMNOTE"/> - <set field="noteData.noteInfo" value="New task assignment '${workEffort.workEffortName}' [${workEffort.workEffortId}]"/> - <set field="noteData.moreInfoPortletId" value="ViewProjectTask"/> - <set field="noteData.moreInfoItemId" from-field="workEffort.workEffortId"/> - <create-value value-field="noteData"/> + <if> + <condition> + <or> + <if-compare field="workEffort.workEffortTypeId" value="TASK" operator="equals"/> + <if-compare field="workEffort.workEffortTypeId" value="SCRUM_TASK_IMPL" operator="equals"/> + <if-compare field="workEffort.workEffortTypeId" value="SCRUM_TASK_INST" operator="equals"/> + <if-compare field="workEffort.workEffortTypeId" value="SCRUM_TASK_ERROR" operator="equals"/> + <if-compare field="workEffort.workEffortTypeId" value="SCRUM_TASK_TEST" operator="equals"/> + </or> + </condition> + <then> + <call-simple-method method-name="getPortletAttributeMap"/> + <if-compare field="haveUserLogin" value="true" operator="equals"> + <if-compare field="attributeMap.taskAssignment" value="Y" operator="not-equals"> + <entity-and entity-name="WorkEffortPartyAssignment" list="assigns" filter-by-date="true"> + <field-map field-name="workEffortId" from-field="parameters.entityNameId"/> + <order-by field-name="-fromDate"/> + </entity-and> + <first-from-list entry="assign" list="assigns"/> + <make-value value-field="noteData" entity-name="NoteData"/> + <now-timestamp field="noteData.noteDateTime"/> + <sequenced-id sequence-name="NoteData" field="noteData.noteId"/> + <set field="noteData.noteParty" from-field="assign.partyId"/> + <set field="noteData.noteName" value="SYSTEMNOTE"/> + <set field="noteData.noteInfo" value="New task assignment '${workEffort.workEffortName}' [${workEffort.workEffortId}]"/> + <set field="noteData.moreInfoPortletId" value="ViewProjectTask"/> + <set field="noteData.moreInfoItemId" from-field="workEffort.workEffortId"/> + <create-value value-field="noteData"/> + </if-compare> </if-compare> - </if-compare> - </if-compare> + </then> + </if> + + <!-- create system info note for TASK COMPLETED --> + <entity-condition list="completeTask" entity-name="WorkEffortPartyAssignment" filter-by-date="true"> + <condition-list combine="and"> + <condition-expr field-name="workEffortId" operator="equals" from-field="parameters.entityNameId"/> + <condition-expr field-name="partyId" operator="equals" from-field="userLogin.partyId"/> + </condition-list> + </entity-condition> + <first-from-list entry="completeMessage" list="completeTask"/> + <if> + <condition> + <or> + <if-compare field="completeMessage.statusId" value="PAS_COMPLETED" operator="equals"/> + <if-compare field="completeMessage.statusId" value="SCAS_COMPLETED" operator="equals"/> + <if-compare field="completeMessage.statusId" value="PRTYASGN_UNASSIGNED" operator="equals"/> + </or> + </condition> + <then> + <call-simple-method method-name="getPortletAttributeMap"/> + <if-compare field="haveUserLogin" value="true" operator="equals"> + <if-compare field="attributeMap.taskAssignment" value="Y" operator="not-equals"> + <entity-and entity-name="WorkEffortPartyAssignment" list="assigns" filter-by-date="true"> + <field-map field-name="workEffortId" from-field="parameters.entityNameId"/> + <order-by field-name="-fromDate"/> + </entity-and> + <iterate entry="assign" list="assigns"> + <make-value value-field="noteData" entity-name="NoteData"/> + <now-timestamp field="noteData.noteDateTime"/> + <sequenced-id sequence-name="NoteData" field="noteData.noteId"/> + <set field="noteData.noteParty" from-field="assign.partyId"/> + <set field="noteData.noteName" value="SYSTEMNOTE"/> + <set field="noteData.noteInfo" value="Task assignment completed '${workEffort.workEffortName}' [${workEffort.workEffortId}]"/> + <set field="noteData.moreInfoPortletId" value="ViewProjectTask"/> + <set field="noteData.moreInfoItemId" from-field="workEffort.workEffortId"/> + <create-value value-field="noteData"/> + </iterate> + </if-compare> + </if-compare> + </then> + </if> </if-compare> <!-- Create a system info note to all customer request participants if a note was added to the customer request @@ -271,15 +322,53 @@ under the License. <if-not-empty field="systemInfoNotes"> <set field="lastSystemInfoNote1" from-field="systemInfoNotes[0]"/> <field-to-result field="lastSystemInfoNote1"/> + <!-- get link from systemInfoNote 1 --> + <set field="systemNotepartyId" from-field="systemInfoNotes[0].noteParty"/> + <set field="systemNoteworkEffortId" from-field="systemInfoNotes[0].moreInfoItemId"/> + <call-simple-method method-name="getLinkFromLastSystemNote"/> + <set field="lastSystemInfoLink1" from-field="lastSystemInfoLink"/> + <field-to-result field="lastSystemInfoLink1"/> <if-not-empty field="systemInfoNotes[2]"> <set field="lastSystemInfoNote2" from-field="systemInfoNotes[1]"/> <field-to-result field="lastSystemInfoNote2"/> + <!-- get link from systemInfoNote 2 --> + <set field="systemNotepartyId" from-field="systemInfoNotes[1].noteParty"/> + <set field="systemNoteworkEffortId" from-field="systemInfoNotes[1].moreInfoItemId"/> + <call-simple-method method-name="getLinkFromLastSystemNote"/> + <set field="lastSystemInfoLink2" from-field="lastSystemInfoLink"/> + <field-to-result field="lastSystemInfoLink2"/> </if-not-empty> <if-not-empty field="systemInfoNotes[3]"> <set field="lastSystemInfoNote3" from-field="systemInfoNotes[2]"/> <field-to-result field="lastSystemInfoNote3"/> + <!-- get link from systemInfoNote 3 --> + <set field="systemNotepartyId" from-field="systemInfoNotes[2].noteParty"/> + <set field="systemNoteworkEffortId" from-field="systemInfoNotes[2].moreInfoItemId"/> + <call-simple-method method-name="getLinkFromLastSystemNote"/> + <set field="lastSystemInfoLink3" from-field="lastSystemInfoLink"/> + <field-to-result field="lastSystemInfoLink3"/> </if-not-empty> </if-not-empty> </simple-method> + + <simple-method method-name="getLinkFromLastSystemNote" short-description="Get links from the last 3 system info notes"> + <entity-condition list="linkSystem" entity-name="WorkEffortPartyAssignment" filter-by-date="true"> + <condition-list combine="and"> + <condition-expr field-name="partyId" operator="equals" from-field="systemNotepartyId"/> + <condition-expr field-name="workEffortId" operator="equals" from-field="systemNoteworkEffortId"/> + </condition-list> + </entity-condition> + <if-not-empty field="linkSystem"> + <if-compare field="linkSystem[0].statusId" operator="contains" value="PRTYASGN_"> + <set field="lastSystemInfoLink" value="/taskmgr/control/taskView?taskId=${systemNoteworkEffortId}"/> + </if-compare> + <if-compare field="linkSystem[0].statusId" operator="contains" value="SCAS_"> + <set field="lastSystemInfoLink" value="/scrum/control/taskView?taskId=${systemNoteworkEffortId}"/> + </if-compare> + <if-compare field="linkSystem[0].statusId" operator="contains" value="PAS_"> + <set field="lastSystemInfoLink" value="/projectmgr/control/taskView?workEffortId=${systemNoteworkEffortId}"/> + </if-compare> + </if-not-empty> + </simple-method> </simple-methods> Modified: ofbiz/trunk/applications/commonext/servicedef/services.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/servicedef/services.xml?rev=1213562&r1=1213561&r2=1213562&view=diff ============================================================================== --- ofbiz/trunk/applications/commonext/servicedef/services.xml (original) +++ ofbiz/trunk/applications/commonext/servicedef/services.xml Tue Dec 13 04:23:50 2011 @@ -47,6 +47,9 @@ under the License. <attribute name="lastSystemInfoNote1" type="GenericValue" mode="OUT" optional="true"/> <attribute name="lastSystemInfoNote2" type="GenericValue" mode="OUT" optional="true"/> <attribute name="lastSystemInfoNote3" type="GenericValue" mode="OUT" optional="true"/> + <attribute name="lastSystemInfoLink1" type="String" mode="OUT" optional="true"/> + <attribute name="lastSystemInfoLink2" type="String" mode="OUT" optional="true"/> + <attribute name="lastSystemInfoLink3" type="String" mode="OUT" optional="true"/> </service> <service name="getSystemInfoStatus" engine="simple" auth="true" location="component://commonext/script/org/ofbiz/SystemInfoServices.xml" invoke="getSystemInfoStatus"> Modified: ofbiz/trunk/applications/commonext/widget/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/widget/CommonScreens.xml?rev=1213562&r1=1213561&r2=1213562&view=diff ============================================================================== --- ofbiz/trunk/applications/commonext/widget/CommonScreens.xml (original) +++ ofbiz/trunk/applications/commonext/widget/CommonScreens.xml Tue Dec 13 04:23:50 2011 @@ -35,14 +35,13 @@ under the License. <set field="layoutSettings.suppressTab" value="ofbizsetup"/><!-- diseable ofbiz setup by default --> <!-- system info notes --> <service service-name="getLastSystemInfoNote" result-map="resultNote"/> - <set field="linkStart" value="/myportal/control/showPortletMainDecorator?portalPortletId="/> <set field="layoutSettings.middleTopHeader" value="---------- ${uiLabelMap.CommonLastSytemNotes} ----------"/> <set field="layoutSettings.middleTopMessage1" value="${groovy:resultNote.lastSystemInfoNote1!=null?resultNote.lastSystemInfoNote1.noteDateTime.toString().substring(0,16) + " " + resultNote.lastSystemInfoNote1.noteInfo:""}"/> - <set field="layoutSettings.middleTopLink1" value="${linkStart}${resultNote.lastSystemInfoNote1.moreInfoPortletId}&amp;id=${resultNote.lastSystemInfoNote1.moreInfoItemId}"/> <set field="layoutSettings.middleTopMessage2" value="${groovy:resultNote.lastSystemInfoNote2!=null?resultNote.lastSystemInfoNote2.noteDateTime.toString().substring(0,16) + " " + resultNote.lastSystemInfoNote2.noteInfo:""}"/> - <set field="layoutSettings.middleTopLink2" value="${linkStart}${resultNote.lastSystemInfoNote2.moreInfoPortletId}&amp;id=${resultNote.lastSystemInfoNote2.moreInfoItemId}"/> <set field="layoutSettings.middleTopMessage3" value="${groovy:resultNote.lastSystemInfoNote3!=null?resultNote.lastSystemInfoNote3.noteDateTime.toString().substring(0,16) + " " + resultNote.lastSystemInfoNote3.noteInfo:""}"/> - <set field="layoutSettings.middleTopLink3" value="${linkStart}${resultNote.lastSystemInfoNote3.moreInfoPortletId}&amp;id=${resultNote.lastSystemInfoNote3.moreInfoItemId}"/> + <set field="layoutSettings.middleTopLink1" value="${resultNote.lastSystemInfoLink1}"/> + <set field="layoutSettings.middleTopLink2" value="${resultNote.lastSystemInfoLink2}"/> + <set field="layoutSettings.middleTopLink3" value="${resultNote.lastSystemInfoLink3}"/> <!-- Help link actions --> <!--<set field="helpTopic" value="${groovy: webSiteId + '_' + requestAttributes._CURRENT_VIEW_}"/>--> <set field="helpTopic" value="${groovy: parameters.componentName.toUpperCase() + '_' + requestAttributes._CURRENT_VIEW_}"/> |
Free forum by Nabble | Edit this page |