Instead of a quiet S/R action, this was an unexpected pain in the ass. A considerable number of forms:
EmployeeForms.xml
EmploymentForms.xml
EmplPositionForms.xml
GlobalHRSettingForms.xml
RecruitmentForms.xml
QuoteForms.xml
PartyForms.xml
StoreForms.xml
ContactForms.xml
FixedAssetForms.xml
TaskForms.xml
scrumForms.xml
TaskForms.xml
contained a large number of fields with
tooltip="${uiLabelMap.CommonRequired}"
but no
required-field="true"
Of course display and display-entity should not be concerned, I spotted a number of them in the lot.
I also removed a bunch of harcoded * at end of labels (those followed by required-field="true"* and spotted a number of others }*" who still need to be carefully reviewed to see if required=true is not missing there :/
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1709882 13f79535-47bb-0310-9956-ffa450edef68
jleroux: after a cursory review, I simply did the chunk related to exampleName by hand, it needed more work. I also removed some trailing blanks.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1709872 13f79535-47bb-0310-9956-ffa450edef68
This adds the migrateSalaryStep service to migrates data from OldSalaryStep to SalaryStep.
Since revision 1709214 (2015-10-18) the entity SalaryStep has been deprecated.
This service can be used to upgrade existing data from the OldSalaryStep entity to the new SalaryStep entity.
This service must be run only once, else you will get duplicates.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1709272 13f79535-47bb-0310-9956-ffa450edef68
The dateModified field was not modified (not even before auto-engine was used). I found that while changing updateSalaryStep from auto-engine to simple for lastModifiedByUserLogin and setting the createdByUserLogin field in createalaryStep services. It's now fixed
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1709271 13f79535-47bb-0310-9956-ffa450edef68
This commit upgrades the framework to Java JDK 8 and prevents compiling
on earlier versions. Hence the build system should be updated to compile on
Java 8. After this point users can commit code holding Java 8 features such
as streams and lambdas
REFS OFBIZ-6458
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1709262 13f79535-47bb-0310-9956-ffa450edef68
I'm certainly tired so I did not find a smart way to use entity-auto in createSalaryStep service and also create several salary steps different on the from date, at least using the older simple service works.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1709238 13f79535-47bb-0310-9956-ffa450edef68
I also decided that the "Salary StepSeq Id" Lookup needed not only a search on the fromDate but also to display the through date and the amount.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1709231 13f79535-47bb-0310-9956-ffa450edef68
I decided other changes (adding a fromDate), notably in "Position Type Rate" and "Lookup Salary StepSeq Id" were not necessary
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1709214 13f79535-47bb-0310-9956-ffa450edef68
I applied the patch I created for the Jira and added
<parameter param-name="fromDate"/>
in ListSalarySteps form, to be able to delete a salary step from the screen
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1709192 13f79535-47bb-0310-9956-ffa450edef68
I changed ViewEntityCondition.getWhereCondition(), ViewConditionExpr.createCondition() and ViewConditionList.createCondition() which will add additional condition of filtering by date to where clause.
Please test by following steps.
1. Change the code below in GenericDAO
if (queryTotalTime > 150) {
Debug.logTiming("Ran query in " + queryTotalTime + " milli-seconds: " + " EntityName: " + modelEntity.getEntityName() + " Sql: " + sql + " where clause:" + whereEntityConditionParams, module);
}
to
{code:title=GenericDAO.java|borderStyle=solid}
if (queryTotalTime > 0) {
Debug.logTiming("Ran query in " + queryTotalTime + " milli-seconds: " + " EntityName: " + modelEntity.getEntityName() + " Sql: " + sql + " where clause:" + whereEntityConditionParams, module);
}
It will always log the sql to the log file.
2. Open https://localhost:8443/partymgr/control/ImportExport
2. Enter a valid partyId for export and click SUBMIT
3. Check ofbiz.log file under runtime folder. You should able to see the query below which contains filter data condition
SELECT
PRT.PARTY_ID,
PRT.STATUS_ID,
PRT.PREFERRED_CURRENCY_UOM_ID,
GRP.GROUP_NAME,
PER.FIRST_NAME,
PER.MIDDLE_NAME,
PER.LAST_NAME,
PR.PARTY_ID_FROM,
CGRP.GROUP_NAME,
PRL.ROLE_TYPE_ID,
CM.CONTACT_MECH_TYPE_ID,
PCP.CONTACT_MECH_PURPOSE_TYPE_ID,
CM.INFO_STRING,
TN.COUNTRY_CODE,
TN.AREA_CODE,
TN.CONTACT_NUMBER,
PA.ADDRESS1,
PA.ADDRESS2,
PA.CITY,
PA.STATE_PROVINCE_GEO_ID,
PA.POSTAL_CODE,
PA.COUNTRY_GEO_ID,
PCM.FROM_DATE,
PCM.THRU_DATE
FROM (((((((((public.PARTY PRT
LEFT OUTER JOIN public.PARTY_GROUP GRP
ON PRT.PARTY_ID = GRP.PARTY_ID)
LEFT OUTER JOIN public.PERSON PER
ON PRT.PARTY_ID = PER.PARTY_ID)
LEFT OUTER JOIN public.PARTY_RELATIONSHIP PR
ON PRT.PARTY_ID = PR.PARTY_ID_TO
AND ((PR.ROLE_TYPE_ID_FROM = 'ACCOUNT'
AND PR.PARTY_RELATIONSHIP_TYPE_ID = 'EMPLOYMENT')))
LEFT OUTER JOIN public.PARTY_GROUP CGRP
ON PR.PARTY_ID_FROM = CGRP.PARTY_ID)
LEFT OUTER JOIN public.PARTY_ROLE PRL
ON PRT.PARTY_ID = PRL.PARTY_ID)
LEFT OUTER JOIN public.PARTY_CONTACT_MECH PCM
ON PRT.PARTY_ID = PCM.PARTY_ID
AND (((PCM.THRU_DATE IS NULL
OR PCM.THRU_DATE > '2015-06-15 13:21:30.157')
AND (PCM.FROM_DATE IS NULL
OR PCM.FROM_DATE <= '2015-06-15 13:21:30.157'))))
LEFT OUTER JOIN public.POSTAL_ADDRESS PA
ON PCM.CONTACT_MECH_ID = PA.CONTACT_MECH_ID)
LEFT OUTER JOIN public.CONTACT_MECH CM
ON PCM.CONTACT_MECH_ID = CM.CONTACT_MECH_ID)
LEFT OUTER JOIN public.TELECOM_NUMBER TN
ON PCM.CONTACT_MECH_ID = TN.CONTACT_MECH_ID)
LEFT OUTER JOIN public.PARTY_CONTACT_MECH_PURPOSE PCP
ON PCM.CONTACT_MECH_ID = PCP.CONTACT_MECH_ID
AND (((PCM.THRU_DATE IS NULL
OR PCM.THRU_DATE > '2015-06-15 13:21:30.157')
AND (PCM.FROM_DATE IS NULL
OR PCM.FROM_DATE <= '2015-06-15 13:21:30.157')))
AND PCM.PARTY_ID = PCP.PARTY_ID
AND (((PCM.THRU_DATE IS NULL
OR PCM.THRU_DATE > '2015-06-15 13:21:30.236')
AND (PCM.FROM_DATE IS NULL
OR PCM.FROM_DATE <= '2015-06-15 13:21:30.236')))
WHERE (((PRL.ROLE_TYPE_ID = ?
OR PRL.ROLE_TYPE_ID = ?
OR PRL.ROLE_TYPE_ID = ?)
AND (PRT.STATUS_ID <> ?
OR PRT.STATUS_ID IS NULL)
AND PRT.PARTY_ID = ?))
ORDER BY PRT.PARTY_ID ASC
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1708341 13f79535-47bb-0310-9956-ffa450edef68
I missed this hidden ProductConfigItemContentWrapper class while working on r1705329 and sequels. I checked there are no other *ContentWrapper classes left now.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1707857 13f79535-47bb-0310-9956-ffa450edef68
Fix getWorkEffortEventsByPeriod service by :
- ignoring actual date timed workeffort in temporal expression process
- excluding workeffort occurence that are out of estimated date range
Thanks Adrian for testing and feedback
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1707791 13f79535-47bb-0310-9956-ffa450edef68
When adding a PartyRelationship the value selected for SecurityGroupId is ignored as createPartyRelationship service expects the parameter to be named securityGroupId. The AddOtherPartyRelationship form incorrectly names the field groupId causing the value to be missed in the set-nonpk-fields call in applications/party/script/org/ofbiz/party/party/PartyServices.xml.
Thanks Forrest Rae for spotting this and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1706694 13f79535-47bb-0310-9956-ffa450edef68
categoryContentWrapper.DESCRIPTION;
before committing r1705405. This fixes them
Thanks also for Deepak's report about it, it was obvious when you loaded the ecommerce apps
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1705412 13f79535-47bb-0310-9956-ffa450edef68
Note that in supported releases it's hard to exploit, it's a Stored XSS https://www.owasp.org/index.php/Types_of_Cross-Site_Scripting which means you need 1st to somehow inject exploiting code in the DB.
This fixes it by changing the ContentWrapper interface
from
public interface ContentWrapper {
public StringUtil.StringWrapper get(String contentTypeId);
}
to
public interface ContentWrapper {
public StringUtil.StringWrapper get(String contentTypeId, String encoderType) {
}
And changing the Category, Party, Product, ProductPromo and WorkEffort ContentWrapperS accordingly. This means to use 2 types of encoderTypes: "html" and "url".
The "html" encoderType will be used for all ProductContentTypes but those who contain URL in their ContentTypeIdS (actually end with, "_URL") which will use "url" encoderType.
It concerns not only the get() method but also methods like getPartyContentAsText(), getProductContentAsText(), etc.
It seems a big change but it's straightforward. It's normally complete.
There are some (unrelated) tabs replaced by spaces here and there, and few trailing spaces removed but nothing big
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1705329 13f79535-47bb-0310-9956-ffa450edef68
In all releases the code in ProductSummary.groovy tries to collect prices for variants. Doing so it use NumberFormat.format() to transform base price into string that is part of an embed JS snippet. In case purchase order this price is rather empty. Using null with formatting method cause error. You may see this error in the trunk if you starts PO and and try Browser Categories->Widgets->Small Widgets. This price should appear if you select Select Units of Measure for WG-1111 but currently this does not work.
I'm not sure these prices make sense for purchase orders but my goal was just fix ugly error message. Solution display N/A if price is not available.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1705004 13f79535-47bb-0310-9956-ffa450edef68
Removes unused methods (not in Java code, FTL templates and Groovy scripts) in GenericValue and EntityUtil classes + misc related comments or logs
Adds log warning to spot possible use cases in templates and scripts of getRelated() and getRelatedOne() methods
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1704769 13f79535-47bb-0310-9956-ffa450edef68
When an order is entered via the ecommerce component for a GZ-1006-5 an error is shown in the order items section
jleroux: actually, as Vyom Jain suggested "This is happening due to changes OFBIZ-6276. Either r1704108 should be reverted or additional patches be provided to avoid this reported issue (which is only one of them). Removing deprecated delegator methods require thorough testing as many as used in scripts and templates." I checked there was only 3 such changes for findByAnd and no others but getRelated where called in *.ftl and *.groovy. This completes the findByAnd case I will create a new Jira for the rest (did not check already, 238 cases!)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1704478 13f79535-47bb-0310-9956-ffa450edef68
jleroux: I did the same in order controller (was only in ecommerce) even if only a commented out example was used there
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1704227 13f79535-47bb-0310-9956-ffa450edef68
Displays the relationship table with alternate colors for better visibility and uses the screenlet pagination controls at top/bottom of the list.
Thanks Christian Carlow for this improvement.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1704036 13f79535-47bb-0310-9956-ffa450edef68
Introduces the setLocale methode for ShoppingCartItem and sets the locale for every item if the ShoppingCart setLocale method is called.
Thanks Martin Becker for spotting this and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1704018 13f79535-47bb-0310-9956-ffa450edef68
This patch replaces the HashSet with LinkedHashSet for fieldsToSelect because otherwise statusId was being added to the front of the set which was then passed to count distinct query causing incorrect counts. LinkedHashSet preserves the order in which items are added so orderId always appears at the front of the set for the count distinct query.
Thanks Christian Carlow for spotting this and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1704005 13f79535-47bb-0310-9956-ffa450edef68
This removes duplicate code, fixes a methode name typo and adds type safety to an iterator.
Thanks Martin Becker for spotting this and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1703977 13f79535-47bb-0310-9956-ffa450edef68