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
[PAID] [$1000] New Room - App crashes if create room offline and change Welcome message #19688
Please re-state the problem that we are trying to solve in this issue.
New Room - App crashes if create room offline and change Welcome message
What is the root cause of that problem?
While creating the public room in offline mode, we save the optimistic data to the Onyx first, but our optimistic data didn't include the welcomeMessage, so after that you went to Setting => Welcome Message Page, app will crashed because of this line:
Because htmlToMarkdown function expected a string as param:
htmlToMarkdown(htmlString){letgeneratedMarkdown=htmlString;constbody=/<(body)(?:"[^"]*"|'[^']*'|[^'"><])*>(?:\n|\r\n)?([\s\S]*?)(?:\n|\r\n)?<\/\1>(?![^<]*(<\/pre>|<\/code>))/im;constparseBodyTag=generatedMarkdown.match(body);// If body tag is found then use the content of body rather than the whole HTMLif(parseBodyTag){generatedMarkdown=parseBodyTag[2];}
What changes do you think we should make in order to solve the problem?
Since we added initial value for other params while creating a report, that will be better if we could also add a initialValue for welcomeMessage. We should update function buildOptimisticChatReport to include the welcomeMessage with a initial value.
changed the title [-]New Room - App crashes if create room offline and change Welcome message[/-][+][$1000] New Room - App crashes if create room offline and change Welcome message[/+]on May 29, 2023
changed the title [-][HOLD for payment 2023-06-05] [$1000] New Room - App crashes if create room offline and change Welcome message[/-][+][HOLD for payment 2023-06-07] [HOLD for payment 2023-06-05] [$1000] New Room - App crashes if create room offline and change Welcome message[/+]on May 31, 2023
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.20-5 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2023-06-07. 🎊
After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
External issue reporter - Internal report, no reporting payment necessary.
Contributor that fixed the issue - @hungvu193 - $1000 + $500 (speed bonus) = $1500
Contributor+ that helped on the issue and/or PR - @aimane-chnaif - $1000 + $500 (speed bonus) = $1500
Speed bonus analysis: Special circumstances here so I had a quick chat with @luacmartins and we've agreed that the speed bonus should apply so I'll add that into the payment.
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
Merged PR within 3 business days of assignment - 50% bonus
Merged PR more than 9 business days after assignment - 50% penalty
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
[@aimane-chnaif] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: N/A
[@aimane-chnaif] Determine if we should create a regression test for this bug. No
[@aimane-chnaif] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
[@strepanier03] Link the GH issue for creating/updating the regression test once above steps have been agreed upon: N/A
This bug was introduced while implementing new feature.
As offline test is already in PR checklist, this bug should have been caught earlier during PR review.
No need further regression test step.
changed the title [-][HOLD for payment 2023-06-07] [HOLD for payment 2023-06-05] [$1000] New Room - App crashes if create room offline and change Welcome message[/-][+][HOLD for payment 2023-06-07] [$1000] New Room - App crashes if create room offline and change Welcome message[/+]on Jun 5, 2023
A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: N/A
Determine if we should create a regression test for this bug.
If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
This bug was introduced while implementing new feature.
As offline test is already in PR checklist, this bug should have been caught earlier during PR review.
No need further regression test step.
changed the title [-][HOLD for payment 2023-06-07] [$1000] New Room - App crashes if create room offline and change Welcome message[/-][+][PAID] [$1000] New Room - App crashes if create room offline and change Welcome message[/+]on Jun 8, 2023
Activity
melvin-bot commentedon May 26, 2023
Triggered auto assignment to @strepanier03 (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon May 26, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)dukenv0307 commentedon May 29, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
New Room - App crashes if create room offline and change Welcome message
What is the root cause of that problem?
When creating new room offline, there is no welcomeMessage field in created report on ONYX
App/src/pages/ReportWelcomeMessagePage.js
Line 39 in 06192ac
So
props.report.welcomeMessagewill be undefined.It caused a crash app because parser.htmlToMarkdown function receive a string param
What changes do you think we should make in order to solve the problem?
We should use lodash get to get welcomeMessage like this
What alternative solutions did you explore? (Optional)
hungvu193 commentedon May 29, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
New Room - App crashes if create room offline and change Welcome message
What is the root cause of that problem?
While creating the public room in offline mode, we save the optimistic data to the Onyx first, but our optimistic data didn't include the
welcomeMessage, so after that you went to Setting => Welcome Message Page, app will crashed because of this line:App/src/pages/ReportWelcomeMessagePage.js
Line 39 in 7bf0763
Because
htmlToMarkdownfunction expected a string as param:What changes do you think we should make in order to solve the problem?
Since we added initial value for other params while creating a report, that will be better if we could also add a initialValue for
welcomeMessage. We should update functionbuildOptimisticChatReportto include thewelcomeMessagewith a initial value.In case we only want add welcomeMessage for specific report (like policyRoom), we can add more condition in the return to do that.
What alternative solutions did you explore? (Optional)
N/A
Result
Screen.Recording.2023-05-29.at.18.35.07.mov
[-]New Room - App crashes if create room offline and change Welcome message[/-][+][$1000] New Room - App crashes if create room offline and change Welcome message[/+]melvin-bot commentedon May 29, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01fc39914f0ea0ccf3
melvin-bot commentedon May 29, 2023
Triggered auto assignment to @michaelhaxhiu (
External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.34 remaining items
[-][HOLD for payment 2023-06-05] [$1000] New Room - App crashes if create room offline and change Welcome message[/-][+][HOLD for payment 2023-06-07] [HOLD for payment 2023-06-05] [$1000] New Room - App crashes if create room offline and change Welcome message[/+]melvin-bot commentedon May 31, 2023
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.20-5 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2023-06-07. 🎊
After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
Speed bonus analysis: Special circumstances here so I had a quick chat with @luacmartins and we've agreed that the speed bonus should apply so I'll add that into the payment.
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
melvin-bot commentedon May 31, 2023
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
https://github.com/Expensify/App/pull/18662/files#r1222396155
[-][HOLD for payment 2023-06-07] [HOLD for payment 2023-06-05] [$1000] New Room - App crashes if create room offline and change Welcome message[/-][+][HOLD for payment 2023-06-07] [$1000] New Room - App crashes if create room offline and change Welcome message[/+]strepanier03 commentedon Jun 5, 2023
@hungvu193 - I've hired you to the Upwork job so we can be ready when this comes off hold.
@aimane-chnaif - I've also hired you for the job and will follow along for your checklist answers so I can take any needed regression test steps.
Thank you both!
hungvu193 commentedon Jun 6, 2023
Thanks @strepanier03 , I accepted the offer.
strepanier03 commentedon Jun 7, 2023
@hungvu193 - I have paid you via Upwork and closed the contract, thank you!
hungvu193 commentedon Jun 8, 2023
Thank you @strepanier03
aimane-chnaif commentedon Jun 8, 2023
This bug was introduced while implementing new feature.
As offline test is already in PR checklist, this bug should have been caught earlier during PR review.
No need further regression test step.
strepanier03 commentedon Jun 8, 2023
Thank you @aimane-chnaif - I'll update now and finish paying the contract.
[-][HOLD for payment 2023-06-07] [$1000] New Room - App crashes if create room offline and change Welcome message[/-][+][PAID] [$1000] New Room - App crashes if create room offline and change Welcome message[/+]strepanier03 commentedon Jun 8, 2023
I've paid the contracts, ended them and left feedback.
Thank you for the time and effort you all put in to fix this!