You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[$250] Profile - After the user's address is saved, Address Line 2 is added to Address Line 1 #45765
@JmillsExpensify FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
What changes do you think we should make in order to solve the problem?
We can start saving them separately by creating street2 prop privatePersonalDetails?.address and then we can displaying them easily by accessing the props
or we can also extract the street2 by assigning the string after newline to street2 like
What changes do you think we should make in order to solve the problem?
We are already sending street & street2 to backend as homeAddressStreet & addressStreet2, we can update the backend to return homeAddressStreet & addressStreet2 as addressLine1 and addressLine2 and then we can use addressLine1 and addressLine2 in AddressPage.
What alternative solutions did you explore? (Optional)
We should save addressLine1 and addressLine2 separately in Address object.
address: {street: PersonalDetailsUtils.getFormattedStreet(street,street2),addressLine1:street,addressLine2:street2,
city,
state,
zip,
country,},
And then use addressLine1 and addressLine2 in AddressPage and pass it as street1={addressLine1} and street2={addressLine2}
const {addressLine1, addressLine2} = address ?? {};
We can use street & street2 as fallback if addressLine1 and addressLine2 doesn't exist.
Activity
melvin-bot commentedon Jul 19, 2024
Triggered auto assignment to @JmillsExpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.lanitochka17 commentedon Jul 19, 2024
We think that this bug might be related to #vip-vsp
lanitochka17 commentedon Jul 19, 2024
@JmillsExpensify FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
FitseTLT commentedon Jul 19, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Profile - After the user's address is saved, Address Line 2 is added to Address Line 1
What is the root cause of that problem?
We are saving both street and street2 in
streetseparating with new lineApp/src/libs/PersonalDetailsUtils.ts
Lines 214 to 215 in b8b99d0
But we are not extracting street2 properly here
App/src/pages/AddressPage.tsx
Lines 31 to 32 in b8b99d0
What changes do you think we should make in order to solve the problem?
We can start saving them separately by creating
street2propprivatePersonalDetails?.addressand then we can displaying them easily by accessing the propsor we can also extract the street2 by assigning the string after newline to street2 like
What alternative solutions did you explore? (Optional)
nyomanjyotisa commentedon Jul 19, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
After the user's address is saved, Address Line 2 is added to Address Line 1
What is the root cause of that problem?
Street value from API response are combined for Street 1 and Street 2, separated by \n

And we don't handle it here
What changes do you think we should make in order to solve the problem?
Handle the street value with \n from API response to separate it to Street 1 and Street 2
And change this to
RESULT

What alternative solutions did you explore? (Optional)
FitseTLT commentedon Jul 19, 2024
Updated to fix a typo
/nto\nKrishna2323 commentedon Jul 19, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Profile - After the user's address is saved, Address Line 2 is added to Address Line 1
What is the root cause of that problem?
We already have
addressLine1andaddressLine2property inAddressbut we aren't using that.App/src/libs/actions/PersonalDetails.ts
Lines 173 to 179 in b8b99d0
What changes do you think we should make in order to solve the problem?
We are already sending
street&street2to backend ashomeAddressStreet&addressStreet2, we can update the backend to returnhomeAddressStreet&addressStreet2asaddressLine1andaddressLine2and then we can useaddressLine1andaddressLine2inAddressPage.App/src/libs/actions/PersonalDetails.ts
Lines 152 to 159 in b8b99d0
What alternative solutions did you explore? (Optional)
We should save
addressLine1andaddressLine2separately inAddressobject.And then use
addressLine1andaddressLine2inAddressPageand pass it asstreet1={addressLine1}andstreet2={addressLine2}const {addressLine1, addressLine2} = address ?? {};
We can use
street&street2as fallback ifaddressLine1andaddressLine2doesn't exist.Krishna2323 commentedon Jul 19, 2024
Proposal Updated
melvin-bot commentedon Jul 22, 2024
@JmillsExpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon Jul 24, 2024
@JmillsExpensify Huh... This is 4 days overdue. Who can take care of this?
melvin-bot commentedon Jul 26, 2024
@JmillsExpensify 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
53 remaining items
JmillsExpensify commentedon Oct 2, 2024
Payment summary:
garrettmknight commentedon Oct 8, 2024
$250 approved for @thesahindia
JmillsExpensify commentedon Oct 9, 2024
All contributors paid out, so closing.