Add life span attributes (fromDate, thruDate) on entities :
1) MarketingCampaignPrice
2) MarketingCampaignPromo
3) MarketingCampaignRole
Complete related CRUD service with align service name on the best pratice for consistency.
The previous service name has been set as deprecated :
* addPromoToMarketingCampaign replace by createMarketingCampaignPromo
* removePromoFromMarketingCampaign replace by deleteMarketingCampaignPromo
* addPriceRuleToMarketingCampaign replace by createMarketingCampaignPrice
* removePriceRuleFromMarketingCampaign replace by deleteMarketingCampaignPrice
These service has been deprecated with release information Upcoming Release to align with Jira ofbiz version
Thanks to Suraj Khurana to suggest this improvement.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805961 13f79535-47bb-0310-9956-ffa450edef68
Consistency on the attribute order for make-value element as : entity-name, value-field
Thanks to Ankush Upadhyay and Devanshu Vyas for the issue and the corrective patch
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805956 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9441)
A major refactoring patch that applies the following changes:
- Fully refactor the EntityDataLoadContainer
- Fully refactor the TestRunContainer
- In both above mentioned containers the logic is broken up into smaller
methods to enhance code readability. It also changes the signature of
the method calls to rely on StartupCommand instead of String[] arrays
- Remove most old documentation and commented out code where applicable
- Delete the StratupCommandToArgsAdapter as it is no longer needed
- Create a new feature in which OFBiz by default fails if any data file
fails to load. This can be overridden by passing a flag called
"continue-on-failure" e.g. ./gradlew "ofbiz --load-data continue-on-failure"
- Add a new property to --test called "loglevel" (old code but working properly)
- Add many new properties to the --load-data command including repair-columns,
try-inserts, maintain-txs, etc ... These properties are old, but somehow
did not make it into the command line arguments. This code is now exposed
through the command line to set a direction in the future of whether to
keep or delete these extra commands
- Update the documentation output of ./gradlew "ofbiz --help" to incorporate
the new mentioned properties
- Refactor README.md to incorporate the changes to the gradle commands for both
"-load-data" and "-test" properties. Also remove the gradle GUI
documentation as it is now deprecated.
- Also refactor README.md in other locations to cleanup and make it more
consistent. This icludes moving long notes into new sections and reducing
the verbosity of the security header. Furthermore, created a new header
called Miscellaneous documentation to house the newly created sections
- lots of small changes to remove EOL white space
Thanks: Jacques Le Roux for reviewing and testing
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805947 13f79535-47bb-0310-9956-ffa450edef68
Consistency on the attribute order for view-map element as : name, type, page
Thanks to Ankush Upadhyay and Devanshu Vyas for the issue and the corrective patch
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805892 13f79535-47bb-0310-9956-ffa450edef68
Instead call a label from FlexibalStringExpander syntax $
{groovy: org.apache.ofbiz.base.UtilProperty.getMessage(myRessource, myLabel, locale)}
, this issue propose to implemented an uel function like : $
{util:label(myRessource, myLabel, locale)}
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805888 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9608)
ProductFeatureCategory CRUD services have explicitly mentioned IN/OUT parameters
in their service definition, like
<attribute name="description" type="string" mode="IN" optional="false"/>
Rather, the IN/OUT parameters for this crud services should have been written
using auto-attribute, like
<auto-attributes include="nonpk" mode="IN" optional="true"/>
Thanks: Rohit Rai
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805867 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9240)
ecomseo trunk and stable (R16)
Get to https://demo-trunk.ofbiz.apache.org/ecomseo/
or https://demo-stable.ofbiz.apache.org/ecomseo/
login => main page logged in
logout => main page, not logged in
login => main page logged in
Use the "Not you" link => 404
Refresh (F5 key) get you to the main page, not logged in
So it works almost correctly but you need a refresh (F5 key) for the "Not you"
link, not sure why yet.
It"s the same locally with OFBIZ-9206 fixed*, w/ or w/o portoffset ecommerce
trunk and stable (R16)
Get to https://ofbiz-vm2.apache.org:8443/ecommerce
or https://ofbiz-vm2.apache.org:18443/ecommerce
login => blank page (no 404 in access log)
Refresh (F5 key) get you to the main page, logged in
logout => blank page (no 404 in access log)
Refresh (F5 key) get you to the main page, not logged in
login => blank page (no 404 in access log)
Refresh (F5 key) get you to the main page, logged in
use the "Not you" link => blank page (no 404 in access log)
Refresh (F5 key) get you to the main page, not logged in
So it works almost correctly but you need a refresh (F5 key) between in the
3 cases, not sure why yet.
It's the same locally with OFBIZ-9206 fixed, w/ or w/o portoffset
Rohit:
The sequencing order of ControlFilter and ContextFilter is causing this problem.
I tried to swap the order in case ecommerce but changing the sequence will not
work because other filters(like ContentUrlFilter, CatalogUrlFilter) depends on
the context prepared by ContextFilter.
The issue is like when we are doing chaining of request using request-redirect
than one request attribute(FORWARDED_FROM_SERVLET) set to TRUE from
ControlServlet. In case of ecommerce ContextFilter run before ControlFilter
which copies all the attribute from parent request to redirect request and
when execution reaches the ControlFilter for the redirect request than request
will fail to hit the servlet due to the code present
at line 126(ControlFilter.java).
To fix this problem I removed the code which copies all the attribute from
parent request to redirect request because this thing is already taken care in
the RequestHandler.
Thanks: Rohit and Jacopo for the analysis and the fix
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805677 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-8153)
The logic written needs more use cases to be covered for groovy files, existing
findUiLabelMapInFile is not fit for groovy files.
Following patterns are currently used in groovy files:
1. uiLabelMap.xxxxx
2. uiLabelMap.get("xxxxx")
Thanks: Suraj Khurana
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805558 13f79535-47bb-0310-9956-ffa450edef68
org.apache.ofbiz.accounting.ledger.
(OFBIZ-9505)
Additionally to the provided patch I removed the static ZERO variable
and changed the assignment to BigDecimal.ZERO instead. An unused import
statement was removed also.
Thanks Kyra Pritzel-Hentley for reporting and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805464 13f79535-47bb-0310-9956-ffa450edef68
org.apache.ofbiz.accounting.finaccount
(OFBIZ-9504)
FinAccountPaymentServices.finAccountPreAuth(DispatchContext, Map)
A value is checked here to see whether it is null, but this value can't
be null because it was previously dereferenced and if it were null a
null pointer exception would have occurred at the earlier dereference.
Essentially, this code and the previous dereference disagree as to
whether this value is allowed to be null.
Either the check is redundant or the previous dereference is erroneous.
Thanks Kyra Pritzel-Hentley for reporting and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805463 13f79535-47bb-0310-9956-ffa450edef68
attachments with appropriate type along with several email fixes.
(OFBIZ-9395)
This patch fixes a number of issues combined in a patch because of the
code dependencies.
1. it enables to add BCC adress(es) to service
OrderServices.sendOrderNotificationScreens to oversteer
ProductStoreEmailSetting of BCC the same was as for CC.
2. a method UtilValidate.isEmailList(String) is added to check a
comma separated list of email addresses, used for example to check the
String passed to the new BCC field for an Order-Notification.
3. there are improvements in EmailServices.sendMailFromScreen. The
attachment type of MailAttachments is now not only .pdf but depends on
the specific file. This has not been the case before - the mime type was
always hard coded as .pdf. The same goes for the bodyPart content-type
which is now set to the passed content type or the default text/html
type. Before this was also always set to text/html.
Additionally, an attachment that has the mime-type text/plain is not
rendered with the fop-renderer anymore but with a simple text-renderer.
Therefore it is possible to send an CSV file as attachment now.
The patch also refactors some catch-Blocks in the
EmailServices.sendMailFromScreen by using multi-catch since the e
xception handling is always the same.
Thanks Martin Becker for reporting and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805459 13f79535-47bb-0310-9956-ffa450edef68
New Data Source Form
(OFBIZ-7462)
Form Validation Required Field Indicator "*" is missing on Create New Data
Source Form .
Marketing -> Data Source -> Create Data Source -> Data Source Id
Thanks: Suraj Khurana for the completing patch
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805285 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9578)
In a recent github mirror, I've found suspicious code.
Branch: master
path: framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/DatabaseUtil.java
...
1588 protected final List<String> messages = new LinkedList<String>();
...
1596 protected int updateData(Collection<String> messages) {
1597 if (messages != null && UtilValidate.isNotEmpty(this.messages)) {
1598 messages.addAll(messages);
1599 }
1600 return count;
1601 }
1602 }
In Line 1598, `messages.addAll' should be `this.messages.addAll'?
This might not be an issue but I wanted to report this just in case.
Thanks: JC (jaechang.nam@gmail.com)for report
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805143 13f79535-47bb-0310-9956-ffa450edef68
updating a form
(OFBIZ-9306)
Sometimes ago, I lost an hour because of a space at the end of a field's name in
a form. In creation it does not pass (the field lacks) but when updating the
form it passes and it's hard to find from where comes the problem.
Thanks: Michael for review and spotting a possible NPE in my 1st patch
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805141 13f79535-47bb-0310-9956-ffa450edef68
New Data Source Form
(OFBIZ-7462)
Form Validation Required Field Indicator "*" is missing on Create New Data
Source Form .
Marketing -> Data Source -> Create Data Source -> Data Source Id
Thanks: Deepak Nigam
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805107 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9577)
When you create a form with an entity or service auto fields, the three previous form field call only "super(fieldSource, modelFormField);" in their constructor or this initialise a TextField with the fieldInfo FieldInfo.TEXT.
I force the field info when the super constructor is called
This missing has been found during investigation on the issue OFBIZ-9577 to improve auto-fields-service with a file upload
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805011 13f79535-47bb-0310-9956-ffa450edef68
String with the given collection and delimiter
(OFBIZ-9397)
The added method UtilMisc.collectionToString(Collection values, String delimiter)
creates a String from the values of a collection, separated with the given
delimiter. This is done in a safe way without a "null" literal.
Thanks: Martin Becker
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804970 13f79535-47bb-0310-9956-ffa450edef68
non technical service semaphore exceptions
(OFBIZ-9400)
GenericServicejob.failed(...) logs a stacktrace on every SemaphoreWait and
SemaphoreFail exception. The patch changes this for the non-technical service
semaphore exceptions to a one liner error logging to avoid polluting the logfile
with stacktraces e.g. in a scenario where a service is scheduled in short
intervals and fails expected while the former one is still running.
jleroux: I agree the case Martin describes must be quite annoying, especially in
production!
Thanks: Martin Becker
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804962 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9571)
No functional change.
We read at http://docs.oracle.com/javase/7/docs/api/java/math/BigDecimal.html :
<<Using the integer fields in this class (such as ROUND_HALF_UP) to represent
rounding mode is largely obsolete; the enumeration values of the RoundingMode
enum, (such as RoundingMode.HALF_UP) should be used instead.>>
That's an easy global replacement. But it also needs to import the RoundingMode
class. It was 26 files so I decided to rather clean all the imports in all files
with the help of Eclipse.
This is a 1st step. I will need to closely look at 2 special class: UtilNumber
and Calculate.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804953 13f79535-47bb-0310-9956-ffa450edef68
dbWrite(...)
(OFBIZ-9401)
In ServiceSemaphore.dbWrite(...) the transaction is suspended without checking
if there is a transaction in place. This results in logging a warning each time
the TransactionUtil.suspend() method is invoked without a current transaction in
place. The given patch cuts this unnecessary logging by checking if there is an
transaction in place to suspend. If a transaction exists - suspend it.
Thanks: Martin Becker
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804940 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9529)
GiftCertificateServices.java:229, DLS_DEAD_LOCAL_STORE
GiftCertificateServices.java:306, DLS_DEAD_LOCAL_STORE
DLS: Dead store to balance in
GiftCertificateServices.addFundsToGiftCertificate(DispatchContext, Map)
This instruction assigns a value to a local variable, but the value is not read
or used in any subsequent instruction. Often, this indicates an error,
because the value computed is never used.
It was late and I was too quick yesterday night. I see no reason why we would
replace ZERO by null (no assignment) in both cases, the variables are used.
So I revert r1804847 and I rather replace occurrences of BigDecimal.ZERO by the
locally defined constant ZERO
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804859 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9529)
GiftCertificateServices.java:229, DLS_DEAD_LOCAL_STORE
GiftCertificateServices.java:306, DLS_DEAD_LOCAL_STORE
DLS: Dead store to balance in
GiftCertificateServices.addFundsToGiftCertificate(DispatchContext, Map)
This instruction assigns a value to a local variable, but the value is not read
or used in any subsequent instruction. Often, this indicates an error,
because the value computed is never used.
Thanks: Kyra Pritzel-Hentley
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804847 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9570)
The methods abortOrderProcessing and releaseInitialOrderHold have been
deprecated since the workflow engine has been replaced by the ECA.
Both methods only return _true_ and other code code that uses these methods
is deprecated as well.
https://svn.apache.org/viewvc?view=revision&revision=665981
The revision in OrderChangeHelper shows that the methods used to have a
comment which stated that the methods are no longer in use.
jleroux: forgot to send the removing of some useless code
Thanks: Kyra Pritzel-Hentley for starting the analysis and creating the Jira
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804844 13f79535-47bb-0310-9956-ffa450edef68
In the method processAuthResult() line 1889 there is an empty if-statement for
the case that authResult is null. It seems like somebody was planning to cover
the case but forgot to add code.
I would suggest to return a service error when the authResult is null since
otherwise it cannot be determined if the payment is authorized or not.
Thanks: Kyra Pritzel-Hentley
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804843 13f79535-47bb-0310-9956-ffa450edef68
It's convenient to add the plugins in Eclipse (project ofbiz which is actually
only ofbiz-framework) but then you need to ignore them in SVN ofbiz-framework,
this does it.
BTW I wonder if we should not rename ofbiz to ofbiz-framework in .project !!!
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804841 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9570)
The methods abortOrderProcessing and releaseInitialOrderHold have been
deprecated since the workflow engine has been replaced by the ECA.
Both methods only return _true_ and other code code that uses these methods
is deprecated as well.
https://svn.apache.org/viewvc?view=revision&revision=665981
The revision in OrderChangeHelper shows that the methods used to have a
comment which stated that the methods are no longer in use.
jleroux: remove the 2 methods and all useless related code
Thanks: Kyra Pritzel-Hentley for starting the analysis and creating the Jira
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804840 13f79535-47bb-0310-9956-ffa450edef68
Add a DAO helper class to use a datasource as readonly
This helper is disable by default. To enable it change the helper class on your datasource use in entityengine.xml like
<datasource name="localderby"
helper-class="org.ofbiz.entity.datasource.ReadOnlyHelperDAO"
schema-name="OFBIZ" ...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804826 13f79535-47bb-0310-9956-ffa450edef68
When you want to remove a service we add a new xml element <deprecated/> that you can put on the service definition like this
<service name="oldService" ...>
<deprecated use-instead="newService" since="theReleaseXXX">The reason to move it as deprecated</deprecated>
<implements service="newService"/>
</service>
A deprecated service generate a warning log each time it is called
When you navigate on webtools a deprecated service is strike in the service list and display deprecated reason on the service definition detail page.
Thanks to Scott, Deepak, Taher and Jacques for sharing on this subject
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804786 13f79535-47bb-0310-9956-ffa450edef68