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

Fix type entities to follow convention of hasTable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Trunk
    • Fix Version/s: Upcoming Release
    • Component/s: ALL COMPONENTS
    • Labels:
      None

      Description

      'hasTable' field of 'Type' entities is used to give an idea that detail entity exists or not. We generally get the name of detail entity on the basis of typeId field value.

      For example :

      ContactMechType,contactMechTypeId = "POSTAL_ADDRESS" then we go to PostalAddress for detail.

      similarly,
      ContactMechType,contactMechTypeId = "TELECOM_NUMBER" then we go to TelecomNumber for detail.

      We should follow the naming convention.

      Below are some entities that are not following the pattern. Some of them are:

      • ShipmentGatewayConfigType
      • PaymentGatewayConfigType
      1. OFBIZ-9696.patch
        5 kB
        Aman Agrawal
      2. OFBIZ-9696-2.patch
        16 kB
        Aman Agrawal

        Issue Links

          Activity

          Hide
          pfm.smits Pierre Smits added a comment -

          Please list the thread of the discussion.

          Show
          pfm.smits Pierre Smits added a comment - Please list the thread of the discussion.
          Hide
          arunpati Arun Patidar added a comment -

          Committed changes in rev: 1809396.

          Also, added data update queries to confluence page: https://cwiki.apache.org/confluence/x/LoBr

          Thanks Aman Agrawal for your contribution.

          Show
          arunpati Arun Patidar added a comment - Committed changes in rev: 1809396. Also, added data update queries to confluence page: https://cwiki.apache.org/confluence/x/LoBr Thanks Aman Agrawal for your contribution.
          Hide
          aman.agrawal Aman Agrawal added a comment -

          Update SQL queries for ShipmentGatewayConfig and PaymentGatewayConfig entity modifications.

          UPDATE Shipment_Gateway_Config SET shipment_gateway_conf_type_id = 'SHIP_GATEWAY_DHL' WHERE shipment_gateway_conf_type_id = 'DHL';
          UPDATE Shipment_Gateway_Config SET shipment_gateway_conf_type_id = 'SHIP_GATEWAY_FEDEX' WHERE shipment_gateway_conf_type_id = 'FEDEX';
          UPDATE Shipment_Gateway_Config SET shipment_gateway_conf_type_id = 'SHIP_GATEWAY_UPS' WHERE shipment_gateway_conf_type_id = 'UPS';
          UPDATE Shipment_Gateway_Config SET shipment_gateway_conf_type_id = 'SHIP_GATEWAY_USPS' WHERE shipment_gateway_conf_type_id = 'USPS';

          UPDATE Payment_Gateway_Config SET payment_gateway_config_type_id = 'PAY_GATWY_SAGEPAY' WHERE payment_gateway_config_type_id = 'SAGEPAY';
          UPDATE Payment_Gateway_Config SET payment_gateway_config_type_id = 'PAY_GATWY_AUTH_NET' WHERE payment_gateway_config_type_id = 'AUTHORIZE_NET';
          UPDATE Payment_Gateway_Config SET payment_gateway_config_type_id = 'PAY_GATWY_CYBERSRC' WHERE payment_gateway_config_type_id = 'CYBERSOURCE';
          UPDATE Payment_Gateway_Config SET payment_gateway_config_type_id = 'PAY_GATWY_EWAY' WHERE payment_gateway_config_type_id = 'EWAY';
          UPDATE Payment_Gateway_Config SET payment_gateway_config_type_id = 'PAY_GATWY_PAYFLOWPRO' WHERE payment_gateway_config_type_id = 'PAYFLOWPRO';
          UPDATE Payment_Gateway_Config SET payment_gateway_config_type_id = 'PAY_GATWY_PAYPAL' WHERE payment_gateway_config_type_id = 'PAYPAL';
          UPDATE Payment_Gateway_Config SET payment_gateway_config_type_id = 'PAY_GATWY_CLRCOMRC' WHERE payment_gateway_config_type_id = 'CLEARCOMMERCE';
          UPDATE Payment_Gateway_Config SET payment_gateway_config_type_id = 'PAY_GATWY_WORLDPAY' WHERE payment_gateway_config_type_id = 'WORLDPAY';
          UPDATE Payment_Gateway_Config SET payment_gateway_config_type_id = 'PAY_GATWY_ORBITAL' WHERE payment_gateway_config_type_id = 'ORBITAL';
          UPDATE Payment_Gateway_Config SET payment_gateway_config_type_id = 'PAY_GATWY_SECUREPAY' WHERE payment_gateway_config_type_id = 'SECUREPAY';
          UPDATE Payment_Gateway_Config SET payment_gateway_config_type_id = 'PAY_GATWY_IDEAL' WHERE payment_gateway_config_type_id = 'IDEAL';

          Show
          aman.agrawal Aman Agrawal added a comment - Update SQL queries for ShipmentGatewayConfig and PaymentGatewayConfig entity modifications. UPDATE Shipment_Gateway_Config SET shipment_gateway_conf_type_id = 'SHIP_GATEWAY_DHL' WHERE shipment_gateway_conf_type_id = 'DHL'; UPDATE Shipment_Gateway_Config SET shipment_gateway_conf_type_id = 'SHIP_GATEWAY_FEDEX' WHERE shipment_gateway_conf_type_id = 'FEDEX'; UPDATE Shipment_Gateway_Config SET shipment_gateway_conf_type_id = 'SHIP_GATEWAY_UPS' WHERE shipment_gateway_conf_type_id = 'UPS'; UPDATE Shipment_Gateway_Config SET shipment_gateway_conf_type_id = 'SHIP_GATEWAY_USPS' WHERE shipment_gateway_conf_type_id = 'USPS'; UPDATE Payment_Gateway_Config SET payment_gateway_config_type_id = 'PAY_GATWY_SAGEPAY' WHERE payment_gateway_config_type_id = 'SAGEPAY'; UPDATE Payment_Gateway_Config SET payment_gateway_config_type_id = 'PAY_GATWY_AUTH_NET' WHERE payment_gateway_config_type_id = 'AUTHORIZE_NET'; UPDATE Payment_Gateway_Config SET payment_gateway_config_type_id = 'PAY_GATWY_CYBERSRC' WHERE payment_gateway_config_type_id = 'CYBERSOURCE'; UPDATE Payment_Gateway_Config SET payment_gateway_config_type_id = 'PAY_GATWY_EWAY' WHERE payment_gateway_config_type_id = 'EWAY'; UPDATE Payment_Gateway_Config SET payment_gateway_config_type_id = 'PAY_GATWY_PAYFLOWPRO' WHERE payment_gateway_config_type_id = 'PAYFLOWPRO'; UPDATE Payment_Gateway_Config SET payment_gateway_config_type_id = 'PAY_GATWY_PAYPAL' WHERE payment_gateway_config_type_id = 'PAYPAL'; UPDATE Payment_Gateway_Config SET payment_gateway_config_type_id = 'PAY_GATWY_CLRCOMRC' WHERE payment_gateway_config_type_id = 'CLEARCOMMERCE'; UPDATE Payment_Gateway_Config SET payment_gateway_config_type_id = 'PAY_GATWY_WORLDPAY' WHERE payment_gateway_config_type_id = 'WORLDPAY'; UPDATE Payment_Gateway_Config SET payment_gateway_config_type_id = 'PAY_GATWY_ORBITAL' WHERE payment_gateway_config_type_id = 'ORBITAL'; UPDATE Payment_Gateway_Config SET payment_gateway_config_type_id = 'PAY_GATWY_SECUREPAY' WHERE payment_gateway_config_type_id = 'SECUREPAY'; UPDATE Payment_Gateway_Config SET payment_gateway_config_type_id = 'PAY_GATWY_IDEAL' WHERE payment_gateway_config_type_id = 'IDEAL';
          Hide
          aman.agrawal Aman Agrawal added a comment - - edited

          Patch available for PaymentGatewayConfigType entity.
          In this changed the type field like:
          "SAGEPAY" -> "PAY_GATWY_SAGEPAY"
          and made changes in PaymentGatewayConfig entity.
          Also made changes in the code base.

          Show
          aman.agrawal Aman Agrawal added a comment - - edited Patch available for PaymentGatewayConfigType entity. In this changed the type field like: "SAGEPAY" -> "PAY_GATWY_SAGEPAY" and made changes in PaymentGatewayConfig entity. Also made changes in the code base.
          Hide
          aman.agrawal Aman Agrawal added a comment -

          Patch available for ShipmentGatewayConfigType entity.
          In this changed the type field like:
          "FEDEX" -> "SHIP_GATEWAY_FEDEX"
          and also made changes in ShipmentGatewayConfig entity.

          Show
          aman.agrawal Aman Agrawal added a comment - Patch available for ShipmentGatewayConfigType entity. In this changed the type field like: "FEDEX" -> "SHIP_GATEWAY_FEDEX" and also made changes in ShipmentGatewayConfig entity.
          Hide
          arunpati Arun Patidar added a comment -

          As we concluded on the mailing list to not extend entity, we should follow convention. so updating ticket description and title.

          Show
          arunpati Arun Patidar added a comment - As we concluded on the mailing list to not extend entity, we should follow convention. so updating ticket description and title.

            People

            • Assignee:
              arunpati Arun Patidar
              Reporter:
              arunpati Arun Patidar
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development