Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0055758
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Modules] Unique Product UPCminoralways2024-06-12 19:052024-06-24 21:59
ReportersdossantosView Statuspublic 
Assigned ToTriage Omni OMS 
PrioritynormalResolutionopenFixed in Version
StatusnewFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product Version1.1.2SCM revision 
Regression date
Regression introduced by commit
Regression level
Review Assigned To
Regression introduced in release
Summary

0055758: Unique UPC in product

DescriptionIf I configure the same upc that is in the header on the same product, it fails. This should work because it is the same product.
Steps To Reproduce1- Add upc in the tab of the multiupc, the same upc in the header of the product
We see the error

Attached the image
Proposed Solutionat line 79
// Check UPC in Product
final OBQuery<Product> productQuery = OBDal.getInstance()
.createQuery(Product.class,
"as e where e.uPCEAN = :upcValue and e.organization.id = :orgId");
productQuery.setNamedParameter("upcValue", newUpc);
productQuery.setNamedParameter("orgId", orgId);
productQuery.setFilterOnReadableOrganization(false);
productQuery.setMaxResult(10);
List<Product> listProduct = productQuery.list();
if (listProduct.size() > 0) {
Product p = listProduct.get(0);
for (Product product : listProduct) {
if(!p.getId().equals(product.getId()))
{
listProductName.add(product.getName());
}
}
}

if (listProductName.size() > 0) {
throw new OBException(String.format(OBMessageUtils.messageBD("OBMUPC_DUPLICATED_UPC"),
String.join(", ", listProductName)));
}
}
TagsNo tags attached.
Attached Filespng file icon Captura de pantalla -2024-06-12 14-00-44.png [^] (172,939 bytes) 2024-06-12 19:05

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0165866)
frank_gonzalez (developer)
2024-06-12 19:30

Jira: https://openbravo.atlassian.net/browse/RM-14669 [^]
(0166076)
hgbot (developer)
2024-06-18 18:20

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.multiupc/-/merge_requests/7 [^]

- Issue History
Date Modified Username Field Change
2024-06-12 19:05 sdossantos New Issue
2024-06-12 19:05 sdossantos Assigned To => Triage Omni OMS
2024-06-12 19:05 sdossantos File Added: Captura de pantalla -2024-06-12 14-00-44.png
2024-06-12 19:30 frank_gonzalez Note Added: 0165866
2024-06-18 13:27 sdossantos Proposed Solution updated
2024-06-18 18:20 hgbot Note Added: 0166076
2024-06-24 21:59 sdossantos Priority high => normal
2024-06-24 21:59 sdossantos Severity major => minor


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker