Currently the create buttons for the main objects of the catalog components are located within the find and profile widgets/templates of those object.
In order to improve the usability of OFBiz (and thus the appeal of it for adopters and users) these create buttons/links/etc. should be in a main action menu visible at all times when a user is working within the component.
added: main action menu, having menu-items for
- new product process
- new store process
- new catalog process
- new category process
subject to catalog create permissions
added: decorator section for inclusion of main action menu where appropriate
Some cleanup
Screen EditProductStoreGroupAndAssoc does not connect with grid forms referenced.
Modified: StoreScreens.xml
moved from form references to grid references
removed screen duplicate
additional cleanup
According to the definition in widget-form.xsd the use of a combination of a form with type="list" is deprecated in favour of a grid.
Refactor various list forms into grids.
Refactor various list form references in screens.
Modified:
ShipmentGatewayConfigScreens.xml: from form ref to grid ref , additional cleanup
ShipmentGatewayConfigForms.xml: from form definition with list ref to grid definition with list ref, additional clean-up
Refactor various list forms into grids.
Refactor various list form references in screens.
Modified:
FacilityGroupScreens.xml: from form ref to grid ref , additional cleanup
FacilityGroupForms.xml: from form definition with list ref to grid definition with list ref, additional clean-up
According to the definition in widget-form.xsd the use of a combination
of a form with type="list" is deprecated in favour of a grid.
Refactor various list forms into grids.
Refactor various list form references in screens.
Modified:
FacilityScreens.xml: from form ref to grid ref , additional cleanup
FacilityForms.xml: from form definition with list ref to grid definition with list ref, additional clean-up
According to the definition in widget-form.xsd the use of a combination of a form with type="list" is deprecated in favour of a grid.
Refactor various list forms into grids.
Refactor various list form references in screens.
Modified:
ShippingScreens.xml in product: from form ref to grid ref , additional cleanup
ShippingForms.xml: from form definition with list ref to grid definition with list ref, additional clean-up
According to the definition in widget-form.xsd the use of a combination of a form with type="list" is deprecated in favour of a grid.
Refactor various list forms into grids.
Refactor various list form references in screens.
Modified:
ProductScreens.xml in product: from form ref to grid ref , additional cleanup
ProductForms.xml: from form definition with list ref to grid definition with list ref, additional clean-up
As advised by SpotBugs:
<<This code creates a java.util.Random object, uses it to generate one random
number, and then discards the Random object. This produces mediocre quality
random numbers and is inefficient. If possible, rewrite the code so that the
Random object is created once and saved, and each time a new random number is
required invoke a method on the existing Random object to obtain it.
If it is important that the generated Random numbers not be guessable, you must
not create a new Random for each random number; the values are too easily
guessable. You should strongly consider using a java.security.SecureRandom
instead (and avoid allocating a new SecureRandom for each random number needed).
Rank: Troubling (14), confidence: High
Pattern: DMI_RANDOM_USED_ONLY_ONCE
Type: DMI, Category: BAD_PRACTICE (Bad practice)>>
uses <<private static final SecureRandom SECURE_RANDOM = new SecureRandom();>>
in classes:
PaymentGatewayServices
ValueLinkApi
ContactMechServices
ProductStoreWorker
DesCrypt
HashCrypt
EntityCrypto
ContextFilter.java
Despite doing so SpotButs still reports the same error for those classes.
As it's obviously an error I prefer to not excludes those cases that will maybe
not be reported in a future version of SpotButs in Eclipse. For instance they
are not reported at all in previous version (4.5.1) but are in 4.5.2
* Fixed: Price Rules: Price rules configurations are not syncing with eCommerce storefront (OFBIZ-12450)
When adding a Price Rule, whether it be a Product Category, Product, Party, Party Classification, the system doesn't show a price difference.
The price rules work with the Database as they do get changed when saved. But their functionality doesn't work, it won't give a price increase or decrease or restriction.
Modified:
Various data files to enhance demonstration of price rule functionality
Modified: ProductDemoData.xml
- restructured some price rule data elements
- added additional price rule data elements
Modified:
PriceServices.java: added partyClassificationGroupId to the mix
When a price rule is shown in the screen, the associated existing conditions are not shown in the overview for the conditions
Modified: Priceforms.xml
- changed grid 'EditProductPriceRulesCondition' list-name to reflect correct list
With commit 92533b5 the reference in screen FindProductPriceRule was not changed
when the relating object in PriceForms.xml changed from form to grid.
Modified: PriceScreens.xml
changed reference in FindProductPriceRule from include-form to include-grid
Finally it's better to use || than | (did not check well last time) in
ProductSearchSession::makeSearchParametersString
kc.isAnyPrefix() || kc.isAnySuffix()
So also removes the exclusion
No problem for report field in AbstractReportThread as explained in exclude.xml
According to the definition in widget-form.xsd the use of a combination of a form with type="list" is deprecated in favour of a grid.
Refactor various list forms into grids.
Refactor various list form references in screens.
Modified:
PromoScreens.xml: from form ref to grid ref , additional cleanup
PromoForms.xml: from form definition with list ref to grid definition with list ref, additional clean-up
In ProductWorker::getProductFeaturesApplIncludeMarketingPackage fixes a possible
null dereferencement (tested too late)
In FileUtil::unZip uses a try-w-resource w/ ZipFile to close it. I crossed an
issue with automated OOTB formatting (clean-up on save in Eclipse). Fixed with
my external default editor (could not find where to change that in
OFBizJavaFormatter.xml
In ServiceArtifactInfo::calledServiceEcaSet fixes a possible null dereferencement
(tested too late), also minor formatting
In MacroScreenRenderer::renderScreenletSubWidget fixes a possible null
dereferencement (tested too late)
in FileUtil
In exclude.xml:
removes Confidence lines, no need to complicate things
Adds 2 DC_DOUBLECHECK false reports; synchronized is used there (maybe not the
best way but it's OK as is)
In ProductConfigWrapper::equals fixes use of == instead of equals (tested)
In UspsServices::uspsPriorityMailInternationalLabel fixes 2 possible null
dereferencements
In EntityExpr::checkRhsType fixes a possible null dereferencement
According to the definition in widget-form.xsd the use of a combination of a form with type="list" is deprecated in favour of a grid.
Refactor various list forms into grids.
Refactor various list form references in screens.
modified:
StoreScreens.xml: from form ref to grid ref , additional cleanup
StoreForms.xml: from form definition with list ref to grid definition with list ref, additional clean-up
* Imrpoved: Grid and List (OFBIZ-11345)
According to the definition in widget-form.xsd the use of a combination of a form with type="list" is deprecated in favour of a grid.
Refactor various list forms into grids.
Refactor various list form references in screens.
modified in product component:
FeatureScreens.xml: from form ref to grid ref , additional cleanup
FeatureForms.xml: from form definition with list ref to grid definition with list ref, additional clean-up
* Improved: List and Grid (OFBIZ-11345)
According to the definition in widget-form.xsd the use of a combination of a form with type="list" is deprecated in favour of a grid.
Refactor various list forms into grids.
Refactor various list form references in screens.
modified in product component:
PriceScreens.xml: from form ref to grid ref , additional cleanup
PriceForms.xml: from form definition with list ref to grid definition with list ref, additional clean-up
* Improved: List and Grid (OFBIZ-11345)
According to the definition in widget-form.xsd the use of a combination of a form with type="list" is deprecated in favour of a grid.
Refactor various list forms into grids.
Refactor various list form references in screens.
modified in product component:
CatalogScreens.xml: from form ref to grid ref , additional cleanup
ProdCatalogForms.xml: from form definition with list ref to grid definition with list ref, additional clean-up
Renames OfbizControlServlet class to CategoryControlServlet. That name better
corresponds to the reality.
Removes unused/useless var in CatalogUrlSeoFilter and SeoControlServlet
Renames ControlServlet class to OfbizControlServlet, because it shadowed the
simple name of it superclass
It can be exceptionally confusing, create lots of situations in which you have
to look at import statements to resolve references and creates many
opportunities to accidentally define methods that do not override methods
in their superclasses.
Same for XmlRpcClient.java
* Improved: List and Grid (OFBIZ-11345)
According to the definition in widget-form.xsd the use of a combination of a form with type="list" is deprecated in favour of a grid.
Refactor various list forms into grids.
Refactor various list form references in screens.
modified in product component:
ConfigScreens.xml: from form ref to grid ref , additional cleanup
ConfigForms.xml: from form definition with list ref to grid definition with list ref, additional clean-up
* Improved: Grid and List (OFBIZ-11345)
According to the definition in widget-form.xsd the use of a combination of a form with type="list" is deprecated in favour of a grid.
Refactor various list forms into grids.
Refactor various list form references in screens.
Overlooked in ConfigScreens.xml references regarding ProductConfigOptionList and ListProductConfigItem
modified in product component:
ConfigScreens.xml: from form ref to grid ref , additional cleanup
ConfigForms.xml: from form definition with list ref to grid definition with list ref, additional clean-up
According to the definition in widget-form.xsd the use of a combination of a form with type="list" is deprecated in favour of a grid.
Refactor various list forms into grids.
Refactor various list form references in screens.
modified:
CategoryScreens.xml and CommonScreens.xml in product: from form ref to grid ref , additional cleanup
CategoryForms.xml: from form definition with list ref to grid definition with list ref, additional clean-up
Fixes possible null dereferencings in PackingSession.java and FormRenderer.java
Also a try with resource for FormRenderer because the EntityListIterator was not
closed.
Also removes not used setShipmentBoxTypeId method and shipmentBoxTypeId var in
PackingSession.java
Fixed the Additional image uploading issue which got somehow missed in service addAdditionalViewForProduct.
Co-authored-by: Rohit Koushal <rohit.koushal39@gmail.com>
Associating lists in screens with grids in forms.
modified:
ShipmentScreens.xml.xml: from form ref to grid ref
ShipmentForms.xml: from form definition with list ref to grid definition with list ref, additional clean-up
For now only description is shown. OOTB some categories have no description
We can easily fix that by showing more info. I suggest to add categoryName and
productCategoryId. That should be enough. There are then no blank lines since
productCategoryId always show.
This is anyway customisable by users
Currently OFBiz is broken and hard to fix. You can't even create an order !
Revert "Improved: visibility of expire button (OFBIZ-12362) (#331)"
This reverts commit e3b125ef4c.
Revert "(OFBIZ-5980) Improvement: PartyRole record(s) expiration/revocation (#330)"
This reverts commit a8ab2be55a.
Revert "Improved: seed data (OFBIZ-12355) (#328)"
This reverts commit b204b867b4.
Revert "Reverted: Have the ability to revoke (expire) roles of a party (OFBIZ-5980)"
This reverts commit 85e066deb3.
Revert "Reverted: damn I did not revert the right push :/"
This reverts commit b867b2a89f.
Revert "(OFBIZ-5980) Improvement: PartyRole record(s) expiration/revocation (#325)"
This reverts commit 8ed2252df8.
Revert "Reverted: Have the ability to revoke (expire) roles of a party (OFBIZ-5980)"
This reverts commit 5b5e03f71b.
Revert "Improved: Have the ability to revoke (expire) roles of a party (OFBIZ-5980)"
This reverts commit 46f7ee91d3.
Revert "Improved: seed data (OFBIZ-12353) (#324)"
This reverts commit fade92bb57.
added/changed/updated:
- added field definition for from and through date to the entity
- added service for expiration
- request-map for expiration
- appropriate forms to work with added entity fields
- added groovy code to check existing when adding PartyRole record and call expiration service if needed
- adding fromDate value to seed, test and demo data
Reverts commit 46f7ee91d3
Reverted on Pierre Smits kindly asking for authoring by pushing a PR, not only a
thanks while committing his patch after testing it locally
Currently it only possible to delete a role. That can lead to potential error
messages, when a particular role is associated with records where the roleTypeId
is used as a foreign key in the entity-model/database and the user tries to
delete that role from the list.
In order to avoid such, it is better to revoke the PartyRole record by setting
an expiration date (end date) on the record.
Thanks: Pierre Smits
Adds unused hashCode method to *ArtifactInfo and PackingSession classes
Makes final CmsEvents, ContactMechWorker and PartyWorker classes
There are no longer any checkstyle issues
As Lalit reported it's not really a bug. But an annoying service transformation
of updateProductPromo to entity-auto (I checked using R15.12). Note that
createProductPromo is not affected
I'm not sure other update services using entity-auto are not affected
Thanks: Do Nhu Vy for report, Lalit Dashora for initial analysis
By adding two equal products with different configurations in eCommerce cart it results in qty aggregation instead of adding 2 separate cart lines.
When we added a new configuration in cart, we analyze all configuration options already present to know if this configuration case is alredy load and merge the quantity added.
Thanks: Alexander Tzvetanov for raise this issue
Fixes a number of issues I spotted while working on OFBIZ-12305 in relation with
OFBIZ-12055
The last change I made for OFBIZ-12305 was incomplete, the files could not be
checked by SecuredUpload because they did not exist! This concerns
ImageManagementServices, DataServices, FrameImage and ProductServices classes.
I used Files::createTempFile to fix that.
Also fixes a bug in SecuredUpload where I reversed the check on
fileToCheck.length in Windows case. I also added a comment, Windows 10 now
allows more length (need an OS parameter change though)
Finally, creates public SecuredUpload::isValidText to be used in OFBIZ-12305
On the service calcShipmentCostEstimate, each estimated shipment cost is analysed to resolve which ones should be applied on the order.
During the breakQtys block analysis, OFBiz checks if the estimate match the quantity with their breaks and validates if one is good.
If a rule contains multiple break type (ex: weight and price) this will be ignored or use as partial, only one break would be analysed.
To solve it we extend the analyse on the break type combinaison.
After a global code review, we reformat the function to down less code quantity for help the reader on:
* use an Util function to resolve BigDecimal values
* dedicate function to resolve the shipping address
* dedicate function to validate a break type
* move multiple loop to stream
Thanks to Gil Portenseigne and Jacques Leroux for their look
Safer completing solution as recommended by weinull orz <weinull@outlook.com>
Previous commit was OK, but better be safe than sorry ;)
Also forgot to commit the DENIEDFILEEXTENSIONS checkstyle change last time
Thanks: weinull orz for the the right suggestion (done 2021-08-13)
When you create a product as a marketing package, you attempt when you ship this product to have the same constraint as you ship each product that compose it separately.
Marketing Package | Composed product | Product Feature
GIFT_PACKAGE | |
1 | GIZMO_HEAVY | (WEIGHT) HEAVY_SIZE
2 | GIZMO_TINY |
On this example if I ordered a GIFT_PACKAGE, during the order process, currently you never see that you ordered a product with a feature HEAVY_SIZE, feature that can have some consequence for select a shipping method.
So when we need to analyze the features linked to a product, if the product is a marketing package, we propage the search to all products that compose it
Problem when trying to access Party linked to Catalog.
When you click on a user associated with a catalog, the framework sends you to
party manager, but it's the currently logged in user that shows up in the
party manager, not the party that you want to see.
To reproduce, just go in the Catalog app, then on Catalogs, add a user to a
catalog, and try to access it via the button.
It comes from the fact that the parameter sent to the party manager via the
link doesn't have the right syntax.
Thanks: Gaetan Chaboussie
This prevented to run the stable demo, hence the next, weirdly the trunk had
not this problem. Anyway better safe than sorry... Maybe related to Gradle
version or rather libs loaded?
The reason why the stable (and old) demos were not running is because the
EntitySaxReaderTests did not pass
Step
Login to the Catalog application and search for any product. Navigate to Costs tab.
eg:
https://demo-trunk.ofbiz.apache.org/catalog/control/EditProductCosts?productId=PROD_MANUF
Scroll down to Auto-Calculate Costs section.
Select currency say EURO and submit button.
Expected
A new record under the Costs tab.
Actual
Error with no new records.
Thanks: Nameet Jain
Currently, session timeout is configured in apps separately, but session is
shared globally, so the smallest one take effects, and it will not take effect
separately for different apps.
Then it is both inconvenient and confusing to increase session timeout value,
as all values in those files need to be updated.
A global web.xml is needed, to simplify session timeout configuration.
Thanks: Xin Wang