You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Nicolas Malin (JIRA)" <ji...@apache.org> on 2012/08/14 11:25:38 UTC

[jira] [Created] (OFBIZ-5010) Entity-Auto Engine : manage [create|lastModified]Date field

Nicolas Malin created OFBIZ-5010:
------------------------------------

             Summary: Entity-Auto Engine : manage [create|lastModified]Date field
                 Key: OFBIZ-5010
                 URL: https://issues.apache.org/jira/browse/OFBIZ-5010
             Project: OFBiz
          Issue Type: Improvement
          Components: framework
    Affects Versions: SVN trunk
            Reporter: Nicolas Malin


When a entity have fields createDate, lastModifiedDate, createByUserLogin and updateByUserLogin, the entity-auto engine set them.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OFBIZ-5010) Entity-Auto Engine : manage [create|lastModified]Date field

Posted by "Nicolas Malin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-5010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13495205#comment-13495205 ] 

Nicolas Malin commented on OFBIZ-5010:
--------------------------------------

Thanks for your review and time Jacques. I will review depends Jira issues.

Nicolas
                
> Entity-Auto Engine : manage [create|lastModified]Date field
> -----------------------------------------------------------
>
>                 Key: OFBIZ-5010
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5010
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Nicolas Malin
>            Assignee: Jacques Le Roux
>              Labels: service-engine
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-5010.patch, OFBIZ-5010.patch
>
>
> When a entity have fields createDate, lastModifiedDate, createByUserLogin and updateByUserLogin, the entity-auto engine set them.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (OFBIZ-5010) Entity-Auto Engine : manage [create|lastModified]Date field

Posted by "Nicolas Malin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-5010?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nicolas Malin updated OFBIZ-5010:
---------------------------------

    Attachment: OFBIZ-5010.patch

Hi jacques, 
I loaded a new patch with synchronize all entity that have been one of field [create|lastModified][Date|ByUserLogin] for each have four fields, as we talked on dev mailing list.

Impacted entity :
 * [Quote|Order|Return]Adjustment
 * OrderPaymentPreference
 * AcctgTrans
 * GlReconciliation
 * ValueLinkKey

I run ant clean-all load-demo run-tests with success.


                
> Entity-Auto Engine : manage [create|lastModified]Date field
> -----------------------------------------------------------
>
>                 Key: OFBIZ-5010
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5010
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Nicolas Malin
>              Labels: service-engine
>         Attachments: OFBIZ-5010.patch, OFBIZ-5010.patch
>
>
> When a entity have fields createDate, lastModifiedDate, createByUserLogin and updateByUserLogin, the entity-auto engine set them.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OFBIZ-5010) Entity-Auto Engine : manage [create|lastModified]Date field

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-5010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13447303#comment-13447303 ] 

Jacques Le Roux commented on OFBIZ-5010:
----------------------------------------

If we get no feedback on this I suggest to simply add
{code}
Index: applications/accounting/entitydef/entitymodel.xml
===================================================================
--- applications/accounting/entitydef/entitymodel.xml	(revision 7632)
+++ applications/accounting/entitydef/entitymodel.xml	(working copy)
@@ -3598,6 +3598,9 @@
       <field name="workingKey" type="very-long"></field>
       <field name="workingKeyIndex" type="numeric"></field>
       <field name="lastWorkingKey" type="very-long"></field>
+      <field name="createdDate" type="date-time"></field>
+      <field name="createdByUserLogin" type="id-vlong"></field>        
+      <field name="createdByTerminal" type="id-vlong"></field>        
       <field name="lastModifiedDate" type="date-time"></field>
       <field name="lastModifiedByTerminal" type="short-varchar"></field>
       <field name="lastModifiedByUserLogin" type="id-vlong"></field>
{code}

I did not find any uses of lastModifiedByTerminal in code, but above can't hurt IMO
                
> Entity-Auto Engine : manage [create|lastModified]Date field
> -----------------------------------------------------------
>
>                 Key: OFBIZ-5010
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5010
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Nicolas Malin
>              Labels: service-engine
>         Attachments: OFBIZ-5010.patch
>
>
> When a entity have fields createDate, lastModifiedDate, createByUserLogin and updateByUserLogin, the entity-auto engine set them.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OFBIZ-5010) Entity-Auto Engine : manage [create|lastModified]Date field

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-5010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13447143#comment-13447143 ] 

Jacques Le Roux commented on OFBIZ-5010:
----------------------------------------

Hi Nicolas,

Your patch looks good to me, just wondering:

{code}
+                    if (modelEntity.getField("createdByUserLogin") != null) {
+                        GenericValue userLogin = (GenericValue) parameters.get("userLogin");
+                        if (userLogin != null) {
+                            newEntity.set("createdByUserLogin", userLogin.get("userLoginId"));
+                            if (modelEntity.getField("lastModifiedByUserLogin") != null) {
+                                newEntity.set("lastModifiedByUserLogin", userLogin.get("userLoginId"));
+                            }
+                        }
+                    }
{code}

The ValueLinkKey entitiy has lastModifiedByUserLogin but not createdByUserLogin. Not sure if it's an error for this entity (most likely) or if you code should adapt. Also I'm not sure what lastModifiedByTerminal is used for. Unfortunately this entity is from the pre Apache era, harder to track in a limited time...
                
> Entity-Auto Engine : manage [create|lastModified]Date field
> -----------------------------------------------------------
>
>                 Key: OFBIZ-5010
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5010
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Nicolas Malin
>              Labels: service-engine
>         Attachments: OFBIZ-5010.patch
>
>
> When a entity have fields createDate, lastModifiedDate, createByUserLogin and updateByUserLogin, the entity-auto engine set them.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OFBIZ-5010) Entity-Auto Engine : manage [create|lastModified]Date field

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-5010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13447514#comment-13447514 ] 

Jacques Le Roux commented on OFBIZ-5010:
----------------------------------------

Interesting Nicolas, IMO it would be good to have all consistent, but before I think we should ask the community about it (dev ML) 
                
> Entity-Auto Engine : manage [create|lastModified]Date field
> -----------------------------------------------------------
>
>                 Key: OFBIZ-5010
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5010
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Nicolas Malin
>              Labels: service-engine
>         Attachments: OFBIZ-5010.patch
>
>
> When a entity have fields createDate, lastModifiedDate, createByUserLogin and updateByUserLogin, the entity-auto engine set them.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Closed] (OFBIZ-5010) Entity-Auto Engine : manage [create|lastModified]Date field

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-5010?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux closed OFBIZ-5010.
----------------------------------

       Resolution: Fixed
    Fix Version/s: SVN trunk
         Assignee: Jacques Le Roux

Thanks Nicolas,

Your patch is in trunk at revision: 1407578  

                
> Entity-Auto Engine : manage [create|lastModified]Date field
> -----------------------------------------------------------
>
>                 Key: OFBIZ-5010
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5010
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Nicolas Malin
>            Assignee: Jacques Le Roux
>              Labels: service-engine
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-5010.patch, OFBIZ-5010.patch
>
>
> When a entity have fields createDate, lastModifiedDate, createByUserLogin and updateByUserLogin, the entity-auto engine set them.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OFBIZ-5010) Entity-Auto Engine : manage [create|lastModified]Date field

Posted by "Nicolas Malin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-5010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13447265#comment-13447265 ] 

Nicolas Malin commented on OFBIZ-5010:
--------------------------------------

Hmmm I understand the problem.

Would be necessary to homogenize all entity on the same pattern before ?
                
> Entity-Auto Engine : manage [create|lastModified]Date field
> -----------------------------------------------------------
>
>                 Key: OFBIZ-5010
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5010
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Nicolas Malin
>              Labels: service-engine
>         Attachments: OFBIZ-5010.patch
>
>
> When a entity have fields createDate, lastModifiedDate, createByUserLogin and updateByUserLogin, the entity-auto engine set them.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OFBIZ-5010) Entity-Auto Engine : manage [create|lastModified]Date field

Posted by "Nicolas Malin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-5010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13447392#comment-13447392 ] 

Nicolas Malin commented on OFBIZ-5010:
--------------------------------------

I checked others entities and I found QuoteAdjustment, OrderAdjustmment, ReturnAdjustment and OrderPaymentPreference with only created fields but isn't a problem.
 Contrariwise ShipmentRouteSegment don't use lastModifiedDate, lastModifiedByUserLogin but lastUpdateDate, updateByUserLogin.

Nicolas
                
> Entity-Auto Engine : manage [create|lastModified]Date field
> -----------------------------------------------------------
>
>                 Key: OFBIZ-5010
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5010
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Nicolas Malin
>              Labels: service-engine
>         Attachments: OFBIZ-5010.patch
>
>
> When a entity have fields createDate, lastModifiedDate, createByUserLogin and updateByUserLogin, the entity-auto engine set them.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (OFBIZ-5010) Entity-Auto Engine : manage [create|lastModified]Date field

Posted by "Nicolas Malin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-5010?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nicolas Malin updated OFBIZ-5010:
---------------------------------

    Attachment: OFBIZ-5010.patch

To test pass a engine on service CRUD to entity-auto on entity as TrackingCode.

run "ant clean-all load-demo run-tests" without error
                
> Entity-Auto Engine : manage [create|lastModified]Date field
> -----------------------------------------------------------
>
>                 Key: OFBIZ-5010
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5010
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Nicolas Malin
>              Labels: service-engine
>         Attachments: OFBIZ-5010.patch
>
>
> When a entity have fields createDate, lastModifiedDate, createByUserLogin and updateByUserLogin, the entity-auto engine set them.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira