[jira] [Commented] (OFBIZ-11431) InvoiceItem: uomID is wrongly defined
[ https://issues.apache.org/jira/browse/OFBIZ-11431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17073836#comment-17073836 ] Pierre Smits commented on OFBIZ-11431: -- [~hansbak], You are correct. But I guess that you (and the others) in the early days of the product and project correctly decided that it was better to have the uomId fields explicitly named (like currencyUomId, quantityUomId, etc.) than having people assume the 'implied' application. I also guess that some just fell between the cracks. > InvoiceItem: uomID is wrongly defined > - > > Key: OFBIZ-11431 > URL: https://issues.apache.org/jira/browse/OFBIZ-11431 > Project: OFBiz > Issue Type: Sub-task > Components: datamodel >Affects Versions: Trunk >Reporter: Pierre Smits >Priority: Critical > Labels: refactoring > Time Spent: 10m > Remaining Estimate: 0h > > Currently the InvoiceItem entity has the field uomId, per: > {code:java} > > {code} > per the demo data this field is used to capture the currency of the invoice > item. This is, however, wrong. The currency for invoice items is set in the > invoice entity record (with field currencyUomId. > The uomId in the invoice item is related to the quantity set, and must be > correctly named: 'quantityUomId. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-11431) InvoiceItem: uomID is wrongly defined
[ https://issues.apache.org/jira/browse/OFBIZ-11431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17073810#comment-17073810 ] James Yong commented on OFBIZ-11431: Hi [~pierresmits], Thanks for the clarification. > InvoiceItem: uomID is wrongly defined > - > > Key: OFBIZ-11431 > URL: https://issues.apache.org/jira/browse/OFBIZ-11431 > Project: OFBiz > Issue Type: Sub-task > Components: datamodel >Affects Versions: Trunk >Reporter: Pierre Smits >Priority: Critical > Labels: refactoring > Time Spent: 10m > Remaining Estimate: 0h > > Currently the InvoiceItem entity has the field uomId, per: > {code:java} > > {code} > per the demo data this field is used to capture the currency of the invoice > item. This is, however, wrong. The currency for invoice items is set in the > invoice entity record (with field currencyUomId. > The uomId in the invoice item is related to the quantity set, and must be > correctly named: 'quantityUomId. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-11431) InvoiceItem: uomID is wrongly defined
[ https://issues.apache.org/jira/browse/OFBIZ-11431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17073696#comment-17073696 ] Pierre Smits commented on OFBIZ-11431: -- Re ?Beside quantityUomId, you implied there can be other uom like weightUomId, lengthUomId for InvoiceItem entity.?? I did not imply that there *can* be such field definitions in the data model. These are already there, and they are used to capture differentiations of the quantityUomId attributes. Take any given product in the demo data set in demo trunk, and take a look at the 'measures' section (which should actually be called 'measurements', e.g. https://demo-trunk.ofbiz.apache.org/catalog/control/EditProduct?productId=WG-9943 These measurement UomId fields are used to help with determining packing and shipping aspects. > InvoiceItem: uomID is wrongly defined > - > > Key: OFBIZ-11431 > URL: https://issues.apache.org/jira/browse/OFBIZ-11431 > Project: OFBiz > Issue Type: Bug > Components: datamodel >Affects Versions: Trunk >Reporter: Pierre Smits >Priority: Critical > Labels: refactoring > Time Spent: 10m > Remaining Estimate: 0h > > Currently the InvoiceItem entity has the field uomId, per: > {code:java} > > {code} > per the demo data this field is used to capture the currency of the invoice > item. This is, however, wrong. The currency for invoice items is set in the > invoice entity record (with field currencyUomId. > The uomId in the invoice item is related to the quantity set, and must be > correctly named: 'quantityUomId. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-11431) InvoiceItem: uomID is wrongly defined
[ https://issues.apache.org/jira/browse/OFBIZ-11431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17073689#comment-17073689 ] Pierre Smits commented on OFBIZ-11431: -- Data migration at an adopter's implementation due to data model updates require a bit more (not only the implementing the changes, but also planning for testing and execution). This, obviously, would not happen while the system would be active during operation hours. Nevertheless, the suggestion regarding the 'deprecated-entitymodel.xml' would help the adopters (and their supporting system integrators/devops staff). We could consider this approach to be included in the project's data-migration guide. But the project should not consider it to make it part of the code base. > InvoiceItem: uomID is wrongly defined > - > > Key: OFBIZ-11431 > URL: https://issues.apache.org/jira/browse/OFBIZ-11431 > Project: OFBiz > Issue Type: Bug > Components: datamodel >Affects Versions: Trunk >Reporter: Pierre Smits >Priority: Critical > Labels: refactoring > Time Spent: 10m > Remaining Estimate: 0h > > Currently the InvoiceItem entity has the field uomId, per: > {code:java} > > {code} > per the demo data this field is used to capture the currency of the invoice > item. This is, however, wrong. The currency for invoice items is set in the > invoice entity record (with field currencyUomId. > The uomId in the invoice item is related to the quantity set, and must be > correctly named: 'quantityUomId. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-11431) InvoiceItem: uomID is wrongly defined
[ https://issues.apache.org/jira/browse/OFBIZ-11431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17073549#comment-17073549 ] James Yong commented on OFBIZ-11431: Hi [~pierresmits], {quote}Re aspect 1 Indeed, if the field is crucial in the adopter implementation, then your suggest solution can be applied by them in their update/migration scenarios. {quote} The proposed datamodel/entitydef/deprecated-entitymodel.xml file was meant to be commented out by new adopters who don't want to use deprecated fields. {quote}Re aspect 2 Doing a find on the code base on trunk branched of the combined set of repos revealed multiple 'quantityUomId' field definitions in use, even more when including derivatives like weightUomId, lenghtUomId, etc. {quote} Beside *quantityUomId*, you implied there can be other uom like *weightUomId*, *lengthUomId* for *InvoiceItem* entity. Wouldn't it better to keep the existing *uomId* field as it can be used for quantity, weight or length depending on item? > InvoiceItem: uomID is wrongly defined > - > > Key: OFBIZ-11431 > URL: https://issues.apache.org/jira/browse/OFBIZ-11431 > Project: OFBiz > Issue Type: Bug > Components: datamodel >Affects Versions: Trunk >Reporter: Pierre Smits >Priority: Critical > Labels: refactoring > Time Spent: 10m > Remaining Estimate: 0h > > Currently the InvoiceItem entity has the field uomId, per: > {code:java} > > {code} > per the demo data this field is used to capture the currency of the invoice > item. This is, however, wrong. The currency for invoice items is set in the > invoice entity record (with field currencyUomId. > The uomId in the invoice item is related to the quantity set, and must be > correctly named: 'quantityUomId. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-11431) InvoiceItem: uomID is wrongly defined
[ https://issues.apache.org/jira/browse/OFBIZ-11431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17073544#comment-17073544 ] James Yong commented on OFBIZ-11431: Hi [~hansbak], {quote}isn't this uomId field not meant to tell more about the quantity? it is possible to add a non-product item and then this field can be used to indicate if per piece, per kilo, per gallon etc {quote} As the *uomId* field is populated with currency info in the demo data and the field name is generic, we can deprecate *uomId* field and add *quantityUomId* field to *InvoiceItem* entity. We can create a file like datamodel/entitydef/deprecated-entitymodel.xml and add deprecated field i.e. {code:xml} {code} Users can have the option of not loading deprecated-entitymodel.xml by commenting it out from ofbiz-component.xml > InvoiceItem: uomID is wrongly defined > - > > Key: OFBIZ-11431 > URL: https://issues.apache.org/jira/browse/OFBIZ-11431 > Project: OFBiz > Issue Type: Bug > Components: datamodel >Affects Versions: Trunk >Reporter: Pierre Smits >Priority: Critical > Labels: refactoring > Time Spent: 10m > Remaining Estimate: 0h > > Currently the InvoiceItem entity has the field uomId, per: > {code:java} > > {code} > per the demo data this field is used to capture the currency of the invoice > item. This is, however, wrong. The currency for invoice items is set in the > invoice entity record (with field currencyUomId. > The uomId in the invoice item is related to the quantity set, and must be > correctly named: 'quantityUomId. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-11431) InvoiceItem: uomID is wrongly defined
[ https://issues.apache.org/jira/browse/OFBIZ-11431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17073455#comment-17073455 ] Hans Bakker commented on OFBIZ-11431: - isn't this uomId field not meant to tell more about the quantity? it is possible to add a non-product item and then this field can be used to indicate if per piece, per kilo, per gallon etc > InvoiceItem: uomID is wrongly defined > - > > Key: OFBIZ-11431 > URL: https://issues.apache.org/jira/browse/OFBIZ-11431 > Project: OFBiz > Issue Type: Bug > Components: datamodel >Affects Versions: Trunk >Reporter: Pierre Smits >Priority: Critical > Labels: refactoring > Time Spent: 10m > Remaining Estimate: 0h > > Currently the InvoiceItem entity has the field uomId, per: > {code:java} > > {code} > per the demo data this field is used to capture the currency of the invoice > item. This is, however, wrong. The currency for invoice items is set in the > invoice entity record (with field currencyUomId. > The uomId in the invoice item is related to the quantity set, and must be > correctly named: 'quantityUomId. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-11431) InvoiceItem: uomID is wrongly defined
[ https://issues.apache.org/jira/browse/OFBIZ-11431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17073423#comment-17073423 ] Michael Brohl commented on OFBIZ-11431: --- I don't see the renaming of the field as crucial for new users as described. With a proper documented field they will clearly know how to use it. On the other side, it forces all existing users to do a database migration of their productive systems which has way more effects. IMO the project has to provide a deprecation/migration solution and clearly document the change for existing users if we make this change. Prefixed uomId fields are mostly present when there are other uomId fields in the same entity which makes it neccessary to have different names. That's not an valid argument for the proposed changed. > InvoiceItem: uomID is wrongly defined > - > > Key: OFBIZ-11431 > URL: https://issues.apache.org/jira/browse/OFBIZ-11431 > Project: OFBiz > Issue Type: Bug > Components: datamodel >Affects Versions: Trunk >Reporter: Pierre Smits >Priority: Critical > Labels: refactoring > Time Spent: 10m > Remaining Estimate: 0h > > Currently the InvoiceItem entity has the field uomId, per: > {code:java} > > {code} > per the demo data this field is used to capture the currency of the invoice > item. This is, however, wrong. The currency for invoice items is set in the > invoice entity record (with field currencyUomId. > The uomId in the invoice item is related to the quantity set, and must be > correctly named: 'quantityUomId. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-11431) InvoiceItem: uomID is wrongly defined
[ https://issues.apache.org/jira/browse/OFBIZ-11431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17073406#comment-17073406 ] Pierre Smits commented on OFBIZ-11431: -- Hi James, Re aspect 1 Indeed, if the field is crucial in the adopter implementation, then your suggest solution can be applied by them in their update/migration scenarios. Re aspect 2 Doing a find on the code base on trunk branched of the combined set of repos revealed multiple 'quantityUomId' field definitions in use, even more when including derivatives like weightUomId, lenghtUomId, etc. > InvoiceItem: uomID is wrongly defined > - > > Key: OFBIZ-11431 > URL: https://issues.apache.org/jira/browse/OFBIZ-11431 > Project: OFBiz > Issue Type: Bug > Components: datamodel >Affects Versions: Trunk >Reporter: Pierre Smits >Priority: Critical > Labels: refactoring > Time Spent: 10m > Remaining Estimate: 0h > > Currently the InvoiceItem entity has the field uomId, per: > {code:java} > > {code} > per the demo data this field is used to capture the currency of the invoice > item. This is, however, wrong. The currency for invoice items is set in the > invoice entity record (with field currencyUomId. > The uomId in the invoice item is related to the quantity set, and must be > correctly named: 'quantityUomId. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-11431) InvoiceItem: uomID is wrongly defined
[ https://issues.apache.org/jira/browse/OFBIZ-11431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17072912#comment-17072912 ] James Yong commented on OFBIZ-11431: Hi Pierre, all, 2 issues here: 1st is the removal of *uomId* field from *InvoiceItem* entity because the info is already captured in *Invoice* entity. As the field may be in use, we can move this field to an *extend-entity* for *InvoiceItem* like the following. This will address the deprecation issue. {code:xml} File: datamodel/entitydef/deprecated-entitymodel.xml ... ... {code} 2nd is the addition of *quantityUomId* field in *InvoiceItem* entity. I can't find a corresponding field in *OrderItem* entity. Is there is a corresponding field in another related entity? > InvoiceItem: uomID is wrongly defined > - > > Key: OFBIZ-11431 > URL: https://issues.apache.org/jira/browse/OFBIZ-11431 > Project: OFBiz > Issue Type: Bug > Components: datamodel >Affects Versions: Trunk >Reporter: Pierre Smits >Priority: Critical > Labels: refactoring > Time Spent: 10m > Remaining Estimate: 0h > > Currently the InvoiceItem entity has the field uomId, per: > {code:java} > > {code} > per the demo data this field is used to capture the currency of the invoice > item. This is, however, wrong. The currency for invoice items is set in the > invoice entity record (with field currencyUomId. > The uomId in the invoice item is related to the quantity set, and must be > correctly named: 'quantityUomId. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-11431) InvoiceItem: uomID is wrongly defined
[ https://issues.apache.org/jira/browse/OFBIZ-11431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17051140#comment-17051140 ] Rishi Solanki commented on OFBIZ-11431: --- I would say, if this change is acceptable then we should start using the prefixUomId to give clear indication to user of the code which UOM can be used for a particular field. But I am not aware of the this field usage, and demo data says previously it was used for currency. So changing UI, and having data migration script will complete the work. What if some user already used it in old fashion then migration won't work IMO. With some agreement on this chane I tend to agreed on the point migration does not resolve if someone start using it incorrectly in 16R, 17R and older releases. > InvoiceItem: uomID is wrongly defined > - > > Key: OFBIZ-11431 > URL: https://issues.apache.org/jira/browse/OFBIZ-11431 > Project: OFBiz > Issue Type: Bug > Components: datamodel >Affects Versions: Trunk >Reporter: Pierre Smits >Priority: Critical > Labels: refactoring > Time Spent: 10m > Remaining Estimate: 0h > > Currently the InvoiceItem entity has the field uomId, per: > {code:java} > > {code} > per the demo data this field is used to capture the currency of the invoice > item. This is, however, wrong. The currency for invoice items is set in the > invoice entity record (with field currencyUomId. > The uomId in the invoice item is related to the quantity set, and must be > correctly named: 'quantityUomId. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-11431) InvoiceItem: uomID is wrongly defined
[ https://issues.apache.org/jira/browse/OFBIZ-11431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17049195#comment-17049195 ] Pierre Smits commented on OFBIZ-11431: -- Simply following your suggestion does not lead to correct use of the field. People often overlook comments in tickets and elsewhere. A data model change is what you get when wrong (ambiguous) definitions appear in the model. Leaving wrong approaches in does not help adopters, nor the project. Rather sticking to conventions used elsewhere in the codebase regarding the *UomId definitions would be better for the project. > InvoiceItem: uomID is wrongly defined > - > > Key: OFBIZ-11431 > URL: https://issues.apache.org/jira/browse/OFBIZ-11431 > Project: OFBiz > Issue Type: Bug > Components: datamodel >Affects Versions: Trunk >Reporter: Pierre Smits >Priority: Critical > Labels: refactoring > Time Spent: 10m > Remaining Estimate: 0h > > Currently the InvoiceItem entity has the field uomId, per: > {code:java} > > {code} > per the demo data this field is used to capture the currency of the invoice > item. This is, however, wrong. The currency for invoice items is set in the > invoice entity record (with field currencyUomId. > The uomId in the invoice item is related to the quantity set, and must be > correctly named: 'quantityUomId. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OFBIZ-11431) InvoiceItem: uomID is wrongly defined
[ https://issues.apache.org/jira/browse/OFBIZ-11431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17049188#comment-17049188 ] Michael Brohl commented on OFBIZ-11431: --- This would require a data model change and data migration. I'd suggest to simply point out the correct use in the entity field description instead of changing the name. > InvoiceItem: uomID is wrongly defined > - > > Key: OFBIZ-11431 > URL: https://issues.apache.org/jira/browse/OFBIZ-11431 > Project: OFBiz > Issue Type: Bug > Components: datamodel >Affects Versions: Trunk >Reporter: Pierre Smits >Priority: Critical > Labels: refactoring > Time Spent: 10m > Remaining Estimate: 0h > > Currently the InvoiceItem entity has the field uomId, per: > {code:java} > > {code} > per the demo data this field is used to capture the currency of the invoice > item. This is, however, wrong. The currency for invoice items is set in the > invoice entity record (with field currencyUomId. > The uomId in the invoice item is related to the quantity set, and must be > correctly named: 'quantityUomId. -- This message was sent by Atlassian Jira (v8.3.4#803005)