Commit Graph
27737 Commits
Author SHA1 Message Date
Jacques Le Roux a8c5c84cec Fixed: CLONE - Use only HTTPS in OFBiz
(OFBIZ-11643)

When doing OFBIZ-6849 I forgot to take care of the https attribute of the
security element used in controllers.

It's not used anymore since we used HTTPS everywhere but in request listed in
http.request-map.list property of url.properties. It's even enforced by HSTS for
requests that are not listed in this property.

This removes the https attribute and removes its usage in in controllers.
2020-05-04 13:10:17 +02:00
Pawan Verma e9664e94c4 Improved: Convert updateEmailContent service from mini-lang to groovy DSL
(OFBIZ-11371)

Thanks: Devanshu Vyas for report and Anushi Gupta for the patch.
2020-05-04 15:45:33 +05:30
Pawan Verma 1b6c632992 Fixed: Creating custom Time Period does not show in party time period
(OFBIZ-10904)

Thanks, Pierre and Jacques for your contribution.
2020-05-04 15:20:05 +05:30
Suraj Khurana c3cda28099 Improved: Converted all EmplLeave related CRUD services from simple to entity-auto (#97)
(OFBIZ-11630)
Also, added comments for similar types entity-auto services and clubbed them for better visibility.
2020-05-04 14:12:59 +05:30
Jacques Le Roux 8ee86e019f Improved: Updates tasks.checkstyleMain.maxErrors (6 less) 2020-05-04 10:13:45 +02:00
Suraj Khurana cb4ca226f0 Improved: Converted all TimeEntry related CRUD services from simple to entity-auto (#99)
(OFBIZ-11624)
Also, removed unused services named unlinkInvoiceFromTimeEntry, whcih simply clears TimeEntry field, so used updateTimeEntry instead.
2020-05-04 10:42:26 +05:30
Suraj Khurana 98e95ee9e3 Improved: Converted all TechDataCalendarExcDay related CRUD services from simple to entity-auto (#96)
Improved: Converted all TechDataCalendarExcDay related CRUD services from simple to entity-auto
(OFBIZ-11622)
Also, added a permission service for MANUFACTURING related base permission.
2020-05-03 11:39:07 +05:30
Suraj Khurana 71d9040923 Improved: Converted all SalaryStep related CRUD services from simple to entity-auto (#98)
Improved: Converted all SalaryStep related CRUD services from simple to entity-auto
(OFBIZ-11631)
2020-05-03 11:26:36 +05:30
Suraj Khurana a1647a7f63 Improved: Marked addRequirementTask as deprecated and make it entity-auto service as it was simply creating record of WorkRequirementFulfillment. (#100)
Improved: Marked addRequirementTask as deprecated and make it entity-auto service as it was simply creating record of WorkRequirementFulfillment.
(OFBIZ-11634)
We have already service createWorkRequirementFulfillment available to do this job so makring it as deprecated.

Thanks Jacques for review.
2020-05-02 17:26:24 +05:30
Suraj Khurana 3615f5b842 Improved: Converted all CustRequestContent related CRUD services from simple to entity-auto (#94)
* Improved: Converted all CustRequestContent related CRUD services from simple to entity-auto
(OFBIZ-11627)

* Improved: Added seca rule for checkStatusCustRequest while invoke and updateCustRequestLastModifiedDate while commit for services related to CustRequestContent.
2020-05-02 17:00:48 +05:30
Jacques Le Roux 3f60efb343 Improved: Improve ObjectInputStream class
(OFBIZ-10837)

While working on OFBIZ-11633 I crossed an issue in R18 (not in trunk) where
objects from org.apache.commons.fileupload (namely DiskFileItem and
FileItemHeadersImpl) are not serializable.

While at it I decided to handle at the SafeObjectInputStream level
the "fileItems" case I already crossed with, OFBIZ-11534, in RequestHandler

It has an inconvenient in R18 (not in trunk) where ObjectInputStream can't
handle a null class (of course) and so return a benign exception in log (only).

I believe it's better to handle these specific cases at the lower possible
level in all supported branches.
2020-05-02 12:34:56 +02:00
Suraj Khurana f36a15b5a0 Improved: Converted all TrackingCodeOrder related CRUD services from simple to entity-auto (#92)
* Improved: Converted all TrackingCodeOrder related CRUD services from simple to entity-auto
(OFBIZ-11625)
2020-05-02 14:21:10 +05:30
Suraj Khurana edca9f22b0 Improved: Converted all CustRequestParty related CRUD services from simple to entity-auto (#95)
* Improved: Converted all CustRequestParty related CRUD services from simple to entity-auto
(OFBIZ-11621)
2020-05-02 13:47:09 +05:30
Jacques Le Roux 1efaa73ebb Fixed: PartyProfileContent.js does not work
(OFBIZ-11633)
When you upload a content from the party profile page you don't see a progress
bar. The PartyProfileContent.js is loaded but for some reason is unused or wrong

Mohammad Kathawala mentionned that it was removed with OFBIZ-9299
It was also broken with OFBIZ-11402

Thanks: Mohammad for the track
2020-05-02 09:31:54 +02:00
Suraj Khurana 0f56568bc1 Improved: Converted all TimesheetRole related CRUD services from simple to entity-auto (#90)
* Improved: Converted all TimesheetRole related CRUD services from simple to entity-auto
(OFBIZ-11617)
2020-05-02 12:58:35 +05:30
Suraj Khurana 4facbaed79 Improved: All the service level error messages for missing required field for order component (#86)
* Improved: All the service level error messages for missing required field for order component
(OFBIZ-7736)
Thanks Ratnesh Upadhyay for reporting and Ankush Upadhyay for providing the updated patch
2020-05-02 11:33:35 +05:30
Suraj Khurana 8f77e45f15 Improved: Converted all TrackingCodeOrderReturn related CRUD services from simple to entity-auto (#89)
* Improved: Converted all TrackingCodeOrderReturn related CRUD services from simple to entity-auto
(OFBIZ-11623)
2020-05-01 14:31:03 +05:30
Suraj Khurana 3c3147d745 Improved: Converted all FixedAssetMeter services from simple to entity-auto. (#82)
* Improved: Converted all FixedAssetMeter services from simple to entity-auto.
* Improved: Added seca rule for creating maints from meter reading, earlier it was called inline while creating or updating FixedAssetMeter record.

(OFBIZ-11611)
2020-05-01 14:15:49 +05:30
Suraj Khurana 4f90498f5d Improved: Converted all TrackingCodeType entities from simple to entity-auto (#87)
* Improved: Converted all TrackingCodeType entities from simple to entity-auto
(OFBIZ-11615)
2020-05-01 10:44:32 +05:30
Suraj Khurana a92136c662 Improved: Added missing attribute default-entity-name for ShipmentReceiptRole entity auto services.
(OFBIZ-11614)
Thanks Pawan for reporting.
2020-05-01 10:21:18 +05:30
Pawan Verma ffe9c46cf0 Improved: Used utility provided by OFBizTestCase class for userLogin instead of fetching from DB test cases also removed unused fetching of userLogin in some cases
(OFBIZ-11618)
2020-04-30 22:00:04 +05:30
Suraj Khurana e1a16aa9fe Improved: Converted all ShipmentReceiptRole service from crud to entity-auto (#85)
* Improved: Converted all ShipmentReceiptRole service from crud to entity-auto
(OFBIZ-11614)
2020-04-30 17:05:39 +05:30
Suraj Khurana f637e3c5fe Improved: Converted all EntitySyncInclude services from simple to entity-auto (#84)
* Improved: Converted all EntitySyncInclude services from simple to entity-auto
(OFBIZ-11613)
2020-04-30 13:14:26 +05:30
Suraj Khurana f527bf4dc0 Improved: Converted cancelFixedAssetStdCost service from simple to entity-auto. (#80)
* Improved: Converted cancelFixedAssetStdCost service from simple to entity-auto.
(OFBIZ-11612)
2020-04-29 18:47:34 +05:30
Suraj Khurana 0269e7b05f Improved: Sales Invoice creation should be limited for customer parties only.
(OFBIZ-11023)
Thanks Pierre Smits for reporting and Rohit Hukkeri for the patch
2020-04-29 17:05:04 +05:30
Pawan Verma b613256823 Improved: Use userLogin available in context instead of fetching from DB in Groovy test cases
(OFBIZ-11618)

Thanks: Jacques for the review.
2020-04-29 16:26:58 +05:30
Suraj Khurana faf0699e0d Improved: Updated hard coded values of location types and used all available location enums instead.
(OFBIZ-6042)
Thanks Pierre for reporting and Jacques Le Roux for review.
2020-04-29 15:57:48 +05:30
Pawan Verma 1b3d3bdf4e Improved: Added support for EntityQuery methods in OFBiz integration tests.
(OFBIZ-11247)

Thanks: Jacques for the review.
2020-04-29 15:28:42 +05:30
Pawan Verma 0f777b7de2 Fixed: The producttests test suite is brooken
(OFBIZ-11620)

Corrected Class name and ProductAssoc entity name.

Thanks: Jacques for the partial fix.
2020-04-29 14:53:26 +05:30
Jacques Le Roux 649614507b Fixed: The producttests test suite is brooken
(OFBIZ-11620)

It was initially broken by OFBIZ-9905 so only trunk was concerned.
The fix is simple: there should be no space at the beginning of the file.

But then, when running the test suite, other issues raise.
I guess they  were hidden because of the initial issue.

OFBIZ-10231 introduced 2 issues
A syntax error:
product.removeRelated("ProductKeyword", product)
instead of
product.removeRelated("ProductKeyword")

A wrong usage of storeByCondition

This fixes the 3 issues, to test:
gradlew "ofbiz --test component=product --test suitename=producttests"

Thanks: Pawan for initial report
2020-04-29 10:02:07 +02:00
Jacques Le Roux 61e5435b30 Fixed: "entity/list" request is not handled well
(OFBIZ-11593)

The "entity/list" request has been put in with OFBIZ-11007. It's used to call
the entitymaint view and so is a demo/didactic duplicate of entitymaint request.
It's only used in FindGeneric screen (look for WebtoolsBackToEntityList label).
It's problematic because since the CSRF token defense was put in you can no
longer filter the entities from the entities list screen, even when the default
NoCsrfDefenseStrategy is used. It works if you use the entitymaint request
instead.

2020-01-19 I proposed in OFBIZ-11306 a solution for such cases.
It was not used because 2020-02-14 I thought it was no longer needed.
It was necessary for this case and implemented with commit e487122.

But as, Rohit Koushal reported, it breaks some functionalities like adding
address/update address during Quick Finalize Order. The issue can also be
reproduced in ecommerce when trying the same while checking out, or quick
checking out, an order.

More generally the error is of this kind:
|27.0.0.1-8009-exec-3 |ControlServlet                |E| Error in request handler:
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
  at java.util.LinkedList.checkElementIndex(LinkedList.java:555) ~[?:1.8.0_252]
  at java.util.LinkedList.get(LinkedList.java:476) ~[?:1.8.0_252]
  at org.apache.ofbiz.webapp.control.RequestHandler.getRequestUri(RequestHandler.java:837) ~[main/:?]

and happens with URLs like
updateCheckoutOptions/editcontactmech?DONE_PAGE=checkoutoptions&contactMechId=9015
or
updateCheckoutOptions/editcontactmech?preContactMechTypeId=POSTAL_ADDRESS&
contactMechPurposeTypeId=SHIPPING_LOCATION&DONE_PAGE=checkoutoptions

So I decided to revert the concerned part of commit e487122 and to rather use
entitymaint instead of "entity/list" request.
2020-04-29 08:29:33 +02:00
Pawan Verma f00467282f Removed: Duplicate getRelatedParties service definition. It was left during the service conversion from XML to Groovy
(OFBIZ-11361)

Thanks: Rohit Kaushal for the report.
2020-04-28 14:56:59 +05:30
Pawan Verma f195e68c3c Removed: Unwanted character mistakely added during All the service level error messages for missing required field for party component. 2020-04-28 13:18:35 +05:30
Pawan Verma 1e05f0c72d Incorrect column alias in EntitySQLProcessor for sql query working with mysql
(OFBIZ-11573)

More details: Method getColumnLabel returns the designated column's suggested title for use in printouts and displays. Method getColumnName returns the designated column's name.

Thanks: Suraj and Jacques for the review.
2020-04-28 10:54:57 +05:30
Pawan Verma 63f0a84ae2 Fixed: Create Exchange Order button on Return screen is distorted
(OFBIZ-11144)

Thanks: Devanshu for the report, Suraj and Jacques for the review.
2020-04-28 10:11:41 +05:30
Jacques Le Roux ec23f8b61f Fixed: Compound-widget not works with condition
(OFBIZ-11606)

Fixes "<**:condition" not well managed and generating an error

Changes all the getNodeName() by getLocalName() in the ModelX****Condition.java

Thanks: Olivier
2020-04-27 17:43:38 +02:00
Suraj Khurana a9160ed874 Improved: Convert FixedAssetTests from XML to Groovy. (#78)
(OFBIZ-11546)(OFBIZ-11547)(OFBIZ-11548)(OFBIZ-11549)(OFBIZ-11550)(OFBIZ-11551)(OFBIZ-11552)
Thanks: Rohit for reporting.
2020-04-27 18:43:05 +05:30
Jacques Le Roux d7c42e3b8c Fixed: Compound-widget not works with condition
(OFBIZ-11606)

rootElement is not correct for a compound file, it's necessary to do a
UtilXml.firstChildElement(rootElement, "forms"); to be correct.
It's done for screen, form but not for grid !

So correction is now added the correct read of rootElement.

Thanks: Olivier
2020-04-27 14:31:31 +02:00
Jacques Le Roux e8e9db5b1a Improved: Prevent recurring errors block due to generateTokenForNonAjax
(OFBIZ-11609)

Fixes check style. I removed a space after a cast. That's how I wrote it so
far and that was wrong. BTW I did not invent it, our code is riddled of it:/

https://www.oracle.com/technetwork/java/javase/documentation/codeconventions-141388.html
2020-04-27 14:29:14 +02:00
Suraj Khurana 47e5a1ad5e Improved: Convert FixedAssetTests from XML to Groovy. (OFBIZ-11546)(OFBIZ-11547)(OFBIZ-11548)(OFBIZ-11549)(OFBIZ-11550)(OFBIZ-11551)(OFBIZ-11552) Thanks: Rohit for reporting. 2020-04-27 12:44:42 +02:00
Jacques Le Roux faf2827e67 Improved: Prevent recurring errors block due to generateTokenForNonAjax
(OFBIZ-11609)

Fixes the if(test): toString() is not the same than getCanonicalName()

Also while at it, in case of exception, uses NoCsrfDefenseStrategy as default
2020-04-27 12:36:17 +02:00
Suraj Khurana 13ea2ba726 Improved: View entity definition for MarketingCampaignAndVisit and made relational optional as false.
(OFBIZ-9909)

This will generate the report with positive visits only in both the cases (with/without date filter) while running marketing campaign reports.

Thanks Rubia for reporting and Ankit Joshi for providing the patch.
2020-04-26 20:10:08 +05:30
Suraj Khurana 6ededaed63 Merge branch 'trunk' of https://gitbox.apache.org/repos/asf/ofbiz-framework into trunk 2020-04-26 19:50:08 +05:30
Suraj Khurana 9dda9fec3f Improved: Converted testUpdateFixedAssetMeter test from XML to Groovy.
(OFBIZ-11550)
Thanks Rohit Hukkeri for reporting and Aishwary Shrivastava for providing the patch.
2020-04-26 19:49:49 +05:30
Jacques Le Roux cdb40c3d31 Improved: Prevent recurring errors block due to generateTokenForNonAjax
(OFBIZ-11609)

Fixes check style issues
2020-04-26 14:21:59 +02:00
Jacques Le Roux 1ff79ec566 Improved: Prevent recurring errors block due to generateTokenForNonAjax
(OFBIZ-)

After the VM demos crash yesterday, I had a look at the log of trunk demo and
found a lot of recurring errors block due to CsrfUtil::generateTokenForNonAjax.

It's not a big deal but it's annoying to have such useless errors cluttering the
logs
2020-04-26 12:38:05 +02:00
Jacques Le Roux 5428a73399 Improved: Increase the size of http.upload.max.sizethreshold
(OFBIZ-11598)

The http.upload.max.sizethreshold size is curently sets to 10240 (10KB) and that
seems small nowadays to me. We could use 1MB.

Also moves mail.spam.name in its mail block

Thanks: Pawan for review
2020-04-26 10:13:09 +02:00
ravilodhiandRavi Lodhi ae70318fc8 Improved: Added support to consider non-default transaction timeout for Groovy and Simple event handlers.(OFBIZ-11607) (#77)
* Improved: Added support to consider non-default transaction timeout for Groovy and Simple event handlers.(OFBIZ-11607)

* Revert "Improved: Added support to consider non-default transaction timeout for Groovy and Simple event handlers.(OFBIZ-11607)"

This reverts commit 934eaa4539.

* Improved: Added support to consider non-default transaction timeout for Groovy and Simple event handlers.(OFBIZ-11607)

Co-authored-by: Ravi Lodhi <lodhiravi1@gmail.com>
2020-04-26 09:17:30 +02:00
Pawan Verma db2c301c7e Improved: Proper User friendly message should visible at Create Inventory Transfer screen
(OFBIZ-10366)

Thanks: Ritesh Kumar for your contribution and Pierre Smits for the review.
2020-04-25 23:04:04 +05:30
Suraj Khurana d21bb752f0 Improved: All the service level error messages for missing required field for party component.
(OFBIZ-7735)
Thanks Ratnesh Upadhyay for reporting and Kirti Arora for providing the updated patch.
2020-04-25 18:50:22 +05:30