You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Anil K Patel (JIRA)" <ji...@apache.org> on 2006/12/14 23:54:21 UTC

[jira] Created: (OFBIZ-547) Duplicate Id error on Create New FixedAsset

Duplicate Id error on Create New FixedAsset
-------------------------------------------

                 Key: OFBIZ-547
                 URL: http://issues.apache.org/jira/browse/OFBIZ-547
             Project: OFBiz (The Open for Business Project)
          Issue Type: Improvement
          Components: accounting
            Reporter: Anil K Patel


While creating a New FixedAsset, if user enters FixedAssetId that already exists in system, Unfriendly message is returned and existing fixedAsset is opened in Edit mode. 
1) The error message should be easier to understand by user.
2) Existing fixedAsset should not be opened in edit mode, this confuses user with Idea that fixedAsset was created.



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Re: [jira] Commented: (OFBIZ-547) Duplicate Id error on Create New FixedAsset

Posted by Anil Patel <to...@gmail.com>.
David,
thanks for your comments. In fact I noticed pattern recently and used it in
patch applied to following issue.
https://issues.apache.org/jira/browse/OFBIZ-585

Regards
Anil Patel


On 1/3/07, David E. Jones (JIRA) <ji...@apache.org> wrote:
>
>
>     [
> https://issues.apache.org/jira/browse/OFBIZ-547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12462155]
>
> David E. Jones commented on OFBIZ-547:
> --------------------------------------
>
> Yes, I guess a commit is a good way to get someone, especially someone
> like me, to review it!
>
> Anyway, this all looks pretty safe, and more closely follow the pattern
> used with the createProduct service.
>
> BTW, in general the use of "entity-one" is far more effective and less
> error prone than the use of "find-by-primary-key". The main reason for this
> is that the field mappings are done with sub-elements, not with a Map that
> must be created and worried about.
>
> > Duplicate Id error on Create New FixedAsset
> > -------------------------------------------
> >
> >                 Key: OFBIZ-547
> >                 URL: https://issues.apache.org/jira/browse/OFBIZ-547
> >             Project: Apache OFBiz (The Open for Business Project)
> >          Issue Type: Improvement
> >          Components: accounting
> >            Reporter: Anil K Patel
> >         Assigned To: Jacques Le Roux
> >             Fix For: SVN trunk
> >
> >         Attachments: FixedAssedIdDuplicateMessage_Update1.patch
> >
> >
> > While creating a New FixedAsset, if user enters FixedAssetId that
> already exists in system, Unfriendly message is returned and existing
> fixedAsset is opened in Edit mode.
> > 1) The error message should be easier to understand by user.
> > 2) Existing fixedAsset should not be opened in edit mode, this confuses
> user with Idea that fixedAsset was created.
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
> https://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>

[jira] Commented: (OFBIZ-547) Duplicate Id error on Create New FixedAsset

Posted by "Anil K Patel (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12461850 ] 

Anil K Patel commented on OFBIZ-547:
------------------------------------

Can one of the commiters please take a look at this patch and apply it. Its been in wait for long, It will save me maintenance of patch on a asset maintenance application.
Its need now.

Regards
Anil Patel

> Duplicate Id error on Create New FixedAsset
> -------------------------------------------
>
>                 Key: OFBIZ-547
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-547
>             Project: Apache OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: accounting
>            Reporter: Anil K Patel
>         Attachments: FixedAssedIdDuplicateMessage_Update1.patch
>
>
> While creating a New FixedAsset, if user enters FixedAssetId that already exists in system, Unfriendly message is returned and existing fixedAsset is opened in Edit mode. 
> 1) The error message should be easier to understand by user.
> 2) Existing fixedAsset should not be opened in edit mode, this confuses user with Idea that fixedAsset was created.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-547) Duplicate Id error on Create New FixedAsset

Posted by "Anil K Patel (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-547?page=comments#action_12461569 ] 
            
Anil K Patel commented on OFBIZ-547:
------------------------------------

Does that mean 
we should clean cache of PrimaryKey bank before asking for new key 
or 
should we  write a loop that will keep trying next available usable primary key value 

> Duplicate Id error on Create New FixedAsset
> -------------------------------------------
>
>                 Key: OFBIZ-547
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-547
>             Project: Apache OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: accounting
>            Reporter: Anil K Patel
>         Attachments: FixedAssedIdDuplicateMessage.patch
>
>
> While creating a New FixedAsset, if user enters FixedAssetId that already exists in system, Unfriendly message is returned and existing fixedAsset is opened in Edit mode. 
> 1) The error message should be easier to understand by user.
> 2) Existing fixedAsset should not be opened in edit mode, this confuses user with Idea that fixedAsset was created.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-547) Duplicate Id error on Create New FixedAsset

Posted by "Jacopo Cappellato (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12461991 ] 

Jacopo Cappellato commented on OFBIZ-547:
-----------------------------------------

+1

> Duplicate Id error on Create New FixedAsset
> -------------------------------------------
>
>                 Key: OFBIZ-547
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-547
>             Project: Apache OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: accounting
>            Reporter: Anil K Patel
>         Assigned To: Jacques Le Roux
>         Attachments: FixedAssedIdDuplicateMessage_Update1.patch
>
>
> While creating a New FixedAsset, if user enters FixedAssetId that already exists in system, Unfriendly message is returned and existing fixedAsset is opened in Edit mode. 
> 1) The error message should be easier to understand by user.
> 2) Existing fixedAsset should not be opened in edit mode, this confuses user with Idea that fixedAsset was created.

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

        

[jira] Commented: (OFBIZ-547) Duplicate Id error on Create New FixedAsset

Posted by "Chris Howe (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-547?page=comments#action_12461573 ] 
            
Chris Howe commented on OFBIZ-547:
----------------------------------

I would vote for it as is if it added
<log level="info" message="FixedAssetId already exists: [${[${parameters.fixedAssetId}}]".  Current record: ${fixedAsset}/>

or something similar but internationalized.

> Duplicate Id error on Create New FixedAsset
> -------------------------------------------
>
>                 Key: OFBIZ-547
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-547
>             Project: Apache OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: accounting
>            Reporter: Anil K Patel
>         Attachments: FixedAssedIdDuplicateMessage.patch
>
>
> While creating a New FixedAsset, if user enters FixedAssetId that already exists in system, Unfriendly message is returned and existing fixedAsset is opened in Edit mode. 
> 1) The error message should be easier to understand by user.
> 2) Existing fixedAsset should not be opened in edit mode, this confuses user with Idea that fixedAsset was created.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (OFBIZ-547) Duplicate Id error on Create New FixedAsset

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/OFBIZ-547?page=all ]

Jacques Le Roux updated OFBIZ-547:
----------------------------------

    Attachment:     (was: FixedAssedIdDuplicateMessage.patch)

> Duplicate Id error on Create New FixedAsset
> -------------------------------------------
>
>                 Key: OFBIZ-547
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-547
>             Project: Apache OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: accounting
>            Reporter: Anil K Patel
>         Attachments: FixedAssedIdDuplicateMessage_Update1.patch
>
>
> While creating a New FixedAsset, if user enters FixedAssetId that already exists in system, Unfriendly message is returned and existing fixedAsset is opened in Edit mode. 
> 1) The error message should be easier to understand by user.
> 2) Existing fixedAsset should not be opened in edit mode, this confuses user with Idea that fixedAsset was created.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-547) Duplicate Id error on Create New FixedAsset

Posted by "Anil K Patel (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-547?page=comments#action_12461567 ] 
            
Anil K Patel commented on OFBIZ-547:
------------------------------------

In create FixedAsset form, user can enter FixedAssetId. Just because we allow user to enter FixedAssetId, there are changes that they may enter a value that already exists in Database. This patch is to handle such situation. 
While I am aware that user should not enter value in fixedAssetId field, The fact is we have a text box for this field. So we cannot deny this situation. 



> Duplicate Id error on Create New FixedAsset
> -------------------------------------------
>
>                 Key: OFBIZ-547
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-547
>             Project: Apache OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: accounting
>            Reporter: Anil K Patel
>         Attachments: FixedAssedIdDuplicateMessage.patch
>
>
> While creating a New FixedAsset, if user enters FixedAssetId that already exists in system, Unfriendly message is returned and existing fixedAsset is opened in Edit mode. 
> 1) The error message should be easier to understand by user.
> 2) Existing fixedAsset should not be opened in edit mode, this confuses user with Idea that fixedAsset was created.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-547) Duplicate Id error on Create New FixedAsset

Posted by "Anil K Patel (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-547?page=comments#action_12461575 ] 
            
Anil K Patel commented on OFBIZ-547:
------------------------------------

Chris, Thanks for you help on this.


> Duplicate Id error on Create New FixedAsset
> -------------------------------------------
>
>                 Key: OFBIZ-547
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-547
>             Project: Apache OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: accounting
>            Reporter: Anil K Patel
>         Attachments: FixedAssedIdDuplicateMessage.patch
>
>
> While creating a New FixedAsset, if user enters FixedAssetId that already exists in system, Unfriendly message is returned and existing fixedAsset is opened in Edit mode. 
> 1) The error message should be easier to understand by user.
> 2) Existing fixedAsset should not be opened in edit mode, this confuses user with Idea that fixedAsset was created.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-547) Duplicate Id error on Create New FixedAsset

Posted by "Anil K Patel (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-547?page=comments#action_12459437 ] 
            
Anil K Patel commented on OFBIZ-547:
------------------------------------

Sorry, a mistake in above comments it should read as following

This patch gracefully handles submit if the user entered fixedAssetId that already existed in system. I'll like to get some Idea on How we can make the Form to NOT show existing FixedAsset in Edit mode, as a result of this error. 


> Duplicate Id error on Create New FixedAsset
> -------------------------------------------
>
>                 Key: OFBIZ-547
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-547
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: accounting
>            Reporter: Anil K Patel
>         Attachments: FixedAssedIdDuplicateMessage.patch
>
>
> While creating a New FixedAsset, if user enters FixedAssetId that already exists in system, Unfriendly message is returned and existing fixedAsset is opened in Edit mode. 
> 1) The error message should be easier to understand by user.
> 2) Existing fixedAsset should not be opened in edit mode, this confuses user with Idea that fixedAsset was created.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-547) Duplicate Id error on Create New FixedAsset

Posted by "Chris Howe (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-547?page=comments#action_12461566 ] 
            
Chris Howe commented on OFBIZ-547:
----------------------------------

Thanks for looking at this Anil.  There is an instance that this solution doesn't handle.  Since the sequence-id-to-env simply retrieves a value based on a  field in SequenceValueItem, and the database is unaware of it's importance, it is possible for the SequenceValueItem to be out of sync with the next non duplicated primary key value.  This may occur in a deployment that does entity syncs or imports.   

Is this pattern already used, or are you suggesting it?

Additionally, since you're suppressing the error from occurring, you may want to put something to the log file perhaps showing the entire FixedAsset record that was retrieved (but certainly not to the screen as the user may not have privilege to view that record).

> Duplicate Id error on Create New FixedAsset
> -------------------------------------------
>
>                 Key: OFBIZ-547
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-547
>             Project: Apache OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: accounting
>            Reporter: Anil K Patel
>         Attachments: FixedAssedIdDuplicateMessage.patch
>
>
> While creating a New FixedAsset, if user enters FixedAssetId that already exists in system, Unfriendly message is returned and existing fixedAsset is opened in Edit mode. 
> 1) The error message should be easier to understand by user.
> 2) Existing fixedAsset should not be opened in edit mode, this confuses user with Idea that fixedAsset was created.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-547) Duplicate Id error on Create New FixedAsset

Posted by "Anil K Patel (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12462133 ] 

Anil K Patel commented on OFBIZ-547:
------------------------------------

Jacques,
Thanks for your time and help. 
Regards 

> Duplicate Id error on Create New FixedAsset
> -------------------------------------------
>
>                 Key: OFBIZ-547
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-547
>             Project: Apache OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: accounting
>            Reporter: Anil K Patel
>         Assigned To: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: FixedAssedIdDuplicateMessage_Update1.patch
>
>
> While creating a New FixedAsset, if user enters FixedAssetId that already exists in system, Unfriendly message is returned and existing fixedAsset is opened in Edit mode. 
> 1) The error message should be easier to understand by user.
> 2) Existing fixedAsset should not be opened in edit mode, this confuses user with Idea that fixedAsset was created.

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

        

[jira] Commented: (OFBIZ-547) Duplicate Id error on Create New FixedAsset

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

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

Thanks for the comment David, this is this kind of little notes that helps to better handle MiniLang.

> Duplicate Id error on Create New FixedAsset
> -------------------------------------------
>
>                 Key: OFBIZ-547
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-547
>             Project: Apache OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: accounting
>            Reporter: Anil K Patel
>         Assigned To: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: FixedAssedIdDuplicateMessage_Update1.patch
>
>
> While creating a New FixedAsset, if user enters FixedAssetId that already exists in system, Unfriendly message is returned and existing fixedAsset is opened in Edit mode. 
> 1) The error message should be easier to understand by user.
> 2) Existing fixedAsset should not be opened in edit mode, this confuses user with Idea that fixedAsset was created.

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

        

[jira] Commented: (OFBIZ-547) Duplicate Id error on Create New FixedAsset

Posted by "Anil K Patel (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-547?page=comments#action_12461572 ] 
            
Anil K Patel commented on OFBIZ-547:
------------------------------------

Chris,
>From what I understand, this is problem with Ofbiz primary key generation system in general. If you are suggesting this should be a Issue in itself, Is it ok if this patch be applied. Because this patch solves the problem that we face when User enters value in Id field.

what do you suggest?

 

> Duplicate Id error on Create New FixedAsset
> -------------------------------------------
>
>                 Key: OFBIZ-547
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-547
>             Project: Apache OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: accounting
>            Reporter: Anil K Patel
>         Attachments: FixedAssedIdDuplicateMessage.patch
>
>
> While creating a New FixedAsset, if user enters FixedAssetId that already exists in system, Unfriendly message is returned and existing fixedAsset is opened in Edit mode. 
> 1) The error message should be easier to understand by user.
> 2) Existing fixedAsset should not be opened in edit mode, this confuses user with Idea that fixedAsset was created.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-547) Duplicate Id error on Create New FixedAsset

Posted by "Anil K Patel (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-547?page=comments#action_12461564 ] 
            
Anil K Patel commented on OFBIZ-547:
------------------------------------

The attached patch implements handles duplicate primary key error. Implements most common pattern for solving such problem in Ofbiz. This very small patch should not take lot of time for a commiter to review.

> Duplicate Id error on Create New FixedAsset
> -------------------------------------------
>
>                 Key: OFBIZ-547
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-547
>             Project: Apache OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: accounting
>            Reporter: Anil K Patel
>         Attachments: FixedAssedIdDuplicateMessage.patch
>
>
> While creating a New FixedAsset, if user enters FixedAssetId that already exists in system, Unfriendly message is returned and existing fixedAsset is opened in Edit mode. 
> 1) The error message should be easier to understand by user.
> 2) Existing fixedAsset should not be opened in edit mode, this confuses user with Idea that fixedAsset was created.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-547) Duplicate Id error on Create New FixedAsset

Posted by "Chris Howe (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-547?page=comments#action_12461568 ] 
            
Chris Howe commented on OFBIZ-547:
----------------------------------

I'm not referring to the part that handles the form.  That part looks fine.  

The part that currently exists in the code (modified with your patch): 

        <if-empty field-name="parameters.fixedAssetId">
             <sequenced-id-to-env sequence-name="FixedAsset" env-name="newEntity.fixedAssetId"/>
         <else>

Can return a duplicate Id.  It can before the patch and it can after the patch.  So the returned value should be checked as well.

Since this issue is handling error messages for duplicate Ids we should fix it here and also send a little bit of information to the log.





> Duplicate Id error on Create New FixedAsset
> -------------------------------------------
>
>                 Key: OFBIZ-547
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-547
>             Project: Apache OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: accounting
>            Reporter: Anil K Patel
>         Attachments: FixedAssedIdDuplicateMessage.patch
>
>
> While creating a New FixedAsset, if user enters FixedAssetId that already exists in system, Unfriendly message is returned and existing fixedAsset is opened in Edit mode. 
> 1) The error message should be easier to understand by user.
> 2) Existing fixedAsset should not be opened in edit mode, this confuses user with Idea that fixedAsset was created.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (OFBIZ-547) Duplicate Id error on Create New FixedAsset

Posted by "Anil K Patel (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/OFBIZ-547?page=all ]

Anil K Patel updated OFBIZ-547:
-------------------------------

    Attachment: FixedAssedIdDuplicateMessage_Update1.patch

This patch extends existing patch. Also send error message to log file. Thanks to Chris for help in improving this patch.

> Duplicate Id error on Create New FixedAsset
> -------------------------------------------
>
>                 Key: OFBIZ-547
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-547
>             Project: Apache OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: accounting
>            Reporter: Anil K Patel
>         Attachments: FixedAssedIdDuplicateMessage.patch, FixedAssedIdDuplicateMessage_Update1.patch
>
>
> While creating a New FixedAsset, if user enters FixedAssetId that already exists in system, Unfriendly message is returned and existing fixedAsset is opened in Edit mode. 
> 1) The error message should be easier to understand by user.
> 2) Existing fixedAsset should not be opened in edit mode, this confuses user with Idea that fixedAsset was created.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-547) Duplicate Id error on Create New FixedAsset

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-547?page=comments#action_12461579 ] 
            
Jacques Le Roux commented on OFBIZ-547:
---------------------------------------

I did not test the patch but it seems sound and I vote for.

> Duplicate Id error on Create New FixedAsset
> -------------------------------------------
>
>                 Key: OFBIZ-547
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-547
>             Project: Apache OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: accounting
>            Reporter: Anil K Patel
>         Attachments: FixedAssedIdDuplicateMessage_Update1.patch
>
>
> While creating a New FixedAsset, if user enters FixedAssetId that already exists in system, Unfriendly message is returned and existing fixedAsset is opened in Edit mode. 
> 1) The error message should be easier to understand by user.
> 2) Existing fixedAsset should not be opened in edit mode, this confuses user with Idea that fixedAsset was created.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-547) Duplicate Id error on Create New FixedAsset

Posted by "Anil K Patel (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-547?page=comments#action_12461574 ] 
            
Anil K Patel commented on OFBIZ-547:
------------------------------------

This is not a problem I can do this.


> Duplicate Id error on Create New FixedAsset
> -------------------------------------------
>
>                 Key: OFBIZ-547
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-547
>             Project: Apache OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: accounting
>            Reporter: Anil K Patel
>         Attachments: FixedAssedIdDuplicateMessage.patch
>
>
> While creating a New FixedAsset, if user enters FixedAssetId that already exists in system, Unfriendly message is returned and existing fixedAsset is opened in Edit mode. 
> 1) The error message should be easier to understand by user.
> 2) Existing fixedAsset should not be opened in edit mode, this confuses user with Idea that fixedAsset was created.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-547) Duplicate Id error on Create New FixedAsset

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

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

Anil,

It seems that commiters have others important tasks to do with the TLP migration. I agree to apply your patch soon with the old good CTR policy. If anybody see a problem there please chim in...

> Duplicate Id error on Create New FixedAsset
> -------------------------------------------
>
>                 Key: OFBIZ-547
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-547
>             Project: Apache OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: accounting
>            Reporter: Anil K Patel
>         Attachments: FixedAssedIdDuplicateMessage_Update1.patch
>
>
> While creating a New FixedAsset, if user enters FixedAssetId that already exists in system, Unfriendly message is returned and existing fixedAsset is opened in Edit mode. 
> 1) The error message should be easier to understand by user.
> 2) Existing fixedAsset should not be opened in edit mode, this confuses user with Idea that fixedAsset was created.

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

        

[jira] Updated: (OFBIZ-547) Duplicate Id error on Create New FixedAsset

Posted by "Anil K Patel (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/OFBIZ-547?page=all ]

Anil K Patel updated OFBIZ-547:
-------------------------------

    Attachment: FixedAssedIdDuplicateMessage.patch

This patch gracefully handles submit if the user entered fixedAssetId that already existed in system. I'll like to get some Idea on How we can make the Form to now show existing FixedAsset in Edit mode, as a result of this error.


> Duplicate Id error on Create New FixedAsset
> -------------------------------------------
>
>                 Key: OFBIZ-547
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-547
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: accounting
>            Reporter: Anil K Patel
>         Attachments: FixedAssedIdDuplicateMessage.patch
>
>
> While creating a New FixedAsset, if user enters FixedAssetId that already exists in system, Unfriendly message is returned and existing fixedAsset is opened in Edit mode. 
> 1) The error message should be easier to understand by user.
> 2) Existing fixedAsset should not be opened in edit mode, this confuses user with Idea that fixedAsset was created.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-547) Duplicate Id error on Create New FixedAsset

Posted by "David E. Jones (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12462155 ] 

David E. Jones commented on OFBIZ-547:
--------------------------------------

Yes, I guess a commit is a good way to get someone, especially someone like me, to review it!

Anyway, this all looks pretty safe, and more closely follow the pattern used with the createProduct service.

BTW, in general the use of "entity-one" is far more effective and less error prone than the use of "find-by-primary-key". The main reason for this is that the field mappings are done with sub-elements, not with a Map that must be created and worried about.

> Duplicate Id error on Create New FixedAsset
> -------------------------------------------
>
>                 Key: OFBIZ-547
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-547
>             Project: Apache OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: accounting
>            Reporter: Anil K Patel
>         Assigned To: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: FixedAssedIdDuplicateMessage_Update1.patch
>
>
> While creating a New FixedAsset, if user enters FixedAssetId that already exists in system, Unfriendly message is returned and existing fixedAsset is opened in Edit mode. 
> 1) The error message should be easier to understand by user.
> 2) Existing fixedAsset should not be opened in edit mode, this confuses user with Idea that fixedAsset was created.

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

        

[jira] Commented: (OFBIZ-547) Duplicate Id error on Create New FixedAsset

Posted by "Chris Howe (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-547?page=comments#action_12461571 ] 
            
Chris Howe commented on OFBIZ-547:
----------------------------------

cleaning cache wouldn't solve the problem as even the next 10 may be duplicates as well.  Looping would solve the problem. However, this may be better addressed in the method underlying sequenced-id-to-env in the minilang java files.  And looping until a good one is found may be performance intensive.  If we could get some feedback from some others and  they agree on solving it through the minilang java, that would be a new issue.

> Duplicate Id error on Create New FixedAsset
> -------------------------------------------
>
>                 Key: OFBIZ-547
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-547
>             Project: Apache OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: accounting
>            Reporter: Anil K Patel
>         Attachments: FixedAssedIdDuplicateMessage.patch
>
>
> While creating a New FixedAsset, if user enters FixedAssetId that already exists in system, Unfriendly message is returned and existing fixedAsset is opened in Edit mode. 
> 1) The error message should be easier to understand by user.
> 2) Existing fixedAsset should not be opened in edit mode, this confuses user with Idea that fixedAsset was created.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (OFBIZ-547) Duplicate Id error on Create New FixedAsset

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

Jacques Le Roux reassigned OFBIZ-547:
-------------------------------------

    Assignee: Jacques Le Roux

> Duplicate Id error on Create New FixedAsset
> -------------------------------------------
>
>                 Key: OFBIZ-547
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-547
>             Project: Apache OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: accounting
>            Reporter: Anil K Patel
>         Assigned To: Jacques Le Roux
>         Attachments: FixedAssedIdDuplicateMessage_Update1.patch
>
>
> While creating a New FixedAsset, if user enters FixedAssetId that already exists in system, Unfriendly message is returned and existing fixedAsset is opened in Edit mode. 
> 1) The error message should be easier to understand by user.
> 2) Existing fixedAsset should not be opened in edit mode, this confuses user with Idea that fixedAsset was created.

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

        

[jira] Closed: (OFBIZ-547) Duplicate Id error on Create New FixedAsset

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

Jacques Le Roux closed OFBIZ-547.
---------------------------------

       Resolution: Fixed
    Fix Version/s: SVN trunk

Anil,

Your patch is in OFBiz revision: 492411  

Thanks


> Duplicate Id error on Create New FixedAsset
> -------------------------------------------
>
>                 Key: OFBIZ-547
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-547
>             Project: Apache OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: accounting
>            Reporter: Anil K Patel
>         Assigned To: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: FixedAssedIdDuplicateMessage_Update1.patch
>
>
> While creating a New FixedAsset, if user enters FixedAssetId that already exists in system, Unfriendly message is returned and existing fixedAsset is opened in Edit mode. 
> 1) The error message should be easier to understand by user.
> 2) Existing fixedAsset should not be opened in edit mode, this confuses user with Idea that fixedAsset was created.

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