{"push_id":825085205,"size":1,"distinct_size":1,"ref":"refs/heads/trunk","head":"694097141fe3f1b3918606e1895ff64be9bce50f","before":"6ba9837d0ae8dcdd7ee4a771f4ba05924fd378da","commits":[{"sha":"694097141fe3f1b3918606e1895ff64be9bce50f","author":{"email":"811c1987b169139c3599e569bb8f018ce8f2d742@apache.org","name":"Jacques Le Roux"},"message":"A patch from Wei for \"The filter-by-date=\"true\" of <entity-condition></entity> in view entity PartyExport does not work\" https://issues.apache.org/jira/browse/OFBIZ-6495\n\nI changed ViewEntityCondition.getWhereCondition(), ViewConditionExpr.createCondition() and ViewConditionList.createCondition() which will add additional condition of filtering by date to where clause.\n\nPlease test by following steps.\n\n1. Change the code below in GenericDAO\n if (queryTotalTime > 150) {\n    Debug.logTiming(\"Ran query in \" + queryTotalTime + \" milli-seconds: \" + \" EntityName: \" + modelEntity.getEntityName() + \" Sql: \" + sql + \" where clause:\" + whereEntityConditionParams, module);\n}\nto  \n{code:title=GenericDAO.java|borderStyle=solid}\n if (queryTotalTime > 0) {\n    Debug.logTiming(\"Ran query in \" + queryTotalTime + \" milli-seconds: \" + \" EntityName: \" + modelEntity.getEntityName() + \" Sql: \" + sql + \" where clause:\" + whereEntityConditionParams, module);\n}\nIt will always log the sql to the log file.\n2. Open https://localhost:8443/partymgr/control/ImportExport\n2. Enter a valid partyId for export and click SUBMIT\n3. Check ofbiz.log file under runtime folder. You should able to see the query below which contains filter data condition\nSELECT\n  PRT.PARTY_ID,\n  PRT.STATUS_ID,\n  PRT.PREFERRED_CURRENCY_UOM_ID,\n  GRP.GROUP_NAME,\n  PER.FIRST_NAME,\n  PER.MIDDLE_NAME,\n  PER.LAST_NAME,\n  PR.PARTY_ID_FROM,\n  CGRP.GROUP_NAME,\n  PRL.ROLE_TYPE_ID,\n  CM.CONTACT_MECH_TYPE_ID,\n  PCP.CONTACT_MECH_PURPOSE_TYPE_ID,\n  CM.INFO_STRING,\n  TN.COUNTRY_CODE,\n  TN.AREA_CODE,\n  TN.CONTACT_NUMBER,\n  PA.ADDRESS1,\n  PA.ADDRESS2,\n  PA.CITY,\n  PA.STATE_PROVINCE_GEO_ID,\n  PA.POSTAL_CODE,\n  PA.COUNTRY_GEO_ID,\n  PCM.FROM_DATE,\n  PCM.THRU_DATE\nFROM (((((((((public.PARTY PRT\nLEFT OUTER JOIN public.PARTY_GROUP GRP\n  ON PRT.PARTY_ID = GRP.PARTY_ID)\nLEFT OUTER JOIN public.PERSON PER\n  ON PRT.PARTY_ID = PER.PARTY_ID)\nLEFT OUTER JOIN public.PARTY_RELATIONSHIP PR\n  ON PRT.PARTY_ID = PR.PARTY_ID_TO\n  AND ((PR.ROLE_TYPE_ID_FROM = 'ACCOUNT'\n  AND PR.PARTY_RELATIONSHIP_TYPE_ID = 'EMPLOYMENT')))\nLEFT OUTER JOIN public.PARTY_GROUP CGRP\n  ON PR.PARTY_ID_FROM = CGRP.PARTY_ID)\nLEFT OUTER JOIN public.PARTY_ROLE PRL\n  ON PRT.PARTY_ID = PRL.PARTY_ID)\nLEFT OUTER JOIN public.PARTY_CONTACT_MECH PCM\n  ON PRT.PARTY_ID = PCM.PARTY_ID\n  AND (((PCM.THRU_DATE IS NULL\n  OR PCM.THRU_DATE > '2015-06-15 13:21:30.157')\n  AND (PCM.FROM_DATE IS NULL\n  OR PCM.FROM_DATE <= '2015-06-15 13:21:30.157'))))\nLEFT OUTER JOIN public.POSTAL_ADDRESS PA\n  ON PCM.CONTACT_MECH_ID = PA.CONTACT_MECH_ID)\nLEFT OUTER JOIN public.CONTACT_MECH CM\n  ON PCM.CONTACT_MECH_ID = CM.CONTACT_MECH_ID)\nLEFT OUTER JOIN public.TELECOM_NUMBER TN\n  ON PCM.CONTACT_MECH_ID = TN.CONTACT_MECH_ID)\nLEFT OUTER JOIN public.PARTY_CONTACT_MECH_PURPOSE PCP\n  ON PCM.CONTACT_MECH_ID = PCP.CONTACT_MECH_ID\n  AND (((PCM.THRU_DATE IS NULL\n  OR PCM.THRU_DATE > '2015-06-15 13:21:30.157')\n  AND (PCM.FROM_DATE IS NULL\n  OR PCM.FROM_DATE <= '2015-06-15 13:21:30.157')))\n  AND PCM.PARTY_ID = PCP.PARTY_ID\n  AND (((PCM.THRU_DATE IS NULL\n  OR PCM.THRU_DATE > '2015-06-15 13:21:30.236')\n  AND (PCM.FROM_DATE IS NULL\n  OR PCM.FROM_DATE <= '2015-06-15 13:21:30.236')))\nWHERE (((PRL.ROLE_TYPE_ID = ?\nOR PRL.ROLE_TYPE_ID = ?\nOR PRL.ROLE_TYPE_ID = ?)\nAND (PRT.STATUS_ID <> ?\nOR PRT.STATUS_ID IS NULL)\nAND PRT.PARTY_ID = ?))\nORDER BY PRT.PARTY_ID ASC\n\n\ngit-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1708341 13f79535-47bb-0310-9956-ffa450edef68","distinct":true,"url":"https://api.github.com/repos/apache/ofbiz/commits/694097141fe3f1b3918606e1895ff64be9bce50f"}]}