lovinghouston / lwcgoogleplacesbutton

Adds a Lightning Web Component to create Google Place Listings (currently hardcoded to type "church") as a Salesforce object (currently hardcoded to a custom object named Church_School_Partnership__c).
3 stars 1 forks source link

Add a "Distance" field on CSP to represent distance between Church and School Account Records #38

Closed Julian88Tex closed 4 years ago

Julian88Tex commented 4 years ago

As a member of LH staff, I would like to know the distance between a church and school to help me determine any correlation between distance and partnership strength.

Given I'm viewing the CSP object in Object Manager When I navigate to fields Then I see a "Distance" field exists And type is Decimal And it is not required

Given a CSP record exists When I navigate to it A Distance field is visible

Given a CSP record And Church field is filled in And the related church has a Zip & Country And School field is filled in And the related school has a Zip & Country When I view the record A logical distance between the church and school (in miles) is filled in on the Distance field

Given a CSP record And Church field is not filled in And the related church has a Zip & Country And School field is filled in And the related school has a Zip & Country When I view the record The Distance field is empty

Given a CSP record And a logical distance between the church and school (in miles) is filled in on the Distance field When I change the church And the related church has a Zip & Country Then the distance field updates accordingly to the new distance

Given a CSP record And a logical distance between the church and school (in miles) is filled in on the Distance field When I remove the church And the related church has a Zip & Country Then the distance field updates to empty

Testing Notes:

sungysang commented 4 years ago

Mind adding the Distance field to Sandbox @Julian88Tex ?

Julian88Tex commented 4 years ago

@sungysang it's there, lmk if you don't see it thanks

sungysang commented 4 years ago

Closing this since Distance will no longer be part of the columns to show. Will create new ticket to address incorrect distances showing

jonatng commented 4 years ago

@sungysang @Julian88Tex Use case: if user decides to edit to address B because address A is incorrect, and CSP lists are created for address A and B. Result: CSP lists for address A and B both exist under related related list > CSP Issue: How can we automatically remove the previous CSP list and only procure a list for the updated address? see "Johnny school of cirque" example.

Julian88Tex commented 4 years ago

@jonatng can you write out exact steps to get to second CSP creation? and/or add a video of you recreating issue? not sure I fully understand the situation

sungysang commented 4 years ago

@jonatng It sounds like this boils down to how old CSPs that were created with a previous address are treated if the school's address is updated?

I wouldn't call this functionality for the button, more just cleanup responsibility by the admin and/or users after they update the address. Deleting their existing data, even if the data could have been created by us, would be dangerous and something that would need a lot of attention to make sure we get right

jonatng commented 4 years ago

https://drive.google.com/open?id=1yTNSRNd1pxWjNHwVrM0kSqnJNSoqevnX Distance Test vid link @sungysang @Julian88Tex

Julian88Tex commented 4 years ago

@jonatng thanks for the video this helps! So if I understand these are the steps to reproduce the situation:

  1. Create an Account with Address 1
  2. Click the "Find Closest Churches" button
  3. Change the address on the account to Address 2
  4. Click the "Find Closest Churches" button
  5. View CSP Records related to Account

Result:

I would say the above situation is expected results. We do not want to assume a change of address would invalidate previously found churches.

jonatng commented 4 years ago

@sungysang that's correct.

Julian88Tex commented 4 years ago

Great job on dev @sungysang and great job on testing @jonatng !

Closing this out since it is complete.