Commit Graph
3880 Commits
Author SHA1 Message Date
Sebastian Berg bcb76eb607 Improved: Convert ImageManagementServices.xml minilang to groovy (OFBIZ-11604) 2021-02-26 18:53:22 +01:00
Jacques Le Roux d5c336ed3a Fixed: Error on quick ship complete order (OFBIZ-12185)
When we try to quick ship entire order from the Order Manager, the following
error is thrown (in some cases, specifically when we have added a telecom number
for the customer

This was broken by OFBIZ-11462

Thanks: Priya Sharma
2021-02-21 14:14:38 +01:00
SebastianEcomify 8a96462538 Improved: Convert CostService.xml minilang to groovy
(OFBIZ-11595)

Thanks: Sebastian Berg for implementation
2021-02-21 11:38:21 +00:00
Michael Brohl 69c62f5f00 Merge changes for PR #267 due to conflicting changes in trunk (OFBIZ-12169) 2021-02-15 17:15:18 +01:00
Jacques Le Roux a2dac5482c Improved: Default ordering of webapps titles in main menu (OFBIZ-12166)
[...] having more important apps in 1st places would be better [...]
the feature should be easily changed by custom projects [...]
documentation for that would be enough.

This 1st step sorts the applications and webtools. I believe webtools should not
be secondary but that needs to be discussed with other options.
2021-02-14 21:11:58 +01:00
Michael Brohl 662a3f9d1c Improved: Remove Compdoc functionality from content manager
(OFBIZ-10476)
2021-02-13 17:33:05 +01:00
Michael Brohl 29bf0a040a Merge branch 'trunk' into OFBIZ-12169_Handle_remaining_checkstyle_errors 2021-02-13 11:26:01 +01:00
Jacques Le Roux a608fa4b56 Improved: puts dates in migration services to be able to remove them later 2021-02-10 11:02:59 +01:00
Wiebke Pätzold 384572401d Improved: Fixed indentation level (OFBIZ-12169) 2021-02-09 14:12:15 +01:00
Wiebke Pätzold 95d37d2189 Removes and adds whitespaces as suggested by checkstyle (OFBIZ-12169) 2021-02-09 08:46:20 +01:00
Wiebke Pätzold 2fe5e15a83 Improved: Adds newline at the end of file (OFBIZ-12169) 2021-02-08 16:31:13 +01:00
Sebastian Berg 10f1f5a546 Improved: Update German UiLabel in relation with entity QuantityBreak (OFBIZ-12146)
changed german translations from using "Sprung" to "Staffelung"
2021-01-25 18:08:07 +01:00
Nicolas Malin 7165768251 Implemented: Add a framework method to get main webapp menu with the webapp name
(OFBIZ-10601)

To improve theme management and provide better tools for new themes, we implement a method to obtain the main menu of a webapp.
Instead of just managing a menu, we extend the functionality by offering a method to expose a summary of the webapp, to simplify the navigation.

For this we add a new attribute on webapp definition app-shortcut-screen :

    <webapp name="mywebapp"
            ...
            app-shortcut-screen="component://mycomponent/widget/CommonScreens.xml#ShortcutApp"
            ...
    />

The idea is to define a new purpose screen *Shortcut* that contains what defines a webapp when an action or navigation has been requested. With this screen you can load a menu, a search, a complex description and use all screen powerfulness to resolve what displaying and support by theming

    <screen name="ShortcutApp">
        <section>
            <actions>
                <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
            </actions>
            <widgets>
                <decorator-screen name="ShortcutDecorator" location="component://common/widget/CommonScreens.xml">
                    <decorator-section name="body">
                        <include-menu name="MyShortcutAppBar" location="component://mycomponent/widget/CommonMenus.xml"/>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>

Each component are self-sufficient to define what shortcuts to display without framework change or knowledge about other component.
Each theme can implement and customize the display rendering at will.

To illustrate an example of implementation we set sub menu for each webapp defined on applications and exploit it on bluelight theme.

Thanks for Dennis Balkir, Jacques Leroux, Leila Mekika and Julien Nicolas for their involvement
2021-01-15 08:56:23 +01:00
Jacques Le Roux 0fc14af687 Improved: Remove hardcoded product category on CategoryWorker.getCatalogTopCategory (OFBIZ-12078)
When you call the java function
org.apache.ofbiz.product.category.CategoryWorker.getCatalogTopCategory()
the catalog returned if the system failed found it is hardcoded and don't use an
existing property : catalog->top.category.default

Thanks: Nicolas
2020-12-25 17:02:52 +01:00
Jacques Le Roux 6110ced974 Fixed: Unique form names for promo actions (OFBIZ-12082)
Creating a promo with multiple rules and actions results in an exception.

It's reproducible by creating a promo with 1 rule and more than 1 Action and
specifying different products for each Action. When creating the second Action
and trying to specify another product to included the ajax request LookupProduct
will fail because it included both product ids in its xhr request.

Thanks: Danny Trunk
2020-12-25 16:17:35 +01:00
Jacques Le Roux 3cdd1fcec7 Fixed: Issue in creating promotion action (OFBIZ-11168)
The issue reported there was fixed with OFBIZ-11058.

But there was still an issue in logI reported in a comment.

The problem was that
<#assign productPromoActionCurEnum = productPromoAction.getRelatedOne("ActionEnumeration", true)>
was used in 2 places where it should not have been because it returned a null
value that can't be handled by OFBiz.

Better use
<#assign productPromoActionCustomMethod = productPromoAction.getRelatedOne("CustomMethod", true)>
and
productPromoAction.getRelatedOne("ActionEnumeration", true))??

The repercussion was that the description was not used but the Id and the log
was showing an error.
2020-12-25 16:09:43 +01:00
Jacques Le Roux a0d8eb86a0 Fixed: Update build.gradle to the latest dependencies (OFBIZ-12092)
Forget about upgrading org.jdom to v2 we need only JDOMException and it works
as is. So this reverts to  org.jdom to v1. We still need the updated entry in
build.gradle

This fixes integration tests with framework only
2020-12-20 13:52:28 +01:00
Jacques Le Roux 72d3dd18ac Fixed: Make ruleName field in PriceForms.xml#AddPriceRules safe (OFBIZ-12098)
I noticed an issue due to entity-auto. Unlike with a standard service you can't
protect fields using allow-html="safe" except by overriding fields. So in case
this must be done one by one...

An example is ruleName field in PriceForms.xml#AddPriceRules with
createProductPriceRule and updateProductPriceRule services

This fixes this only case...
Also removes trailing blanks and only that (by IDE setting)
2020-12-20 11:13:39 +01:00
Jacques Le Roux 3355c64f4c Fixed: Update build.gradle to the latest dependencies (OFBIZ-12092)
After last changes jdom is missing when using framework only, certainly due to a
3rd party lib change that included it.

This fixes the issue, by not only adding last jdom lib ('org.jdom:jdom:2.0.2')
in build.gradle but also changing the import where used: they changed to jdom2!
2020-12-19 14:54:04 +01:00
Jacques Le Roux ec2b84341e Reverted: "Improved: Hyperlink target-type attribute is deprecated and should be replaced by url-mode (OFBIZ-12091)"
This reverts commit 17eb2e4cf7.

It does not work when using <<target="javascript:........>>
I could change those cases but it's easier and safer to simply revert back to
target-type!

Thanks: James for report
2020-12-18 11:08:32 +01:00
Jacques Le Roux 17eb2e4cf7 Improved: Hyperlink target-type attribute is deprecated and should be replaced by url-mode (OFBIZ-12091)
Same for sub-hyperlink
2020-12-11 16:52:04 +01:00
Jacques Le Roux 5fa312cfb9 Fixed: Secure the uploads (OFBIZ-12080)
Improves the labels names and format comment in LayoutEvents.java

I backport to ease later works...
2020-12-06 11:16:44 +01:00
Jacques Le Roux e73616caf1 Fixed: Secure the uploads (OFBIZ-12080)
2020/08/10 the OFBiz security team received a security report by Harshit Shukla
<harshit.shukz@gmail.com>, roughly it was (quoting part of it to simplify):

<<I have identified a Remote Code Execution (RCE) Vulnerability. The reason
behind this RCE is lack of file extension check at
catalog/control/UploadCategoryImage?productCategoryId=CATALOG1_BEST_SELL&pload_file_type=category>>

Using this post-auth RCE in OFBiz demos, Harshit was able to get some AWS
credentials by uploading a webshell (based on [0]).
By security, it was then decided by the Infra and OFBiz security teams to shut
down the demos.

After discussing the elements reported with Mark J Cox (VP of ASF security team)
we in common decided that no CVE was necessary.
2020-12-01 10:16:04 +01:00
Jacques Le Roux 5d6e9dc9d1 Fixed: Edit button(s) are shown for shipments received or shipped (OFBIZ-11788)
When a shipment has been received (purchase) or shipped (sales), the shipment
process should be concluded. And thus the shipment should not be editable anymore.

Thanks: Pierre Smits for report, Ankit Joshi for patch
2020-11-29 20:45:01 +01:00
Jacques Le Roux 19ef23a3e2 Reverted: Replace java.io.File::renameTo by java.nio.file.Files::move (OFBIZ-12063)
This reverts commit 1be480b68c.

Actually the problem was due to another WIP where 2 streams were not closed
2020-11-27 11:52:54 +01:00
Jacques Le Roux f81bd88525 Reverted: Replace java.io.File::renameTo by java.nio.file.Files::move (OFBIZ-12063)
This reverts commit 2c86f9a8c0.

Actually the problem was due to another WIP where 2 streams were not closed
2020-11-27 11:50:27 +01:00
Jacques Le Roux 2c86f9a8c0 Fixed: Replace java.io.File::renameTo by java.nio.file.Files::move (OFBIZ-12063)
On Windows in EditProductContent.groovy neither file.renameTo(), Files.move()
nor FileUtils.moveFile works. Copy and delete works.
2020-11-27 10:20:57 +01:00
Jacques Le Roux 1be480b68c Fixed: Replace java.io.File::renameTo by java.nio.file.Files::move (OFBIZ-12063)
This is a bug because the behaviour is not assured on Windows for instance. So
it's impossible to correctly develop and test.

As explained at
https://docs.oracle.com/javase/8/docs/api/java/io/File.html#renameTo-java.io.File-

<<Many aspects of the behavior of this method are inherently platform-dependent:
The rename operation might not be able to move a file from one filesystem to
another, it might not be atomic, and it might not succeed if a file with the
destination abstract pathname already exists. The return value should always be
checked to make sure that the rename operation was successful.
Note that the Files class defines the move method to move or rename a file in a
platform independent manner.>>

So the expression
  file.renameTo(file1)
used in 5 Application Product Groovy scripts can be easily replaced by
  Path source = file.toPath()
  Files.move(source, source.resolveSibling(filenameToUse))
that is working on all platforms as explained at
https://docs.oracle.com/javase/8/docs/api/java/nio/file/Files.html#
move-java.nio.file.Path-java.nio.file.Path-java.nio.file.CopyOption...-
2020-11-24 18:39:12 +01:00
holivier c2c1eae612 Documented: migrated Wiki Glossary to glossary asciidoc files (OFBIZ-12060)
- Accounting Glossary,
  - declare it as glossary
  - re-order existing items
  - add a comment at beginning about importance of order items
  - correction for some ID: change space to _
  - add some items coming from wiki glossary
- Facility
  - add glossary directly in facility.adoc
- Human Resource Glossary
  - re-order existing items
  - add a comment at beginning about importance of order items
  - move some items to Party Glossary or global Glossary
- HR appendix: add link to wiki OFBiz related book for Data Model Reference Book
- Add Party Glossary and included it in party.adoc
  - add some items coming from wiki glossary and HR glossary
- General Glossary
  - add a comment at beginning about importance of order items
  - add some items coming from wiki glossary and HR glossary
2020-11-18 17:19:39 +01:00
holivier 98631771aa Documented: Synchronize wiki page End User Documentation (OFBIZ-12059)
- Add facility.adoc with only overview
- Correction for Content Management title
- in General glossary, add link to main components
- Complete Order management overview
- Add a short overview for Party
- Ordered applications in user-manual in alphabetic order
2020-11-16 17:00:48 +01:00
Jacques Le Roux 2fe76bead8 Improved: Misc trivial changes done while working on others issues 2020-11-11 20:43:59 +01:00
holivier 4a41f0fde5 Documented: migration to help system using asciidoc files (OFBIZ-11587)
commit correction for <Remove all related help docbook files>
* reAdd a contentDocData for main contentId and portletCategory
* remove from ofbiz-component of each application line about helpData which are removed
2020-10-27 11:20:09 +01:00
holivier 302bc0eb15 Documented: migration to help system using asciidoc files (OFBIZ-11587)
Remove all related help docbook files
2020-10-26 17:34:03 +01:00
James Yong aa8ae4b01e Improved: Move SeoConfigUtil.java from Product to Widget component (OFBIZ-12031)
Help to remove dependency of product component from widget component
An afterthought: webapp component seems better for SeoConfigUtil.java than widget component.

Thanks Jacques for review
2020-10-02 22:57:15 +08:00
holivier 9eaf180a4b Documented: migration to help system using asciidoc files
(OFBIZ-11587)

Add <set field=helpAnchor... in CommonScreens for application where it's
not present. With this commit all OFBiz application help go to the html
generated from asciidoc files
2020-09-28 15:15:04 +02:00
Jacques Le Roux f1b88bd84b Improved: Checkstyle: Variable name must match pattern (OFBIZ-11926)
Better use Debug.logVerbose in place where I replaced missing expression with
another varation of Debug.log. We mainly don't need these information, it's only
for Checkstyle.

I thought did not replace cases where using another variation makes sense
2020-09-21 10:45:03 +02:00
Nicolas Malin c0054e97ea Improved: Convert ProductStoreServices.xml file from mini-lang to groovy DSL
(OFBIZ-11449)

Thanks to Sebastian Berg for this patch
2020-09-16 09:35:32 +02:00
Jacques Le Roux 346c63bfdf Improved: Checkstyle: Variable name must match pattern (OFBIZ-11926)
We have a lot of "do nothing" in Java code. In case of catch we should at least
have Debug.logError(e, MODULE); and maybe an explanation in the comment.
2020-09-15 15:24:45 +02:00
Suraj Khurana 0af165fb08 Improved: Added missing Javadocs for remaining methods in applications component, this is required for all classes which looks like designed for extension (can be subclassed).
(OFBIZ-11947)
Thanks Jacques for review.
2020-09-13 11:29:10 +05:30
Suraj Khurana b3fcbeedba Improved: Make data members of class as private and added accessor methods for the same, also corrected occurences of the same in applications component.
(OFBIZ-11963)
Also made some related checkstyle code enhancements. Thanks Jacques for review.
2020-09-12 12:09:03 +05:30
Suraj Khurana 5f021ce06b Improved: Corrected line is longer than 150 characters checkstyle issues in applications component.
(OFBIZ-11921)
Also fixed some other extra space and naming related checkstyle issues observed.
Thanks Jacques for review.
2020-09-04 12:24:14 +05:30
Akash Jain 868c487e7f Improved: Remove ProductStoreWorker dependencies on ecommerce email screen forms (OFBIZ-9419)
Thanks, Taher Alkhateeb for report.
2020-09-01 14:53:25 +05:30
Suraj Khurana ca9fa4fba4 Improved: Corrected line is longer than 150 characters checkstyle issues in framework and applications component.
(OFBIZ-11921)
Also fixed some extra spaces and naming conventions related checkstyle issues.
Thanks Jacques for review.
2020-08-31 19:54:54 +05:30
James Yong 4a03567996 Improved: Allow logging to be disabled for getJs request (OFBIZ-11980)
Hide non-error logs related to getJs request as it doesn't provide meaningful data.

Thanks Jacques for initial review
2020-08-30 21:34:34 +08:00
Akash Jain 66a76ffd5a Improved: Fix Literals comparisons with variable to avoid NPE (OFBIZ-11929)
Thanks, Devanshu Vyas for your contribution.
2020-08-30 17:20:23 +05:30
Jacques Le Roux 2d033df446 Improved: Update information in README.md files from removed pages in wiki 2020-08-29 17:37:18 +02:00
Jacques Le Roux c8c5895707 Reverted: "Improved: Have a readme in every component (OFBIZ-6243)"
This reverts commit f281fe290a.

An Apache URL is much easier to have (NO bad idea)
2020-08-29 13:52:27 +02:00
Jacques Le Roux f281fe290a Improved: Have a readme in every component (OFBIZ-6243)
An Apache URL is much easier to have
2020-08-29 13:49:41 +02:00
Jacques Le Roux ee0968440e Improved: Have a readme in every component (OFBIZ-6243)
Not sure why we have this problem (according to
https://docs.github.com/en/github/authenticating-to-github/about-anonymized-image-urls
could be to missing cache control in our site server)

As I was fed up not viewing the OFBIz logo anywhere, and mostly in GH,
but just in browser at https://ofbiz.apache.org/images/ofbiz_logo.png
and I noticed I was viewing it well locally at
https://github.com/apache/ofbiz-framework/tree/trunk/themes/rainbowstone
so decided to use this URL everywhere rather!
2020-08-29 13:35:14 +02:00
Jacques Le Roux d15cc57bf0 Improved: Have a readme in every component (OFBIZ-6243)
This preludes the move of content of README.md files into the asciidoc
documentation

Updates the link to OFBiz-logo.png
Removes deprecated information related to Svn, Jira and Confluence
We will move the wiki pages to wiki attic with OFBIZ-11619
2020-08-29 11:52:51 +02:00