You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ha...@apache.org on 2008/08/12 10:06:53 UTC

svn commit: r685078 - in /ofbiz/trunk: applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml

Author: hansbak
Date: Tue Aug 12 01:06:53 2008
New Revision: 685078

URL: http://svn.apache.org/viewvc?rev=685078&view=rev
Log:
change status of customer request when copied into a projectTask

Modified:
    ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml
    ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml

Modified: ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml?rev=685078&r1=685077&r2=685078&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml (original)
+++ ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml Tue Aug 12 01:06:53 2008
@@ -70,10 +70,19 @@
 
         <!-- attach to a customer request if passed and copy attached docs if customer request has communication events with attachments -->
         <if-not-empty field="parameters.custRequestId">
+            <!-- check status of customer request should be assigned -->
+            <entity-one entity-name="CustRequest" value-name="custRequest"/>
+            <if-compare operator="not-equals" value="CRQ_ACCEPTED" field="custRequest.statusId">
+                <add-error><fail-message message="Cannot create task from Customer Request: wrong status of customer request"/></add-error>
+            </if-compare>
             <make-value value-name="custRequestWorkEffort" entity-name="CustRequestWorkEffort"/>
             <set field="custRequestWorkEffort.workEffortId" from-field="newEntity.workEffortId" />
             <set field="custRequestWorkEffort.custRequestId" from-field="parameters.custRequestId"/>
             <create-value value-name="custRequestWorkEffort"/>
+            <!-- update status of customer request -->
+            <set field="updCustReq.custRequestId" from-field="parameters.custRequestId"/>
+            <set field="updCustReq.statusId" value="CRQ_REVIEWED"/>
+            <call-service service-name="setCustRequestStatus" in-map-name="updCustReq"/>
             <entity-and list-name="custRequestCommEvents" entity-name="CustRequestCommEvent">
                 <field-map field-name="custRequestId" env-name="parameters.custRequestId"/>
             </entity-and>

Modified: ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml?rev=685078&r1=685077&r2=685078&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml Tue Aug 12 01:06:53 2008
@@ -556,7 +556,7 @@
     <request-map uri="CreateTaskFromRequest">
         <security https="true" auth="true"/>
         <event type="service" invoke="createWorkEffort"/>
-        <response name="success" type="request" value="updaterequeststatus"/>
+        <response name="success" type="request" value="taskView"/>
         <response name="error" type="view" value="EditTaskFromRequest"/>
     </request-map>
     <request-map uri="newrequest">
@@ -587,12 +587,6 @@
         <response name="success" type="view" value="ListResourcesUnBilledHours"/>
         <response name="error" type="view" value="ListResourcesUnBilledHours"/>
     </request-map>
-    <request-map uri="updaterequeststatus">
-        <security https="true" auth="true"/>
-        <event type="service" invoke="updateCustRequest"/>
-        <response name="success" type="view" value="RequestList"/>
-        <response name="error" type="view" value="RequestList"/>
-    </request-map>
     <request-map uri="editperson"><security https="true" auth="true"/><response name="success" type="view" value="EditPerson"/></request-map>
     <request-map uri="updatePerson">
         <security https="true" auth="true"/>



Re: svn commit: r685078 - in /ofbiz/trunk: applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml

Posted by Jacques Le Roux <ja...@les7arts.com>.
Moreover it's not localisable (i18n)

Jacques

From: "David E Jones" <jo...@undersunconsulting.com>
> 
> On Aug 12, 2008, at 2:06 AM, hansbak@apache.org wrote:
> 
>> +            <!-- check status of customer request should be  
>> assigned -->
>> +            <entity-one entity-name="CustRequest" value- 
>> name="custRequest"/>
>> +            <if-compare operator="not-equals" value="CRQ_ACCEPTED"  
>> field="custRequest.statusId">
>> +                <add-error><fail-message message="Cannot create  
>> task from Customer Request: wrong status of customer request"/></add- 
>> error>
>> +            </if-compare>
> 
> Just a quick note: bad error messages really bug me, and this one  
> lacks enough detail to get me to write an email about it... ;)
> 
> All it says is that the status is wrong, it doesn't say it is the  
> current status that is wrong and it doesn't say which status is  
> acceptable or show the current status so the user knows that it is  
> indeed different.
> 
> -David


Re: svn commit: r685078 - in /ofbiz/trunk: applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml

Posted by David E Jones <jo...@undersunconsulting.com>.
On Aug 12, 2008, at 2:06 AM, hansbak@apache.org wrote:

> +            <!-- check status of customer request should be  
> assigned -->
> +            <entity-one entity-name="CustRequest" value- 
> name="custRequest"/>
> +            <if-compare operator="not-equals" value="CRQ_ACCEPTED"  
> field="custRequest.statusId">
> +                <add-error><fail-message message="Cannot create  
> task from Customer Request: wrong status of customer request"/></add- 
> error>
> +            </if-compare>

Just a quick note: bad error messages really bug me, and this one  
lacks enough detail to get me to write an email about it... ;)

All it says is that the status is wrong, it doesn't say it is the  
current status that is wrong and it doesn't say which status is  
acceptable or show the current status so the user knows that it is  
indeed different.

-David


Re: svn commit: r685078 - in /ofbiz/trunk: applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml

Posted by Ashish Vijaywargiya <vi...@gmail.com>.
>> <fail-message message="Cannot create task from Customer Request: wrong
status of customer request"/>
Instead of <fail-message> we should promote the use of <fail-property> tag.
This will help in localization purpose.


On Tue, Aug 12, 2008 at 1:36 PM, <ha...@apache.org> wrote:

> Author: hansbak
> Date: Tue Aug 12 01:06:53 2008
> New Revision: 685078
>
> URL: http://svn.apache.org/viewvc?rev=685078&view=rev
> Log:
> change status of customer request when copied into a projectTask
>
> Modified:
>
>  ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml
>
>  ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml
>
> Modified:
> ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml
> URL:
> http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml?rev=685078&r1=685077&r2=685078&view=diff
>
> ==============================================================================
> ---
> ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml
> (original)
> +++
> ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml
> Tue Aug 12 01:06:53 2008
> @@ -70,10 +70,19 @@
>
>         <!-- attach to a customer request if passed and copy attached docs
> if customer request has communication events with attachments -->
>         <if-not-empty field="parameters.custRequestId">
> +            <!-- check status of customer request should be assigned -->
> +            <entity-one entity-name="CustRequest"
> value-name="custRequest"/>
> +            <if-compare operator="not-equals" value="CRQ_ACCEPTED"
> field="custRequest.statusId">
> +                <add-error><fail-message message="Cannot create task from
> Customer Request: wrong status of customer request"/></add-error>
> +            </if-compare>
>             <make-value value-name="custRequestWorkEffort"
> entity-name="CustRequestWorkEffort"/>
>             <set field="custRequestWorkEffort.workEffortId"
> from-field="newEntity.workEffortId" />
>             <set field="custRequestWorkEffort.custRequestId"
> from-field="parameters.custRequestId"/>
>             <create-value value-name="custRequestWorkEffort"/>
> +            <!-- update status of customer request -->
> +            <set field="updCustReq.custRequestId"
> from-field="parameters.custRequestId"/>
> +            <set field="updCustReq.statusId" value="CRQ_REVIEWED"/>
> +            <call-service service-name="setCustRequestStatus"
> in-map-name="updCustReq"/>
>             <entity-and list-name="custRequestCommEvents"
> entity-name="CustRequestCommEvent">
>                 <field-map field-name="custRequestId"
> env-name="parameters.custRequestId"/>
>             </entity-and>
>
> Modified:
> ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml
> URL:
> http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml?rev=685078&r1=685077&r2=685078&view=diff
>
> ==============================================================================
> ---
> ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml
> (original)
> +++
> ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/controller.xml
> Tue Aug 12 01:06:53 2008
> @@ -556,7 +556,7 @@
>     <request-map uri="CreateTaskFromRequest">
>         <security https="true" auth="true"/>
>         <event type="service" invoke="createWorkEffort"/>
> -        <response name="success" type="request"
> value="updaterequeststatus"/>
> +        <response name="success" type="request" value="taskView"/>
>         <response name="error" type="view" value="EditTaskFromRequest"/>
>     </request-map>
>     <request-map uri="newrequest">
> @@ -587,12 +587,6 @@
>         <response name="success" type="view"
> value="ListResourcesUnBilledHours"/>
>         <response name="error" type="view"
> value="ListResourcesUnBilledHours"/>
>     </request-map>
> -    <request-map uri="updaterequeststatus">
> -        <security https="true" auth="true"/>
> -        <event type="service" invoke="updateCustRequest"/>
> -        <response name="success" type="view" value="RequestList"/>
> -        <response name="error" type="view" value="RequestList"/>
> -    </request-map>
>     <request-map uri="editperson"><security https="true"
> auth="true"/><response name="success" type="view"
> value="EditPerson"/></request-map>
>     <request-map uri="updatePerson">
>         <security https="true" auth="true"/>
>
>
>


-- 
Ashish Vijaywargiya
Indore (M.P), India
http://en.wikipedia.org/wiki/Indore