Author: apatel
Date: Sat Sep 20 10:33:20 2014
New Revision: 1626415
URL:
http://svn.apache.org/r1626415Log:
Applied bug fix from trunk r1626414.
[OFBIZ-2942] Thanks Adam Heath for reporting the issue. The patch by Deepak Dixit on Jira ticket fixes the issue. Now fromDate is also an IN parameter, if found null, then default to now timestamp.
Modified:
ofbiz/branches/release13.07/applications/party/servicedef/services.xml
ofbiz/branches/release13.07/applications/party/src/org/ofbiz/party/contact/ContactMechServices.java
Modified: ofbiz/branches/release13.07/applications/party/servicedef/services.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/party/servicedef/services.xml?rev=1626415&r1=1626414&r2=1626415&view=diff==============================================================================
--- ofbiz/branches/release13.07/applications/party/servicedef/services.xml (original)
+++ ofbiz/branches/release13.07/applications/party/servicedef/services.xml Sat Sep 20 10:33:20 2014
@@ -596,7 +596,7 @@ under the License.
<attribute name="partyId" type="String" mode="IN" optional="true"/>
<attribute name="contactMechId" type="String" mode="IN" optional="false"/>
<attribute name="contactMechPurposeTypeId" type="String" mode="IN" optional="false"/>
- <attribute name="fromDate" type="Timestamp" mode="OUT" optional="true"/>
+ <attribute name="fromDate" type="Timestamp" mode="INOUT" optional="true"/>
</service>
<service name="deletePartyContactMechPurpose" engine="java"
location="org.ofbiz.party.contact.ContactMechServices" invoke="deletePartyContactMechPurpose" auth="true">
Modified: ofbiz/branches/release13.07/applications/party/src/org/ofbiz/party/contact/ContactMechServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/party/src/org/ofbiz/party/contact/ContactMechServices.java?rev=1626415&r1=1626414&r2=1626415&view=diff==============================================================================
--- ofbiz/branches/release13.07/applications/party/src/org/ofbiz/party/contact/ContactMechServices.java (original)
+++ ofbiz/branches/release13.07/applications/party/src/org/ofbiz/party/contact/ContactMechServices.java Sat Sep 20 10:33:20 2014
@@ -806,6 +806,7 @@ public class ContactMechServices {
// required parameters
String contactMechId = (String) context.get("contactMechId");
String contactMechPurposeTypeId = (String) context.get("contactMechPurposeTypeId");
+ Timestamp fromDate = (Timestamp) context.get("fromDate");
GenericValue tempVal = null;
try {
@@ -819,7 +820,9 @@ public class ContactMechServices {
tempVal = null;
}
- Timestamp fromDate = UtilDateTime.nowTimestamp();
+ if (UtilValidate.isEmpty(fromDate)) {
+ fromDate = UtilDateTime.nowTimestamp();
+ }
if (tempVal != null) {
// exists already with valid date, show warning