details: https://code.openbravo.com/erp/devel/pi/rev/2fa563c7719d
changeset: 22907:2fa563c7719d
user: Guillermo Gil <guillermo.gil <at> openbravo.com>
date: Thu Apr 24 12:00:35 2014 +0200
summary: Fixed issue 25755:Grid can not be filtered by creation date
Modified offset on server filtering and modified date comparison on adptive
filtering.
diffstat:
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-minidaterange.js
| 4 ++-
modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java
| 15 ++++++----
modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
| 2 +-
3 files changed, 13 insertions(+), 8 deletions(-)
diffs (60 lines):
diff -r de359036d46b -r 2fa563c7719d
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-minidaterange.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-minidaterange.js
Thu Apr 24 11:33:41 2014 +0200
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-minidaterange.js
Thu Apr 24 12:00:35 2014 +0200
@@ -565,7 +565,9 @@
};
}
var criteria = this.rangeItem ? this.rangeItem.getCriterion() : null;
- criteria = this.makeLogicalDates(criteria);
+ if (criteria) {
+ criteria = this.makeLogicalDates(criteria);
+ }
return criteria;
},
diff -r de359036d46b -r 2fa563c7719d
modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java
---
a/modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java
Thu Apr 24 11:33:41 2014 +0200
+++
b/modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java
Thu Apr 24 12:00:35 2014 +0200
@@ -759,10 +759,6 @@
final Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
- if (hasComeADateTime || property.isDatetime() || property.isDate()) {
- // Applies the time zone offset difference of the client
- calendar.add(Calendar.MINUTE, clientUTCMinutesTimeZoneDiff);
- }
// move the date to the beginning of the day
if (isGreaterOperator(operator)) {
calendar.set(Calendar.HOUR, 0);
@@ -776,10 +772,17 @@
calendar.set(Calendar.SECOND, 59);
calendar.set(Calendar.MILLISECOND, 999);
}
- if (property.isDatetime() || property.isDate()) {
+
+ if (hasComeADateTime || property.isDatetime() || property.isDate()) {
+
+ // Applies the time zone offset difference of the client
+ // Just in case the date needs to be changed
+ calendar.add(Calendar.MINUTE, -clientUTCMinutesTimeZoneDiff);
+
// Applies the time zone offset difference of the server
- calendar.add(Calendar.MINUTE, -UTCServerMinutesTimeZoneDiff);
+ calendar.add(Calendar.MINUTE, UTCServerMinutesTimeZoneDiff);
}
+
return calendar.getTime();
} catch (Exception e) {
throw new IllegalArgumentException(e);
diff -r de359036d46b -r 2fa563c7719d
modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
---
a/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
Thu Apr 24 11:33:41 2014 +0200
+++
b/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
Thu Apr 24 12:00:35 2014 +0200
@@ -35,7 +35,7 @@
compareDates: function (date1, date2, fieldName, otherFieldName) {
var field = this.getField(fieldName),
otherField = otherFieldName ? this.getField(otherFieldName) : null;
- if ((field && (field.type === "datetime" || field.type === "_id_24" ||
field.type === "_id_16")) || (otherField && (otherField.type === "datetime" ||
otherField.type === "_id_24" || otherField.type === "_id_16"))) {
+ if ((field && (field.type === "datetime" || field.type === "_id_24")) ||
(otherField && (otherField.type === "datetime" || otherField.type ===
"_id_24"))) {
return Date.compareDates(date1, date2);
} else {
return Date.compareLogicalDates(date1, date2);
------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits