[Hold for payment August 10th] Chronos has a timezone set
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
- Log in to staging
- Open a conversation with Chronos
Expected Result:
Chronos shouldn't have a timezone.
Actual Result:
Chronos is showing a timezone.
Workaround:
N/A
Platform:
Where is this issue occurring?
- Web
- iOS
- Android
- Desktop App
- Mobile Web
Version Number: 1.0.81-3
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:


Expensify/Expensify Issue URL:
From @thienlnam https://expensify.slack.com/archives/C01GTK53T8Q/p1627609596004400
Chronos shouldn't have a timezone because luckily for us Chronos doesn't sleep
Triggered auto assignment to @Beamanator (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.
Proposal
- It can be easily fixed by adding a check inside
ReportActionCompse.js
const hasChronosParticipant = _.contains(reportParticipants, CONST.EMAIL.CHRONOS);
https://github.com/Expensify/App/blob/74f8049b2429dfbf59e3e0cc20d2e0981b4f6751/src/pages/home/report/ReportActionCompose.js#L431
- It can be used after line
431like this
const shouldShowReportRecipientLocalTime = !hasConciergeParticipant
&& !hasChronosParticipant
My approach would be to combine Concierge and Chronos blocks into one:
ReportActionCompose:
import lodashIntersection from 'lodash/intersect'; // At the top of
const hasSystemParticipant = lodashIntersection.intersect(reportParticipants, _.values(CONST.EMAIL)).length > 0;
const shouldShowReportRecipientLocalTime = !hasSystemParticipant
&& !hasMultipleParticipants
&& reportRecipient
&& reportRecipientTimezone
&& currentUserTimezone.selected !== reportRecipientTimezone.selected;
This will ensure that in the future if we add any additional email in the constants it'll automatically not show the timezone. If you want to avoid that, the condition would be:
const hasSystemParticipant = lodashIntersection.intersect(reportParticipants, [CONST.EMAIL.CONCIERGE, CONST.EMAIL.CHRONOS]).length > 0;
Triggered auto assignment to @Christinadobrzyn (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.
This looks like a great External issue
@aman-atg I like your proposal, please submit a PR when you have a chance!
@mananjadhav I like your idea too, but I don't think we need to do so much future-proofing at this time. I think if we eventually decide to have a constant that only stores system emails, your solution would be great. But for now with the constant just called EMAIL, we don't really know what could be stored in there so I would prefer we don't "assume" it will only be system emails.
I'm ooo today but I'll get something in Upwork tomorrow.
Posted in Upwork - invited @aman-atg to the job.
External Upwork post - https://www.upwork.com/jobs/~0199ea27a5587e0fc9 Internal Upwork post - https://www.upwork.com/ab/applicants/1422769769244663808/job-details
We create a variable inside render() in - "src/pages/home/report/ReportActionCompose.js" like - (const hasChronosParticipant = _.contains(reportParticipants, CONST.EMAIL.CHRONOS); and we add this line "&& !hasChronosParticipant" after this line-> "const shouldShowReportRecipientLocalTime = !hasConciergeParticipant"
Hey @arpitdeveloper thanks for your proposal but as you can see in the above messages, we have already hired someone for this job. Please look for open issues that have the Help Wanted label if you are looking for jobs that haven't had anyone hired yet 👍
Ah so sorry @aman-atg - I missed the PR you created in this GH 🤦🏼♀️
Hired you in Upwork!
I missed the PR you created in this GH 🤦🏼♀️
No problem! ( It's in draft. )
@aman-atg has been paid, Upwork job closed!