Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
himeshr opened this issue Aug 7, 2023 · 2 comments
Assignees

Comments

@himeshr
Copy link

himeshr commented Aug 7, 2023

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:

  • We need to handle Null values for address fields in all Goonj entities synced from Goonj Salesforce to Avni.
  • Void all existing ImplementationInventory with addressIds null in DB (Post deploy of above fix)

Code place:

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

@github-project-automation github-project-automation bot moved this to New Issues in Avni Product Aug 7, 2023
@himeshr himeshr moved this from New Issues to Analysis Complete in Avni Product Aug 7, 2023
@himeshr
Copy link
Author

himeshr commented Sep 11, 2023

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;

@himeshr himeshr closed this as completed Sep 11, 2023
@github-project-automation github-project-automation bot moved this from Analysis Complete to Done in Avni Product Sep 11, 2023
@himeshr himeshr reopened this Sep 11, 2023
@github-project-automation github-project-automation bot moved this from Done to Triaged in Avni Product Sep 11, 2023
@himeshr himeshr self-assigned this Sep 11, 2023
@himeshr himeshr moved this from Triaged to Code Review Ready in Avni Product Sep 11, 2023
@ashusvnath ashusvnath assigned ashusvnath and unassigned himeshr Sep 12, 2023
@ashusvnath ashusvnath moved this from Code Review Ready to In Code Review in Avni Product Sep 12, 2023
@ashusvnath
Copy link

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

@github-project-automation github-project-automation bot moved this from In Code Review to Done in Avni Product Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants