Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-6495

The filter-by-date="true" of <entity-condition/> in view entity PartyExport does not work

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Trunk
    • Fix Version/s: 14.12.01, 13.07.03, 16.11.01
    • Component/s: party
    • Labels:
      None

      Description

      The tag <entity-condition/> in view entity PartyExport in applications\party\entitydef\entitymodel.xml does not work.

        Activity

        Hide
        tzngvi Wei Zhang added a comment -

        See my attached fixed patch. Can anyone test this patch and commit the changes to SVN?

        Show
        tzngvi Wei Zhang added a comment - See my attached fixed patch. Can anyone test this patch and commit the changes to SVN?
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        It's not resolved yet, a patch has been provided rather...

        Show
        jacques.le.roux Jacques Le Roux added a comment - It's not resolved yet, a patch has been provided rather...
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        Also please explain exactly what you did to resolve the issue, it will facilitate the review, if you had a way to test it would be even better...thanks!

        Show
        jacques.le.roux Jacques Le Roux added a comment - Also please explain exactly what you did to resolve the issue, it will facilitate the review, if you had a way to test it would be even better...thanks!
        Hide
        tzngvi Wei Zhang added a comment -

        Hi Jacques,

        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

        GenericDAO.java
         if (queryTotalTime > 150) {
            Debug.logTiming("Ran query in " + queryTotalTime + " milli-seconds: " + " EntityName: " + modelEntity.getEntityName() + " Sql: " + sql + " where clause:" + whereEntityConditionParams, module);
        }
        

        to

        GenericDAO.java
         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

        SQL of PartyExport view
        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
        
        

        Hope that make sense.

        Regards,

        Wei

        Show
        tzngvi Wei Zhang added a comment - Hi Jacques, 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 GenericDAO.java if (queryTotalTime > 150) { Debug.logTiming( "Ran query in " + queryTotalTime + " milli-seconds: " + " EntityName: " + modelEntity.getEntityName() + " Sql: " + sql + " where clause:" + whereEntityConditionParams, module); } to GenericDAO.java 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 SQL of PartyExport view 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 Hope that make sense. Regards, Wei
        Hide
        tzngvi Wei Zhang added a comment -

        Hi Jacques,

        May I know when you have time to check this issue?

        Thanks,

        Wei

        Show
        tzngvi Wei Zhang added a comment - Hi Jacques, May I know when you have time to check this issue? Thanks, Wei
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        Yes thanks Zhang for the reminder, I hope this week

        Show
        jacques.le.roux Jacques Le Roux added a comment - Yes thanks Zhang for the reminder, I hope this week
        Hide
        jacques.le.roux Jacques Le Roux added a comment - - edited

        Thanks for your explanation Wei. I tried your suggestion and got

        EntityName: PartyExport SQL:
        SELECT PRT.PARTY_ID,
               PRT.STATUS_ID,
               PRT.PREFERRED_CURRE NCY_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.C OUNTRY_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
        FROM (((((((((OFBIZ.PARTY PRT
                      LEFT OUTER JOIN OFBIZ.PARTY_GROUP GRP ON PRT.PARTY_ID = GRP.PARTY_ID)
                     LEFT OUTER JOIN OFBIZ.PERSON PER ON PRT.PARTY_ID = PER.PARTY_ID)
                    LEFT OUTER JOIN OFBIZ.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 OFBIZ.PARTY_GROUP CGRP ON PR.PARTY_ID_FROM = CGRP.PARTY_ID)
                  LEFT OUTER JOIN OFBIZ.PARTY_ROLE PRL ON PRT.PARTY_ID = PRL.PARTY_ID)
                  LEFT OUTER JOIN OFBIZ.PARTY_CONTACT_MECH PCM ON PRT.PARTY_ID = PCM.PARTY_ID)
                LEFT OUTER JOIN OFBIZ.POSTAL_ADDRESS PA ON PCM.CONTACT_MECH_ID = PA.CONTACT_MECH_ID)
               LEFT OUTER JOIN OFBIZ.CONTACT_MECH CM ON PCM.CONTACT_ MECH_ID = CM.CONTACT_MECH_ID)
              LEFT OUTER JOIN OFBIZ.TELECOM_NUMBER TN ON PCM.CONTACT_MECH_ID = TN.CONTACT_MECH_ID)
        LEFT OUTER JOIN OFBIZ.PARTY_CONTACT_MECH_PURPOSE PCP ON PCM.CONTACT_MECH_ID = PCP.CONTACT_MEC H_ID
        AND PCM.PARTY_ID = PCP.PARTY_ID
        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
        WHERE clause:[PRL_ROLE_TYPE_ID=CUSTOMER, PRL_ROLE_TYPE_ID=SUPPLIER, PRL_ROLE_TYPE_ID=EMPLOYEE, PRT_STATUS_ID=PARTY_DISABLED, PRT_PARTY_ID=admin]
        

        before applying your patches and

        EntityName: PartyExport SQL:
        SELECT PRT.PARTY_ID,
               PRT.STATUS_ID,
               PRT.PREFERRED_CURRE NCY_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.C OUNTRY_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 (((((((((OFBIZ.PARTY PRT
                      LEFT OUTER JOIN OFBIZ.PARTY_GROUP GRP ON PRT.PARTY_ID = GRP.PARTY_ID)
                     LEFT OUTER JOIN OFBIZ.PERSON PER ON PRT.PARTY_ID = PER.PARTY_ID)
                    LEFT OUTER JOIN OFBIZ.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 OFBIZ.PARTY_GROUP CGRP ON PR.PARTY_ID_FROM = CGRP.PARTY_ID)
                  LEFT OUTER JOIN OFBIZ.PARTY_ROLE PRL ON PRT. PARTY_ID = PRL.PARTY_ID)
                 LEFT OUTER JOIN OFBIZ.PARTY_CONTACT_MECH PCM ON PRT.PARTY_ID = PCM.PARTY_ID
                 AND (((PCM.THRU_DATE IS NULL
                        OR PCM.THRU_DATE > '2015-09-23 14:27:04.919')
                       AND (PCM.FROM_DATE IS NULL
                            OR PC M.FROM_DATE <= '2015-09-23 14:27:04.919'))))
                LEFT OUTER JOIN OFBIZ.POSTAL_ADDRESS PA ON PCM.CONTACT_MECH_ID = PA.CONTACT_MECH_ID)
               LEFT OUTER JOIN OFBIZ.CONTACT_MECH CM ON PCM.CONTACT_MECH_ID = CM.CONTACT_MECH _ID)
              LEFT OUTER JOIN OFBIZ.TELECOM_NUMBER TN ON PCM.CONTACT_MECH_ID = TN.CONTACT_MECH_ID)
        LEFT OUTER JOIN OFBIZ.PARTY_CONTACT_MECH_PURPOSE PCP ON PCM.CONTACT_MECH_ID = PCP.CONTACT_MECH_ID
        AND PCM.PARTY_ID = P CP.PARTY_ID
        AND (((PCM.THRU_DATE IS NULL
               OR PCM.THRU_DATE > '2015-09-23 14:27:04.919')
              AND (PCM.FROM_DATE IS NULL
                   OR PCM.FROM_DATE <= '2015-09-23 14:27:04.919')))
        WHERE (((PRL.ROLE_TYPE_ID = ?
                 OR PRL.ROLE_TYP E_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
        WHERE clause:[PRL_ROLE_TYPE_ID=CUSTOMER, PRL_ROLE_TYPE_ID=SUPPLIER, PRL_ROLE_TYPE_ID=EMPLOYEE, PRT_STATUS_ID=PARTY_DISABLED, PRT_PARTY_ID=admin]
        

        after. So yes there is a difference, but it's not obvious to spot whatn and especially why "The tag <entity-condition></entity> in view entity PartyExport does not work". Because the result is the same in both cases (exportParty.csv):

        partyId,"preferredCurrencyUomId","groupName","firstName","middleName","lastName","companyPartyId","companyName","roleTypeId","contactMechPurposeTypeId","contactMechTypeId","emailAddress","telCountryCode","telAreaCode","telContactNumber","address1","address2","city","stateProvinceGeoId","postalCode","countryGeoId",
        

        Could you please give me some light about what you are doing and why? Thanks!

        BTW I tried only the export, were you concerned by the import?

        Show
        jacques.le.roux Jacques Le Roux added a comment - - edited Thanks for your explanation Wei. I tried your suggestion and got EntityName: PartyExport SQL: SELECT PRT.PARTY_ID, PRT.STATUS_ID, PRT.PREFERRED_CURRE NCY_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.C OUNTRY_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 FROM (((((((((OFBIZ.PARTY PRT LEFT OUTER JOIN OFBIZ.PARTY_GROUP GRP ON PRT.PARTY_ID = GRP.PARTY_ID) LEFT OUTER JOIN OFBIZ.PERSON PER ON PRT.PARTY_ID = PER.PARTY_ID) LEFT OUTER JOIN OFBIZ.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 OFBIZ.PARTY_GROUP CGRP ON PR.PARTY_ID_FROM = CGRP.PARTY_ID) LEFT OUTER JOIN OFBIZ.PARTY_ROLE PRL ON PRT.PARTY_ID = PRL.PARTY_ID) LEFT OUTER JOIN OFBIZ.PARTY_CONTACT_MECH PCM ON PRT.PARTY_ID = PCM.PARTY_ID) LEFT OUTER JOIN OFBIZ.POSTAL_ADDRESS PA ON PCM.CONTACT_MECH_ID = PA.CONTACT_MECH_ID) LEFT OUTER JOIN OFBIZ.CONTACT_MECH CM ON PCM.CONTACT_ MECH_ID = CM.CONTACT_MECH_ID) LEFT OUTER JOIN OFBIZ.TELECOM_NUMBER TN ON PCM.CONTACT_MECH_ID = TN.CONTACT_MECH_ID) LEFT OUTER JOIN OFBIZ.PARTY_CONTACT_MECH_PURPOSE PCP ON PCM.CONTACT_MECH_ID = PCP.CONTACT_MEC H_ID AND PCM.PARTY_ID = PCP.PARTY_ID 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 WHERE clause:[PRL_ROLE_TYPE_ID=CUSTOMER, PRL_ROLE_TYPE_ID=SUPPLIER, PRL_ROLE_TYPE_ID=EMPLOYEE, PRT_STATUS_ID=PARTY_DISABLED, PRT_PARTY_ID=admin] before applying your patches and EntityName: PartyExport SQL: SELECT PRT.PARTY_ID, PRT.STATUS_ID, PRT.PREFERRED_CURRE NCY_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.C OUNTRY_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 (((((((((OFBIZ.PARTY PRT LEFT OUTER JOIN OFBIZ.PARTY_GROUP GRP ON PRT.PARTY_ID = GRP.PARTY_ID) LEFT OUTER JOIN OFBIZ.PERSON PER ON PRT.PARTY_ID = PER.PARTY_ID) LEFT OUTER JOIN OFBIZ.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 OFBIZ.PARTY_GROUP CGRP ON PR.PARTY_ID_FROM = CGRP.PARTY_ID) LEFT OUTER JOIN OFBIZ.PARTY_ROLE PRL ON PRT. PARTY_ID = PRL.PARTY_ID) LEFT OUTER JOIN OFBIZ.PARTY_CONTACT_MECH PCM ON PRT.PARTY_ID = PCM.PARTY_ID AND (((PCM.THRU_DATE IS NULL OR PCM.THRU_DATE > '2015-09-23 14:27:04.919') AND (PCM.FROM_DATE IS NULL OR PC M.FROM_DATE <= '2015-09-23 14:27:04.919')))) LEFT OUTER JOIN OFBIZ.POSTAL_ADDRESS PA ON PCM.CONTACT_MECH_ID = PA.CONTACT_MECH_ID) LEFT OUTER JOIN OFBIZ.CONTACT_MECH CM ON PCM.CONTACT_MECH_ID = CM.CONTACT_MECH _ID) LEFT OUTER JOIN OFBIZ.TELECOM_NUMBER TN ON PCM.CONTACT_MECH_ID = TN.CONTACT_MECH_ID) LEFT OUTER JOIN OFBIZ.PARTY_CONTACT_MECH_PURPOSE PCP ON PCM.CONTACT_MECH_ID = PCP.CONTACT_MECH_ID AND PCM.PARTY_ID = P CP.PARTY_ID AND (((PCM.THRU_DATE IS NULL OR PCM.THRU_DATE > '2015-09-23 14:27:04.919') AND (PCM.FROM_DATE IS NULL OR PCM.FROM_DATE <= '2015-09-23 14:27:04.919'))) WHERE (((PRL.ROLE_TYPE_ID = ? OR PRL.ROLE_TYP E_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 WHERE clause:[PRL_ROLE_TYPE_ID=CUSTOMER, PRL_ROLE_TYPE_ID=SUPPLIER, PRL_ROLE_TYPE_ID=EMPLOYEE, PRT_STATUS_ID=PARTY_DISABLED, PRT_PARTY_ID=admin] after. So yes there is a difference, but it's not obvious to spot whatn and especially why "The tag <entity-condition></entity> in view entity PartyExport does not work". Because the result is the same in both cases (exportParty.csv): partyId, "preferredCurrencyUomId" , "groupName" , "firstName" , "middleName" , "lastName" , "companyPartyId" , "companyName" , "roleTypeId" , "contactMechPurposeTypeId" , "contactMechTypeId" , "emailAddress" , "telCountryCode" , "telAreaCode" , "telContactNumber" , "address1" , "address2" , "city" , "stateProvinceGeoId" , "postalCode" , "countryGeoId" , Could you please give me some light about what you are doing and why? Thanks! BTW I tried only the export, were you concerned by the import?
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        It's clearer after formatting the SQL requests But then is it only about adding the 2 dates fields? Then it would be OK with me I'll though then check the changes in ModelViewEntity.java are necessary (I guess so )

        Show
        jacques.le.roux Jacques Le Roux added a comment - It's clearer after formatting the SQL requests But then is it only about adding the 2 dates fields? Then it would be OK with me I'll though then check the changes in ModelViewEntity.java are necessary (I guess so )
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        Any chances?

        Show
        jacques.le.roux Jacques Le Roux added a comment - Any chances?
        Hide
        tzngvi Wei Zhang added a comment -

        Hi Jacques,

        Sorry for the late response. I thought you have figured it out. I just changed the Summary so that it make things clear.

        In addition, The main changes in the SQL generated by my patch is below.

        AND (((PCM.THRU_DATE IS NULL
                        OR PCM.THRU_DATE > '2015-09-23 14:27:04.919')
                       AND (PCM.FROM_DATE IS NULL
                            OR PC M.FROM_DATE <= '2015-09-23 14:27:04.919')))
        

        Hope that make sense and please feel free to contact me if there is any other problems.

        Thanks,

        Wei

        Show
        tzngvi Wei Zhang added a comment - Hi Jacques, Sorry for the late response. I thought you have figured it out. I just changed the Summary so that it make things clear. In addition, The main changes in the SQL generated by my patch is below. AND (((PCM.THRU_DATE IS NULL OR PCM.THRU_DATE > '2015-09-23 14:27:04.919') AND (PCM.FROM_DATE IS NULL OR PC M.FROM_DATE <= '2015-09-23 14:27:04.919'))) Hope that make sense and please feel free to contact me if there is any other problems. Thanks, Wei
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        Thanks Wei,

        Your patches are in
        trunk r1708341
        R14.12 r1708344
        Only framewrok patch in R13.07 r1708346
        Too much conflicts in R12.04

        BTW you could have committed those yourself

        Show
        jacques.le.roux Jacques Le Roux added a comment - Thanks Wei, Your patches are in trunk r1708341 R14.12 r1708344 Only framewrok patch in R13.07 r1708346 Too much conflicts in R12.04 BTW you could have committed those yourself
        Hide
        tzngvi Wei Zhang added a comment -

        ok, I will try myself later

        Show
        tzngvi Wei Zhang added a comment - ok, I will try myself later

          People

          • Assignee:
            jacques.le.roux Jacques Le Roux
            Reporter:
            tzngvi Wei Zhang
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development