Author: deepak
Date: Sat Aug 27 07:08:44 2016
New Revision: 1757956

URL: http://svn.apache.org/viewvc?rev=1757956&view=rev
Log:
(OFBIZ-7624) Applied patch from jira issue
===================================
Add "changeByUserLoginId" field for InventoryItemStatus
===================================
Thanks Nameet and Renuka for your contribution.

Modified:
    ofbiz/trunk/applications/datamodel/entitydef/product-entitymodel.xml
    
ofbiz/trunk/applications/product/minilang/product/inventory/InventoryServices.xml

Modified: ofbiz/trunk/applications/datamodel/entitydef/product-entitymodel.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/datamodel/entitydef/product-entitymodel.xml?rev=1757956&r1=1757955&r2=1757956&view=diff
==============================================================================
--- ofbiz/trunk/applications/datamodel/entitydef/product-entitymodel.xml 
(original)
+++ ofbiz/trunk/applications/datamodel/entitydef/product-entitymodel.xml Sat 
Aug 27 07:08:44 2016
@@ -2128,6 +2128,7 @@ under the License.
       <field name="statusId" type="id-ne"></field>
       <field name="statusDatetime" type="date-time"></field>
       <field name="statusEndDatetime" type="date-time"></field>
+      <field name="changeByUserLoginId" type="id-vlong"></field>
       <field name="ownerPartyId" type="id"><description>Used to track a 
changed (new) ownerPartyId as a status changes.</description></field>
       <field name="productId" type="id"><description>Used to track a changed 
(new) productId as a status changes. In other words over time the item may be 
represented by a different Product (like new versus 
refurbished).</description></field>
       <prim-key field="inventoryItemId"/>
@@ -2139,6 +2140,9 @@ under the License.
       <relation type="one" fk-name="INV_ITEM_STTS_SI" 
rel-entity-name="StatusItem">
         <key-map field-name="statusId"/>
       </relation>
+      <relation type="one" fk-name="INV_ITEM_STTS_USER" 
rel-entity-name="UserLogin">
+        <key-map field-name="changeByUserLoginId" 
rel-field-name="userLoginId"/>
+      </relation>
     </entity>
     <view-entity entity-name="InventoryItemStatusForCount" 
package-name="org.apache.ofbiz.product.inventory">
         <description>This view-entity is for querying a count 
(findCountByCondition) of InventoryItems that were in a certain status at a 
certain point in time.</description>

Modified: 
ofbiz/trunk/applications/product/minilang/product/inventory/InventoryServices.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/minilang/product/inventory/InventoryServices.xml?rev=1757956&r1=1757955&r2=1757956&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/product/minilang/product/inventory/InventoryServices.xml
 (original)
+++ 
ofbiz/trunk/applications/product/minilang/product/inventory/InventoryServices.xml
 Sat Aug 27 07:08:44 2016
@@ -332,6 +332,7 @@ under the License.
         <set-nonpk-fields map="parameters" value-field="inventoryItemStatus"/>
         <set-pk-fields map="parameters" value-field="inventoryItemStatus"/>
         <set field="inventoryItemStatus.statusDatetime" 
from-field="nowTimestamp"/>
+        <set field="inventoryItemStatus.changeByUserLoginId" 
from-field="userLogin.userLoginId"/>
 
         <!-- make sure the current productId is set, if not passed in look up 
the current value -->
         <if-empty field="inventoryItemStatus.productId">


Reply via email to