You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by as...@apache.org on 2008/06/27 13:26:45 UTC

svn commit: r672246 - in /ofbiz/trunk/applications/workeffort: entitydef/entitymodel.xml script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml widget/WorkEffortForms.xml

Author: ashish
Date: Fri Jun 27 04:26:45 2008
New Revision: 672246

URL: http://svn.apache.org/viewvc?rev=672246&view=rev
Log:
Introducing new field "statusChangeNote" in the WorkEffortEntity.
Maintaining its value in the WorkEffortStatus table as well.
Sometime it happens that we would like like to save the status change reason of keeping the Project (aka WorkEffort) into either HOLD or CANCEL state.

Thanks Ratnesh for discussing this with me.
 

Modified:
    ofbiz/trunk/applications/workeffort/entitydef/entitymodel.xml
    ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml
    ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml

Modified: ofbiz/trunk/applications/workeffort/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/entitydef/entitymodel.xml?rev=672246&r1=672245&r2=672246&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/applications/workeffort/entitydef/entitymodel.xml Fri Jun 27 04:26:45 2008
@@ -245,6 +245,7 @@
       <field name="showAsEnumId" type="id"></field>
       <field name="sendNotificationEmail" type="indicator"></field>
       <field name="description" type="description"></field>
+      <field name="statusChangeNote" type="description"></field>
       <field name="locationDesc" type="description"></field>
       <field name="estimatedStartDate" type="date-time"></field>
       <field name="estimatedCompletionDate" type="date-time"></field>
@@ -800,6 +801,7 @@
       <field name="statusId" type="id-ne"></field>
       <field name="statusDatetime" type="date-time"></field>
       <field name="setByUserLogin" type="id-vlong"></field>
+      <field name="reason" type="description"></field>
       <prim-key field="workEffortId"/>
       <prim-key field="statusId"/>
       <prim-key field="statusDatetime"/>

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=672246&r1=672245&r2=672246&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 Fri Jun 27 04:26:45 2008
@@ -115,6 +115,7 @@
                 <set from-field="lookedUpValue.workEffortId" field="newWorkEffortStatus.workEffortId"/>
                 <set from-field="parameters.currentStatusId" field="newWorkEffortStatus.statusId"/>
                 <set from-field="nowTimestamp" field="newWorkEffortStatus.statusDatetime"/>
+                <set from-field="lookedUpValue.statusChangeNote" field="newWorkEffortStatus.reason"/>
                 <set from-field="userLogin.userLoginId" field="newWorkEffortStatus.setByUserLogin"/>
                 <create-value value-name="newWorkEffortStatus"/>
             </then>

Modified: ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml?rev=672246&r1=672245&r2=672246&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml (original)
+++ ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml Fri Jun 27 04:26:45 2008
@@ -91,6 +91,8 @@
         </field>
         <field name="percentComplete" position="2"/>
         
+        <field name="statusChangeNote" use-when="workEffort==null"><ignored/></field>
+                
         <field name="priority" position="1">
             <drop-down allow-empty="true">
                 <option key="1" description="1 (${uiLabelMap.WorkEffortPriorityHigh})"/><option key="2"/><option key="3"/><option key="4"/><option key="5"/>
@@ -164,6 +166,7 @@
             <sort-field name="workEffortPurposeTypeId"/>
             <sort-field name="currentStatusId"/>
             <sort-field name="percentComplete"/>
+            <sort-field name="statusChangeNote"/>
             <sort-field name="priority"/>
             <sort-field name="scopeEnumId"/>
             <sort-field name="estimatedStartDate"/>



Re: Data Model Changes (was Re: svn commit: r672246 - in /ofbiz/trunk/applications/workeffort: entitydef/entitymodel.xml script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml widget/WorkEffortForms.xml)

Posted by Jacques Le Roux <ja...@les7arts.com>.
From: "Tim Ruppert" <ti...@hotwaxmedia.com>
> +1 - I guess you'll be waiting for a week then Jacques :)

Yes sure, even more if needed I did plenty of mistakes in OFBiz but never in the Data Model yet :D

Jacques

>
> Cheers,
> Tim
> --
> Tim Ruppert
> HotWax Media
> http://www.hotwaxmedia.com
>
> o:801.649.6594
> f:801.649.6595
>
>
> On Jun 27, 2008, at 3:46 PM, Jacques Le Roux wrote:
>
>> From: "David E Jones" <jo...@hotwaxmedia.com>
>>> For all,
>>>
>>> As I mentioned before (yesterday was it?), I'm considering more  and  more to propose a policy for the project that there be NO
>>> data model  changes allowed without a proposal on the mailing list  and a 1 week  cool down period. The data model is too much 
>>> of a
>>> critical foundation  for the applications and can easily make or  break a system (most messy  systems are so because of their 
>>> messy
>>> data model).
>>>
>>> There are too many changes that are not well enough thought out  that  just get committed without reviewing for redundancy (ie
>>> stuff that  already exists that will work for a requirement), total  lack of  requirements or attempt to design around them (how
>>> can one decide on  how to design a data model without discussion of  the requirement?), or  lack of consideration of the future 
>>> and
>>> bigger picture (ie I have this  requirement, but what other things  might others want to do, and how  can we make it flexible to
>>> avoid changes to the data model just in  case?).
>>>
>>> I'm not saying that we should all expect ourselves to be perfect,  in  fact quite the opposite. I'm saying let's make a 
>>> mandatory
>>> community  review for ALL data model changes BECAUSE being human we  simply cannot  expect ourselves to be perfect.
>>
>> Big +1
>>
>> Jacques
>> PS : BTW I asked for a change in PostalAdress.
>>
>>> -David
>>>
>>>
>>> On Jun 27, 2008, at 5:30 AM, Ashish Vijaywargiya wrote:
>>>
>>>> Based on David's suggestion for not introducing the  WorkEffortHistory
>>>> entity.
>>>> Instead we introduced new field "statusChangeNote" in WorkEffort   entity and
>>>> maintained its history in "reason" field of WorkEffortStatus entity.
>>>> Thanks David.
>>>>
>>>> --
>>>> Ashish
>>>>
>>>> On Fri, Jun 27, 2008 at 7:26 AM, <as...@apache.org> wrote:
>>>>
>>>>> Author: ashish
>>>>> Date: Fri Jun 27 04:26:45 2008
>>>>> New Revision: 672246
>>>>>
>>>>> URL: http://svn.apache.org/viewvc?rev=672246&view=rev
>>>>> Log:
>>>>> Introducing new field "statusChangeNote" in the WorkEffortEntity.
>>>>> Maintaining its value in the WorkEffortStatus table as well.
>>>>> Sometime it happens that we would like like to save the status  change
>>>>> reason of keeping the Project (aka WorkEffort) into either HOLD  or  CANCEL
>>>>> state.
>>>>>
>>>>> Thanks Ratnesh for discussing this with me.
>>>>>
>>>>>
>>>>> Modified:
>>>>>  ofbiz/trunk/applications/workeffort/entitydef/entitymodel.xml
>>>>>
>>>>> ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/  workeffort/WorkEffortSimpleServices.xml
>>>>>  ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml
>>>>>
>>>>> Modified: ofbiz/trunk/applications/workeffort/entitydef/  entitymodel.xml
>>>>> URL:
>>>>> http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/entitydef/entitymodel.xml?rev=672246&r1=672245&r2=672246&view=diff
>>>>>
>>>>> = = = = = = = = =  = = ===================================================================
>>>>> --- ofbiz/trunk/applications/workeffort/entitydef/entitymodel.xml
>>>>> (original)
>>>>> +++ ofbiz/trunk/applications/workeffort/entitydef/ entitymodel.xml  Fri Jun
>>>>> 27 04:26:45 2008
>>>>> @@ -245,6 +245,7 @@
>>>>>     <field name="showAsEnumId" type="id"></field>
>>>>>     <field name="sendNotificationEmail" type="indicator"></field>
>>>>>     <field name="description" type="description"></field>
>>>>> +      <field name="statusChangeNote" type="description"></field>
>>>>>     <field name="locationDesc" type="description"></field>
>>>>>     <field name="estimatedStartDate" type="date-time"></field>
>>>>>     <field name="estimatedCompletionDate" type="date-time"></field>
>>>>> @@ -800,6 +801,7 @@
>>>>>     <field name="statusId" type="id-ne"></field>
>>>>>     <field name="statusDatetime" type="date-time"></field>
>>>>>     <field name="setByUserLogin" type="id-vlong"></field>
>>>>> +      <field name="reason" type="description"></field>
>>>>>     <prim-key field="workEffortId"/>
>>>>>     <prim-key field="statusId"/>
>>>>>     <prim-key field="statusDatetime"/>
>>>>>
>>>>> 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=672246&r1=672245&r2=672246&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
>>>>> Fri Jun 27 04:26:45 2008
>>>>> @@ -115,6 +115,7 @@
>>>>>               <set from-field="lookedUpValue.workEffortId"
>>>>> field="newWorkEffortStatus.workEffortId"/>
>>>>>               <set from-field="parameters.currentStatusId"
>>>>> field="newWorkEffortStatus.statusId"/>
>>>>>               <set from-field="nowTimestamp"
>>>>> field="newWorkEffortStatus.statusDatetime"/>
>>>>> +                <set from-field="lookedUpValue.statusChangeNote"
>>>>> field="newWorkEffortStatus.reason"/>
>>>>>               <set from-field="userLogin.userLoginId"
>>>>> field="newWorkEffortStatus.setByUserLogin"/>
>>>>>               <create-value value-name="newWorkEffortStatus"/>
>>>>>           </then>
>>>>>
>>>>> Modified: ofbiz/trunk/applications/workeffort/widget/  WorkEffortForms.xml
>>>>> URL:
>>>>> http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml?rev=672246&r1=672245&r2=672246&view=diff
>>>>>
>>>>> = = = = = = = = =  = = ===================================================================
>>>>> --- ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml
>>>>> (original)
>>>>> +++ ofbiz/trunk/applications/workeffort/widget/ WorkEffortForms.xml  Fri Jun
>>>>> 27 04:26:45 2008
>>>>> @@ -91,6 +91,8 @@
>>>>>       </field>
>>>>>       <field name="percentComplete" position="2"/>
>>>>>
>>>>> +        <field name="statusChangeNote"
>>>>> use-when="workEffort==null"><ignored/></field>
>>>>> +
>>>>>       <field name="priority" position="1">
>>>>>           <drop-down allow-empty="true">
>>>>>               <option key="1" description="1
>>>>> (${uiLabelMap.WorkEffortPriorityHigh})"/><option key="2"/><option
>>>>> key="3"/><option key="4"/><option key="5"/>
>>>>> @@ -164,6 +166,7 @@
>>>>>           <sort-field name="workEffortPurposeTypeId"/>
>>>>>           <sort-field name="currentStatusId"/>
>>>>>           <sort-field name="percentComplete"/>
>>>>> +            <sort-field name="statusChangeNote"/>
>>>>>           <sort-field name="priority"/>
>>>>>           <sort-field name="scopeEnumId"/>
>>>>>           <sort-field name="estimatedStartDate"/>
>>>>>
>>>>>
>>>>>
>>>
>>
>
> 


Re: Data Model Changes (was Re: svn commit: r672246 - in /ofbiz/trunk/applications/workeffort: entitydef/entitymodel.xml script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml widget/WorkEffortForms.xml)

Posted by Tim Ruppert <ti...@hotwaxmedia.com>.
+1 - I guess you'll be waiting for a week then Jacques :)

Cheers,
Tim
--
Tim Ruppert
HotWax Media
http://www.hotwaxmedia.com

o:801.649.6594
f:801.649.6595


On Jun 27, 2008, at 3:46 PM, Jacques Le Roux wrote:

> From: "David E Jones" <jo...@hotwaxmedia.com>
>> For all,
>>
>> As I mentioned before (yesterday was it?), I'm considering more  
>> and  more to propose a policy for the project that there be NO
>> data model  changes allowed without a proposal on the mailing list  
>> and a 1 week  cool down period. The data model is too much of a
>> critical foundation  for the applications and can easily make or  
>> break a system (most messy  systems are so because of their messy
>> data model).
>>
>> There are too many changes that are not well enough thought out  
>> that  just get committed without reviewing for redundancy (ie
>> stuff that  already exists that will work for a requirement), total  
>> lack of  requirements or attempt to design around them (how
>> can one decide on  how to design a data model without discussion of  
>> the requirement?), or  lack of consideration of the future and
>> bigger picture (ie I have this  requirement, but what other things  
>> might others want to do, and how  can we make it flexible to
>> avoid changes to the data model just in  case?).
>>
>> I'm not saying that we should all expect ourselves to be perfect,  
>> in  fact quite the opposite. I'm saying let's make a mandatory
>> community  review for ALL data model changes BECAUSE being human we  
>> simply cannot  expect ourselves to be perfect.
>
> Big +1
>
> Jacques
> PS : BTW I asked for a change in PostalAdress.
>
>> -David
>>
>>
>> On Jun 27, 2008, at 5:30 AM, Ashish Vijaywargiya wrote:
>>
>>> Based on David's suggestion for not introducing the  
>>> WorkEffortHistory
>>> entity.
>>> Instead we introduced new field "statusChangeNote" in WorkEffort   
>>> entity and
>>> maintained its history in "reason" field of WorkEffortStatus entity.
>>> Thanks David.
>>>
>>> --
>>> Ashish
>>>
>>> On Fri, Jun 27, 2008 at 7:26 AM, <as...@apache.org> wrote:
>>>
>>>> Author: ashish
>>>> Date: Fri Jun 27 04:26:45 2008
>>>> New Revision: 672246
>>>>
>>>> URL: http://svn.apache.org/viewvc?rev=672246&view=rev
>>>> Log:
>>>> Introducing new field "statusChangeNote" in the WorkEffortEntity.
>>>> Maintaining its value in the WorkEffortStatus table as well.
>>>> Sometime it happens that we would like like to save the status  
>>>> change
>>>> reason of keeping the Project (aka WorkEffort) into either HOLD  
>>>> or  CANCEL
>>>> state.
>>>>
>>>> Thanks Ratnesh for discussing this with me.
>>>>
>>>>
>>>> Modified:
>>>>  ofbiz/trunk/applications/workeffort/entitydef/entitymodel.xml
>>>>
>>>> ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/  
>>>> workeffort/WorkEffortSimpleServices.xml
>>>>  ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml
>>>>
>>>> Modified: ofbiz/trunk/applications/workeffort/entitydef/  
>>>> entitymodel.xml
>>>> URL:
>>>> http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/entitydef/entitymodel.xml?rev=672246&r1=672245&r2=672246&view=diff
>>>>
>>>> = = = = = = = = =  
>>>> = 
>>>> = 
>>>> ===================================================================
>>>> --- ofbiz/trunk/applications/workeffort/entitydef/entitymodel.xml
>>>> (original)
>>>> +++ ofbiz/trunk/applications/workeffort/entitydef/ 
>>>> entitymodel.xml  Fri Jun
>>>> 27 04:26:45 2008
>>>> @@ -245,6 +245,7 @@
>>>>     <field name="showAsEnumId" type="id"></field>
>>>>     <field name="sendNotificationEmail" type="indicator"></field>
>>>>     <field name="description" type="description"></field>
>>>> +      <field name="statusChangeNote" type="description"></field>
>>>>     <field name="locationDesc" type="description"></field>
>>>>     <field name="estimatedStartDate" type="date-time"></field>
>>>>     <field name="estimatedCompletionDate" type="date-time"></field>
>>>> @@ -800,6 +801,7 @@
>>>>     <field name="statusId" type="id-ne"></field>
>>>>     <field name="statusDatetime" type="date-time"></field>
>>>>     <field name="setByUserLogin" type="id-vlong"></field>
>>>> +      <field name="reason" type="description"></field>
>>>>     <prim-key field="workEffortId"/>
>>>>     <prim-key field="statusId"/>
>>>>     <prim-key field="statusDatetime"/>
>>>>
>>>> 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=672246&r1=672245&r2=672246&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
>>>> Fri Jun 27 04:26:45 2008
>>>> @@ -115,6 +115,7 @@
>>>>               <set from-field="lookedUpValue.workEffortId"
>>>> field="newWorkEffortStatus.workEffortId"/>
>>>>               <set from-field="parameters.currentStatusId"
>>>> field="newWorkEffortStatus.statusId"/>
>>>>               <set from-field="nowTimestamp"
>>>> field="newWorkEffortStatus.statusDatetime"/>
>>>> +                <set from-field="lookedUpValue.statusChangeNote"
>>>> field="newWorkEffortStatus.reason"/>
>>>>               <set from-field="userLogin.userLoginId"
>>>> field="newWorkEffortStatus.setByUserLogin"/>
>>>>               <create-value value-name="newWorkEffortStatus"/>
>>>>           </then>
>>>>
>>>> Modified: ofbiz/trunk/applications/workeffort/widget/  
>>>> WorkEffortForms.xml
>>>> URL:
>>>> http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml?rev=672246&r1=672245&r2=672246&view=diff
>>>>
>>>> = = = = = = = = =  
>>>> = 
>>>> = 
>>>> ===================================================================
>>>> --- ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml
>>>> (original)
>>>> +++ ofbiz/trunk/applications/workeffort/widget/ 
>>>> WorkEffortForms.xml  Fri Jun
>>>> 27 04:26:45 2008
>>>> @@ -91,6 +91,8 @@
>>>>       </field>
>>>>       <field name="percentComplete" position="2"/>
>>>>
>>>> +        <field name="statusChangeNote"
>>>> use-when="workEffort==null"><ignored/></field>
>>>> +
>>>>       <field name="priority" position="1">
>>>>           <drop-down allow-empty="true">
>>>>               <option key="1" description="1
>>>> (${uiLabelMap.WorkEffortPriorityHigh})"/><option key="2"/><option
>>>> key="3"/><option key="4"/><option key="5"/>
>>>> @@ -164,6 +166,7 @@
>>>>           <sort-field name="workEffortPurposeTypeId"/>
>>>>           <sort-field name="currentStatusId"/>
>>>>           <sort-field name="percentComplete"/>
>>>> +            <sort-field name="statusChangeNote"/>
>>>>           <sort-field name="priority"/>
>>>>           <sort-field name="scopeEnumId"/>
>>>>           <sort-field name="estimatedStartDate"/>
>>>>
>>>>
>>>>
>>
>


Re: Data Model Changes (was Re: svn commit: r672246 - in /ofbiz/trunk/applications/workeffort: entitydef/entitymodel.xml script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml widget/WorkEffortForms.xml)

Posted by Jacques Le Roux <ja...@les7arts.com>.
From: "David E Jones" <jo...@hotwaxmedia.com>
> For all,
>
> As I mentioned before (yesterday was it?), I'm considering more and  more to propose a policy for the project that there be NO
> data model  changes allowed without a proposal on the mailing list and a 1 week  cool down period. The data model is too much of a
> critical foundation  for the applications and can easily make or break a system (most messy  systems are so because of their messy
> data model).
>
> There are too many changes that are not well enough thought out that  just get committed without reviewing for redundancy (ie
> stuff that  already exists that will work for a requirement), total lack of  requirements or attempt to design around them (how
> can one decide on  how to design a data model without discussion of the requirement?), or  lack of consideration of the future and
> bigger picture (ie I have this  requirement, but what other things might others want to do, and how  can we make it flexible to
> avoid changes to the data model just in  case?).
>
> I'm not saying that we should all expect ourselves to be perfect, in  fact quite the opposite. I'm saying let's make a mandatory
> community  review for ALL data model changes BECAUSE being human we simply cannot  expect ourselves to be perfect.

Big +1

Jacques
PS : BTW I asked for a change in PostalAdress.

> -David
>
>
> On Jun 27, 2008, at 5:30 AM, Ashish Vijaywargiya wrote:
>
>> Based on David's suggestion for not introducing the WorkEffortHistory
>> entity.
>> Instead we introduced new field "statusChangeNote" in WorkEffort  entity and
>> maintained its history in "reason" field of WorkEffortStatus entity.
>> Thanks David.
>>
>> --
>> Ashish
>>
>> On Fri, Jun 27, 2008 at 7:26 AM, <as...@apache.org> wrote:
>>
>>> Author: ashish
>>> Date: Fri Jun 27 04:26:45 2008
>>> New Revision: 672246
>>>
>>> URL: http://svn.apache.org/viewvc?rev=672246&view=rev
>>> Log:
>>> Introducing new field "statusChangeNote" in the WorkEffortEntity.
>>> Maintaining its value in the WorkEffortStatus table as well.
>>> Sometime it happens that we would like like to save the status change
>>> reason of keeping the Project (aka WorkEffort) into either HOLD or  CANCEL
>>> state.
>>>
>>> Thanks Ratnesh for discussing this with me.
>>>
>>>
>>> Modified:
>>>   ofbiz/trunk/applications/workeffort/entitydef/entitymodel.xml
>>>
>>> ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/ workeffort/WorkEffortSimpleServices.xml
>>>   ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml
>>>
>>> Modified: ofbiz/trunk/applications/workeffort/entitydef/ entitymodel.xml
>>> URL:
>>> http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/entitydef/entitymodel.xml?rev=672246&r1=672245&r2=672246&view=diff
>>>
>>> = = = = = = = = = =====================================================================
>>> --- ofbiz/trunk/applications/workeffort/entitydef/entitymodel.xml
>>> (original)
>>> +++ ofbiz/trunk/applications/workeffort/entitydef/entitymodel.xml  Fri Jun
>>> 27 04:26:45 2008
>>> @@ -245,6 +245,7 @@
>>>      <field name="showAsEnumId" type="id"></field>
>>>      <field name="sendNotificationEmail" type="indicator"></field>
>>>      <field name="description" type="description"></field>
>>> +      <field name="statusChangeNote" type="description"></field>
>>>      <field name="locationDesc" type="description"></field>
>>>      <field name="estimatedStartDate" type="date-time"></field>
>>>      <field name="estimatedCompletionDate" type="date-time"></field>
>>> @@ -800,6 +801,7 @@
>>>      <field name="statusId" type="id-ne"></field>
>>>      <field name="statusDatetime" type="date-time"></field>
>>>      <field name="setByUserLogin" type="id-vlong"></field>
>>> +      <field name="reason" type="description"></field>
>>>      <prim-key field="workEffortId"/>
>>>      <prim-key field="statusId"/>
>>>      <prim-key field="statusDatetime"/>
>>>
>>> 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=672246&r1=672245&r2=672246&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
>>> Fri Jun 27 04:26:45 2008
>>> @@ -115,6 +115,7 @@
>>>                <set from-field="lookedUpValue.workEffortId"
>>> field="newWorkEffortStatus.workEffortId"/>
>>>                <set from-field="parameters.currentStatusId"
>>> field="newWorkEffortStatus.statusId"/>
>>>                <set from-field="nowTimestamp"
>>> field="newWorkEffortStatus.statusDatetime"/>
>>> +                <set from-field="lookedUpValue.statusChangeNote"
>>> field="newWorkEffortStatus.reason"/>
>>>                <set from-field="userLogin.userLoginId"
>>> field="newWorkEffortStatus.setByUserLogin"/>
>>>                <create-value value-name="newWorkEffortStatus"/>
>>>            </then>
>>>
>>> Modified: ofbiz/trunk/applications/workeffort/widget/ WorkEffortForms.xml
>>> URL:
>>> http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml?rev=672246&r1=672245&r2=672246&view=diff
>>>
>>> = = = = = = = = = =====================================================================
>>> --- ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml
>>> (original)
>>> +++ ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml  Fri Jun
>>> 27 04:26:45 2008
>>> @@ -91,6 +91,8 @@
>>>        </field>
>>>        <field name="percentComplete" position="2"/>
>>>
>>> +        <field name="statusChangeNote"
>>> use-when="workEffort==null"><ignored/></field>
>>> +
>>>        <field name="priority" position="1">
>>>            <drop-down allow-empty="true">
>>>                <option key="1" description="1
>>> (${uiLabelMap.WorkEffortPriorityHigh})"/><option key="2"/><option
>>> key="3"/><option key="4"/><option key="5"/>
>>> @@ -164,6 +166,7 @@
>>>            <sort-field name="workEffortPurposeTypeId"/>
>>>            <sort-field name="currentStatusId"/>
>>>            <sort-field name="percentComplete"/>
>>> +            <sort-field name="statusChangeNote"/>
>>>            <sort-field name="priority"/>
>>>            <sort-field name="scopeEnumId"/>
>>>            <sort-field name="estimatedStartDate"/>
>>>
>>>
>>>
>


Re: Data Model Changes (was Re: svn commit: r672246 - in /ofbiz/trunk/applications/workeffort: entitydef/entitymodel.xml script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml widget/WorkEffortForms.xml)

Posted by Ashish Vijaywargiya <vi...@gmail.com>.
Jacopo ,

Thanks for the excellent explaination.
It makes more sense to me now.

--
Ashish

On Mon, Jun 30, 2008 at 2:11 AM, Jacopo Cappellato <
jacopo.cappellato@gmail.com> wrote:

> Hi Ashish,
>
> please see my comment below:
>
> On Jun 30, 2008, at 7:50 AM, Ashish Vijaywargiya wrote:
>
>>
>>
>> The reason of keeping the field(statusChangeNote) in WorkEffort entity was
>> that you don't directly update the values in the WorkEffortStatus table.
>> If
>> you update the value for the "status" in the WorkEffort table then the
>> changed value will also gets saved in the WorkEffortStatus table for
>> maintaining the History of status.
>>
>> I am confused that how should we maintain the value in the
>> WorkEffortStatus.reason field.Because the value in WorkEffortStatus comes
>> on
>> changing the value in WorkEffort table.Please let me know your thoughts on
>> this so I will get the better insight on the scenario of keeping only the
>> "reason" field in WorkEffortStatus table.
>>
>>
> The (current)statusId in the WorkEffort entity is a somewhat redundant
> field (denormalized) because the master information is in the
> WorkEffortStatus entity; the reason we keep it is to make it easy and fast
> to get the current status of the WorkEffort; if there is code that creates a
> WorkEffortStatus entry when the statusId of the WorkEffort is changed, then
> this should be interpreted as a convenience method of keeping the data model
> synchronized. We should "read" it in the following way:
>
> "updateWorkEffort to newStatus" --> create a new WorkEffortStatus entry -->
> update the statusId field in the WorkEffort entity to reflect the new entry
> in the WorkEffortStatus
>
> and not in the following way:
>
> "updateWorkEffort to newStatus" --> update the statusId field in the
> WorkEffort entity --> create a new WorkEffortStatus entry  to reflect the
> new statusId in the WorkEffort entity
>
> So, if we do something like:
>
> "updateWorkEffort to newStatus with reason someReason" --> create a new
> WorkEffortStatus entry (setting newStatus and someReason) --> update the
> statusId field in the WorkEffort entity to reflect the new entry in the
> WorkEffortStatus
>
> If we really need to do a lot of queries (but I don't think we have to) on
> the last reason for the last status change, then we may think to add the
> (last)reason in the WorkEffort... but again, I don't think we need to add
> this information right now... that is why I guess David suggested to
> suppress that field.
>
> Cheers,
>
> Jacopo
>
>
>
>

Re: Data Model Changes (was Re: svn commit: r672246 - in /ofbiz/trunk/applications/workeffort: entitydef/entitymodel.xml script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml widget/WorkEffortForms.xml)

Posted by Jacopo Cappellato <ja...@gmail.com>.
Hi Ashish,

please see my comment below:

On Jun 30, 2008, at 7:50 AM, Ashish Vijaywargiya wrote:
>
>
> The reason of keeping the field(statusChangeNote) in WorkEffort  
> entity was
> that you don't directly update the values in the WorkEffortStatus  
> table. If
> you update the value for the "status" in the WorkEffort table then the
> changed value will also gets saved in the WorkEffortStatus table for
> maintaining the History of status.
>
> I am confused that how should we maintain the value in the
> WorkEffortStatus.reason field.Because the value in WorkEffortStatus  
> comes on
> changing the value in WorkEffort table.Please let me know your  
> thoughts on
> this so I will get the better insight on the scenario of keeping  
> only the
> "reason" field in WorkEffortStatus table.
>

The (current)statusId in the WorkEffort entity is a somewhat redundant  
field (denormalized) because the master information is in the  
WorkEffortStatus entity; the reason we keep it is to make it easy and  
fast to get the current status of the WorkEffort; if there is code  
that creates a WorkEffortStatus entry when the statusId of the  
WorkEffort is changed, then this should be interpreted as a  
convenience method of keeping the data model synchronized. We should  
"read" it in the following way:

"updateWorkEffort to newStatus" --> create a new WorkEffortStatus  
entry --> update the statusId field in the WorkEffort entity to  
reflect the new entry in the WorkEffortStatus

and not in the following way:

"updateWorkEffort to newStatus" --> update the statusId field in the  
WorkEffort entity --> create a new WorkEffortStatus entry  to reflect  
the new statusId in the WorkEffort entity

So, if we do something like:

"updateWorkEffort to newStatus with reason someReason" --> create a  
new WorkEffortStatus entry (setting newStatus and someReason) -->  
update the statusId field in the WorkEffort entity to reflect the new  
entry in the WorkEffortStatus

If we really need to do a lot of queries (but I don't think we have  
to) on the last reason for the last status change, then we may think  
to add the (last)reason in the WorkEffort... but again, I don't think  
we need to add this information right now... that is why I guess David  
suggested to suppress that field.

Cheers,

Jacopo




Re: Data Model Changes (was Re: svn commit: r672246 - in /ofbiz/trunk/applications/workeffort: entitydef/entitymodel.xml script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml widget/WorkEffortForms.xml)

Posted by Ashish Vijaywargiya <vi...@gmail.com>.
David,

Thanks for your insight on my comments.
Please see my comments inline :-

On Sat, Jun 28, 2008 at 4:12 PM, David E Jones <jo...@hotwaxmedia.com>
wrote:

>
> On Jun 28, 2008, at 12:42 AM, Ashish Vijaywargiya wrote:
>
>  I have NO idea what the point of the WorkEffort.statusChangeNote field is,
>>> so please do share your thoughts on what that field will be used
>>>
>>
>>
>>
>>  for and why it is on the WorkEffort entity (as opposed to, say, the
>>> WorkEffortStatus entity).
>>>
>>
>>
>> The idea of introducing the field in WorkEffort entity(statusChangeNote)
>> was
>> to put the reason of WorkEffort Status change.
>> And if user changes the Status again then we would like to maintain the
>> Old
>> Status Note provided in statusChangeNote field.
>> So from the code snippet shown below from the file
>> WorkEffortSimpleServices.xml, we are putting the old value from
>> WorkEffort.statusChangeNote field in the WorkEffortStatus.reason field.
>>
>
> I see where you're going with this now.
>
> Why not just have the reason on the WorkEffortStatus entity for each time
> it is changed? I can't think of a reason why we would need, or want, it on
> the WorkEffort entity since the field there would describe the last status
> change, and status changes are what the WorkEffortStatus entity is all
> about.
>


The reason of keeping the field(statusChangeNote) in WorkEffort entity was
that you don't directly update the values in the WorkEffortStatus table. If
you update the value for the "status" in the WorkEffort table then the
changed value will also gets saved in the WorkEffortStatus table for
maintaining the History of status.

I am confused that how should we maintain the value in the
WorkEffortStatus.reason field.Because the value in WorkEffortStatus comes on
changing the value in WorkEffort table.Please let me know your thoughts on
this so I will get the better insight on the scenario of keeping only the
"reason" field in WorkEffortStatus table.


>
>
>  +<set from-field="lookedUpValue
>>
>>>
>>> .statusChangeNote"
>>> field="newWorkEffortStatus.reason"/>
>>>
>>
>>
>>
>> From the next time I will propose the changes on the Dev mailing list
>> first
>> and wait for some time for any feedback from the community members and
>> then
>> after finalizing the discussion if occurs in b/w the members I will put
>> the
>> code in the trunk.
>>
>
> For now, should we revert this?
>

I have reverted all Data Model related changes in rev 672707.But I kept the
"reason" field as it is in WorkEffortStatus table.


>
> We should at least get rid of the WorkEffort.statusChangeNote. For the
> WorkEffortStatus.reason field, we might want to discuss it first... for
> example: do we want a free-form text entry box (which the current field
> would support), or do we want a drop-down to select among pre-configured
> reasons, for which we'd want to have a field like "reasonEnumId".


Suppose we have created the 10 reason for this status change and while
keeping the Project in "Hold" or "Cancel" status some other reason come
infront of us , say it as 11th reason.So what should we do in that case ? I
like it to be text field but will go with the community decision.

--
Ashish


>
> -David
>
>

Re: Data Model Changes (was Re: svn commit: r672246 - in /ofbiz/trunk/applications/workeffort: entitydef/entitymodel.xml script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml widget/WorkEffortForms.xml)

Posted by David E Jones <jo...@hotwaxmedia.com>.
On Jun 28, 2008, at 12:42 AM, Ashish Vijaywargiya wrote:

>> I have NO idea what the point of the WorkEffort.statusChangeNote  
>> field is,
>> so please do share your thoughts on what that field will be used
>
>
>
>> for and why it is on the WorkEffort entity (as opposed to, say, the
>> WorkEffortStatus entity).
>
>
> The idea of introducing the field in WorkEffort  
> entity(statusChangeNote) was
> to put the reason of WorkEffort Status change.
> And if user changes the Status again then we would like to maintain  
> the Old
> Status Note provided in statusChangeNote field.
> So from the code snippet shown below from the file
> WorkEffortSimpleServices.xml, we are putting the old value from
> WorkEffort.statusChangeNote field in the WorkEffortStatus.reason  
> field.

I see where you're going with this now.

Why not just have the reason on the WorkEffortStatus entity for each  
time it is changed? I can't think of a reason why we would need, or  
want, it on the WorkEffort entity since the field there would describe  
the last status change, and status changes are what the  
WorkEffortStatus entity is all about.

> +<set from-field="lookedUpValue
>>
>> .statusChangeNote"
>> field="newWorkEffortStatus.reason"/>
>
>
>
> From the next time I will propose the changes on the Dev mailing  
> list first
> and wait for some time for any feedback from the community members  
> and then
> after finalizing the discussion if occurs in b/w the members I will  
> put the
> code in the trunk.

For now, should we revert this?

We should at least get rid of the WorkEffort.statusChangeNote. For the  
WorkEffortStatus.reason field, we might want to discuss it first...  
for example: do we want a free-form text entry box (which the current  
field would support), or do we want a drop-down to select among pre- 
configured reasons, for which we'd want to have a field like  
"reasonEnumId".

-David


Re: Data Model Changes (was Re: svn commit: r672246 - in /ofbiz/trunk/applications/workeffort: entitydef/entitymodel.xml script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml widget/WorkEffortForms.xml)

Posted by Ashish Vijaywargiya <vi...@gmail.com>.
David ,

Thanks for your comments.
Please see comments Inline :-

On Fri, Jun 27, 2008 at 12:38 PM, David E Jones <jo...@hotwaxmedia.com>
wrote:

>
> Ashish,
>
> This is the very sort of data model change that is problematic and
> frustrating, and that should NEVER be done without a proposal and review.
>
> Without having done that in advance, let's do it now.
>
> I think I understand the point of the WorkEffortStatus.reason field, so I
> won't ask you to write up your thoughts behind that.
>
> I have NO idea what the point of the WorkEffort.statusChangeNote field is,
> so please do share your thoughts on what that field will be used



> for and why it is on the WorkEffort entity (as opposed to, say, the
> WorkEffortStatus entity).


The idea of introducing the field in WorkEffort entity(statusChangeNote) was
to put the reason of WorkEffort Status change.
And if user changes the Status again then we would like to maintain the Old
Status Note provided in statusChangeNote field.
So from the code snippet shown below from the file
WorkEffortSimpleServices.xml, we are putting the old value from
WorkEffort.statusChangeNote field in the WorkEffortStatus.reason field.

+<set from-field="lookedUpValue
>
> .statusChangeNote"
> field="newWorkEffortStatus.reason"/>



>From the next time I will propose the changes on the Dev mailing list first
and wait for some time for any feedback from the community members and then
after finalizing the discussion if occurs in b/w the members I will put the
code in the trunk.

--
Ashish



>
>
> For all,
>
> As I mentioned before (yesterday was it?), I'm considering more and more to
> propose a policy for the project that there be NO data model changes allowed
> without a proposal on the mailing list and a 1 week cool down period. The
> data model is too much of a critical foundation for the applications and can
> easily make or break a system (most messy systems are so because of their
> messy data model).
>
> There are too many changes that are not well enough thought out that just
> get committed without reviewing for redundancy (ie stuff that already exists
> that will work for a requirement), total lack of requirements or attempt to
> design around them (how can one decide on how to design a data model without
> discussion of the requirement?), or lack of consideration of the future and
> bigger picture (ie I have this requirement, but what other things might
> others want to do, and how can we make it flexible to avoid changes to the
> data model just in case?).
>
> I'm not saying that we should all expect ourselves to be perfect, in fact
> quite the opposite. I'm saying let's make a mandatory community review for
> ALL data model changes BECAUSE being human we simply cannot expect ourselves
> to be perfect.
>
> -David
>
>
> On Jun 27, 2008, at 5:30 AM, Ashish Vijaywargiya wrote:
>
>  Based on David's suggestion for not introducing the WorkEffortHistory
>> entity.
>> Instead we introduced new field "statusChangeNote" in WorkEffort entity
>> and
>> maintained its history in "reason" field of WorkEffortStatus entity.
>> Thanks David.
>>
>> --
>> Ashish
>>
>> On Fri, Jun 27, 2008 at 7:26 AM, <as...@apache.org> wrote:
>>
>>  Author: ashish
>>> Date: Fri Jun 27 04:26:45 2008
>>> New Revision: 672246
>>>
>>> URL: http://svn.apache.org/viewvc?rev=672246&view=rev
>>> Log:
>>> Introducing new field "statusChangeNote" in the WorkEffortEntity.
>>> Maintaining its value in the WorkEffortStatus table as well.
>>> Sometime it happens that we would like like to save the status change
>>> reason of keeping the Project (aka WorkEffort) into either HOLD or CANCEL
>>> state.
>>>
>>> Thanks Ratnesh for discussing this with me.
>>>
>>>
>>> Modified:
>>>  ofbiz/trunk/applications/workeffort/entitydef/entitymodel.xml
>>>
>>>
>>> ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml
>>>  ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml
>>>
>>> Modified: ofbiz/trunk/applications/workeffort/entitydef/entitymodel.xml
>>> URL:
>>>
>>> http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/entitydef/entitymodel.xml?rev=672246&r1=672245&r2=672246&view=diff
>>>
>>>
>>> ==============================================================================
>>> --- ofbiz/trunk/applications/workeffort/entitydef/entitymodel.xml
>>> (original)
>>> +++ ofbiz/trunk/applications/workeffort/entitydef/entitymodel.xml Fri Jun
>>> 27 04:26:45 2008
>>> @@ -245,6 +245,7 @@
>>>     <field name="showAsEnumId" type="id"></field>
>>>     <field name="sendNotificationEmail" type="indicator"></field>
>>>     <field name="description" type="description"></field>
>>> +      <field name="statusChangeNote" type="description"></field>
>>>     <field name="locationDesc" type="description"></field>
>>>     <field name="estimatedStartDate" type="date-time"></field>
>>>     <field name="estimatedCompletionDate" type="date-time"></field>
>>> @@ -800,6 +801,7 @@
>>>     <field name="statusId" type="id-ne"></field>
>>>     <field name="statusDatetime" type="date-time"></field>
>>>     <field name="setByUserLogin" type="id-vlong"></field>
>>> +      <field name="reason" type="description"></field>
>>>     <prim-key field="workEffortId"/>
>>>     <prim-key field="statusId"/>
>>>     <prim-key field="statusDatetime"/>
>>>
>>> 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=672246&r1=672245&r2=672246&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
>>> Fri Jun 27 04:26:45 2008
>>> @@ -115,6 +115,7 @@
>>>               <set from-field="lookedUpValue.workEffortId"
>>> field="newWorkEffortStatus.workEffortId"/>
>>>               <set from-field="parameters.currentStatusId"
>>> field="newWorkEffortStatus.statusId"/>
>>>               <set from-field="nowTimestamp"
>>> field="newWorkEffortStatus.statusDatetime"/>
>>> +                <set from-field="lookedUpValue.statusChangeNote"
>>> field="newWorkEffortStatus.reason"/>
>>>               <set from-field="userLogin.userLoginId"
>>> field="newWorkEffortStatus.setByUserLogin"/>
>>>               <create-value value-name="newWorkEffortStatus"/>
>>>           </then>
>>>
>>> Modified: ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml
>>> URL:
>>>
>>> http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml?rev=672246&r1=672245&r2=672246&view=diff
>>>
>>>
>>> ==============================================================================
>>> --- ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml
>>> (original)
>>> +++ ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml Fri
>>> Jun
>>> 27 04:26:45 2008
>>> @@ -91,6 +91,8 @@
>>>       </field>
>>>       <field name="percentComplete" position="2"/>
>>>
>>> +        <field name="statusChangeNote"
>>> use-when="workEffort==null"><ignored/></field>
>>> +
>>>       <field name="priority" position="1">
>>>           <drop-down allow-empty="true">
>>>               <option key="1" description="1
>>> (${uiLabelMap.WorkEffortPriorityHigh})"/><option key="2"/><option
>>> key="3"/><option key="4"/><option key="5"/>
>>> @@ -164,6 +166,7 @@
>>>           <sort-field name="workEffortPurposeTypeId"/>
>>>           <sort-field name="currentStatusId"/>
>>>           <sort-field name="percentComplete"/>
>>> +            <sort-field name="statusChangeNote"/>
>>>           <sort-field name="priority"/>
>>>           <sort-field name="scopeEnumId"/>
>>>           <sort-field name="estimatedStartDate"/>
>>>
>>>
>>>
>>>
>

Data Model Changes (was Re: svn commit: r672246 - in /ofbiz/trunk/applications/workeffort: entitydef/entitymodel.xml script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml widget/WorkEffortForms.xml)

Posted by David E Jones <jo...@hotwaxmedia.com>.
Ashish,

This is the very sort of data model change that is problematic and  
frustrating, and that should NEVER be done without a proposal and  
review.

Without having done that in advance, let's do it now.

I think I understand the point of the WorkEffortStatus.reason field,  
so I won't ask you to write up your thoughts behind that.

I have NO idea what the point of the WorkEffort.statusChangeNote field  
is, so please do share your thoughts on what that field will be used  
for and why it is on the WorkEffort entity (as opposed to, say, the  
WorkEffortStatus entity).

For all,

As I mentioned before (yesterday was it?), I'm considering more and  
more to propose a policy for the project that there be NO data model  
changes allowed without a proposal on the mailing list and a 1 week  
cool down period. The data model is too much of a critical foundation  
for the applications and can easily make or break a system (most messy  
systems are so because of their messy data model).

There are too many changes that are not well enough thought out that  
just get committed without reviewing for redundancy (ie stuff that  
already exists that will work for a requirement), total lack of  
requirements or attempt to design around them (how can one decide on  
how to design a data model without discussion of the requirement?), or  
lack of consideration of the future and bigger picture (ie I have this  
requirement, but what other things might others want to do, and how  
can we make it flexible to avoid changes to the data model just in  
case?).

I'm not saying that we should all expect ourselves to be perfect, in  
fact quite the opposite. I'm saying let's make a mandatory community  
review for ALL data model changes BECAUSE being human we simply cannot  
expect ourselves to be perfect.

-David


On Jun 27, 2008, at 5:30 AM, Ashish Vijaywargiya wrote:

> Based on David's suggestion for not introducing the WorkEffortHistory
> entity.
> Instead we introduced new field "statusChangeNote" in WorkEffort  
> entity and
> maintained its history in "reason" field of WorkEffortStatus entity.
> Thanks David.
>
> --
> Ashish
>
> On Fri, Jun 27, 2008 at 7:26 AM, <as...@apache.org> wrote:
>
>> Author: ashish
>> Date: Fri Jun 27 04:26:45 2008
>> New Revision: 672246
>>
>> URL: http://svn.apache.org/viewvc?rev=672246&view=rev
>> Log:
>> Introducing new field "statusChangeNote" in the WorkEffortEntity.
>> Maintaining its value in the WorkEffortStatus table as well.
>> Sometime it happens that we would like like to save the status change
>> reason of keeping the Project (aka WorkEffort) into either HOLD or  
>> CANCEL
>> state.
>>
>> Thanks Ratnesh for discussing this with me.
>>
>>
>> Modified:
>>   ofbiz/trunk/applications/workeffort/entitydef/entitymodel.xml
>>
>> ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/ 
>> workeffort/WorkEffortSimpleServices.xml
>>   ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml
>>
>> Modified: ofbiz/trunk/applications/workeffort/entitydef/ 
>> entitymodel.xml
>> URL:
>> http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/entitydef/entitymodel.xml?rev=672246&r1=672245&r2=672246&view=diff
>>
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> =====================================================================
>> --- ofbiz/trunk/applications/workeffort/entitydef/entitymodel.xml
>> (original)
>> +++ ofbiz/trunk/applications/workeffort/entitydef/entitymodel.xml  
>> Fri Jun
>> 27 04:26:45 2008
>> @@ -245,6 +245,7 @@
>>      <field name="showAsEnumId" type="id"></field>
>>      <field name="sendNotificationEmail" type="indicator"></field>
>>      <field name="description" type="description"></field>
>> +      <field name="statusChangeNote" type="description"></field>
>>      <field name="locationDesc" type="description"></field>
>>      <field name="estimatedStartDate" type="date-time"></field>
>>      <field name="estimatedCompletionDate" type="date-time"></field>
>> @@ -800,6 +801,7 @@
>>      <field name="statusId" type="id-ne"></field>
>>      <field name="statusDatetime" type="date-time"></field>
>>      <field name="setByUserLogin" type="id-vlong"></field>
>> +      <field name="reason" type="description"></field>
>>      <prim-key field="workEffortId"/>
>>      <prim-key field="statusId"/>
>>      <prim-key field="statusDatetime"/>
>>
>> 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=672246&r1=672245&r2=672246&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
>> Fri Jun 27 04:26:45 2008
>> @@ -115,6 +115,7 @@
>>                <set from-field="lookedUpValue.workEffortId"
>> field="newWorkEffortStatus.workEffortId"/>
>>                <set from-field="parameters.currentStatusId"
>> field="newWorkEffortStatus.statusId"/>
>>                <set from-field="nowTimestamp"
>> field="newWorkEffortStatus.statusDatetime"/>
>> +                <set from-field="lookedUpValue.statusChangeNote"
>> field="newWorkEffortStatus.reason"/>
>>                <set from-field="userLogin.userLoginId"
>> field="newWorkEffortStatus.setByUserLogin"/>
>>                <create-value value-name="newWorkEffortStatus"/>
>>            </then>
>>
>> Modified: ofbiz/trunk/applications/workeffort/widget/ 
>> WorkEffortForms.xml
>> URL:
>> http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml?rev=672246&r1=672245&r2=672246&view=diff
>>
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> =====================================================================
>> --- ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml
>> (original)
>> +++ ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml  
>> Fri Jun
>> 27 04:26:45 2008
>> @@ -91,6 +91,8 @@
>>        </field>
>>        <field name="percentComplete" position="2"/>
>>
>> +        <field name="statusChangeNote"
>> use-when="workEffort==null"><ignored/></field>
>> +
>>        <field name="priority" position="1">
>>            <drop-down allow-empty="true">
>>                <option key="1" description="1
>> (${uiLabelMap.WorkEffortPriorityHigh})"/><option key="2"/><option
>> key="3"/><option key="4"/><option key="5"/>
>> @@ -164,6 +166,7 @@
>>            <sort-field name="workEffortPurposeTypeId"/>
>>            <sort-field name="currentStatusId"/>
>>            <sort-field name="percentComplete"/>
>> +            <sort-field name="statusChangeNote"/>
>>            <sort-field name="priority"/>
>>            <sort-field name="scopeEnumId"/>
>>            <sort-field name="estimatedStartDate"/>
>>
>>
>>


Re: svn commit: r672246 - in /ofbiz/trunk/applications/workeffort: entitydef/entitymodel.xml script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml widget/WorkEffortForms.xml

Posted by Ashish Vijaywargiya <vi...@gmail.com>.
Based on David's suggestion for not introducing the WorkEffortHistory
entity.
Instead we introduced new field "statusChangeNote" in WorkEffort entity and
maintained its history in "reason" field of WorkEffortStatus entity.
Thanks David.

--
Ashish

On Fri, Jun 27, 2008 at 7:26 AM, <as...@apache.org> wrote:

> Author: ashish
> Date: Fri Jun 27 04:26:45 2008
> New Revision: 672246
>
> URL: http://svn.apache.org/viewvc?rev=672246&view=rev
> Log:
> Introducing new field "statusChangeNote" in the WorkEffortEntity.
> Maintaining its value in the WorkEffortStatus table as well.
> Sometime it happens that we would like like to save the status change
> reason of keeping the Project (aka WorkEffort) into either HOLD or CANCEL
> state.
>
> Thanks Ratnesh for discussing this with me.
>
>
> Modified:
>    ofbiz/trunk/applications/workeffort/entitydef/entitymodel.xml
>
>  ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml
>    ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml
>
> Modified: ofbiz/trunk/applications/workeffort/entitydef/entitymodel.xml
> URL:
> http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/entitydef/entitymodel.xml?rev=672246&r1=672245&r2=672246&view=diff
>
> ==============================================================================
> --- ofbiz/trunk/applications/workeffort/entitydef/entitymodel.xml
> (original)
> +++ ofbiz/trunk/applications/workeffort/entitydef/entitymodel.xml Fri Jun
> 27 04:26:45 2008
> @@ -245,6 +245,7 @@
>       <field name="showAsEnumId" type="id"></field>
>       <field name="sendNotificationEmail" type="indicator"></field>
>       <field name="description" type="description"></field>
> +      <field name="statusChangeNote" type="description"></field>
>       <field name="locationDesc" type="description"></field>
>       <field name="estimatedStartDate" type="date-time"></field>
>       <field name="estimatedCompletionDate" type="date-time"></field>
> @@ -800,6 +801,7 @@
>       <field name="statusId" type="id-ne"></field>
>       <field name="statusDatetime" type="date-time"></field>
>       <field name="setByUserLogin" type="id-vlong"></field>
> +      <field name="reason" type="description"></field>
>       <prim-key field="workEffortId"/>
>       <prim-key field="statusId"/>
>       <prim-key field="statusDatetime"/>
>
> 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=672246&r1=672245&r2=672246&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
> Fri Jun 27 04:26:45 2008
> @@ -115,6 +115,7 @@
>                 <set from-field="lookedUpValue.workEffortId"
> field="newWorkEffortStatus.workEffortId"/>
>                 <set from-field="parameters.currentStatusId"
> field="newWorkEffortStatus.statusId"/>
>                 <set from-field="nowTimestamp"
> field="newWorkEffortStatus.statusDatetime"/>
> +                <set from-field="lookedUpValue.statusChangeNote"
> field="newWorkEffortStatus.reason"/>
>                 <set from-field="userLogin.userLoginId"
> field="newWorkEffortStatus.setByUserLogin"/>
>                 <create-value value-name="newWorkEffortStatus"/>
>             </then>
>
> Modified: ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml
> URL:
> http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml?rev=672246&r1=672245&r2=672246&view=diff
>
> ==============================================================================
> --- ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml
> (original)
> +++ ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml Fri Jun
> 27 04:26:45 2008
> @@ -91,6 +91,8 @@
>         </field>
>         <field name="percentComplete" position="2"/>
>
> +        <field name="statusChangeNote"
> use-when="workEffort==null"><ignored/></field>
> +
>         <field name="priority" position="1">
>             <drop-down allow-empty="true">
>                 <option key="1" description="1
> (${uiLabelMap.WorkEffortPriorityHigh})"/><option key="2"/><option
> key="3"/><option key="4"/><option key="5"/>
> @@ -164,6 +166,7 @@
>             <sort-field name="workEffortPurposeTypeId"/>
>             <sort-field name="currentStatusId"/>
>             <sort-field name="percentComplete"/>
> +            <sort-field name="statusChangeNote"/>
>             <sort-field name="priority"/>
>             <sort-field name="scopeEnumId"/>
>             <sort-field name="estimatedStartDate"/>
>
>
>