avniproject / integration-service

Service for integration Avni with other systems
GNU Affero General Public License v3.0
0 stars 2 forks source link

Handle null values for address fields in Implementation Inventory GET API response #78

Closed himeshr closed 1 year ago

himeshr commented 1 year ago

Vinay found 365 entries of ImplementationInventory.. where address_id field is null. Its caused by following fields coming as null in the Goonj Salesforce "Get ImplementationInventories" API: "CenterFieldOfficeState": null, "CenterFieldOfficeDistrict": null,

Tasks:

Code place:

Subject.java: public void setAddress(String address) { map.put(AddressFieldName, address); }

himeshr commented 1 year ago

This bug has been fixed in Salesforce. ImplementationInventory wont send null values anymore. Ran the below command for entries in prod with null addressId: update individual set address_id = 413044, last_modified_date_time = current_timestamp + ((id) * interval '1 millisecond') where address_id is null and subject_type_id = 1020;

ashusvnath commented 1 year ago

@himeshr : How many records are updated by the script you provided in the comment ? Are all the 365 entries fixed ?