Open JmillsExpensify opened 1 week ago
Current assignee @JmillsExpensify is eligible for the NewFeature assigner, not assigning anyone new.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ikevin127 (External
)
:warning: It looks like this issue is labelled as a New Feature but not tied to any GitHub Project. Keep in mind that all new features should be tied to GitHub Projects in order to properly track external CAP software time :warning:
Triggered auto assignment to Design team member for new feature review - @dubielzyk-expensify (NewFeature
)
⚠️ Could not update price automatically because there is no linked Upwork Job ID. The BZ team member will need to update the price manually in Upwork.
Edited by proposal-police: This proposal was edited at 2024-11-12 09:01:16 UTC.
Add posted date to Expensify Card transactions
New feature
Create a variable for date description as we did for amountDescription
here
let dateDescription = translate('common.date')
When the transaction is the card transaction, get the posted date from transaction data, if it exists add posted data to the dateDescription
if (postedDate) {
dateDescription += ` ${CONST.DOT_SEPARATOR} ${translate('iou.posted')} ${postedDate}`
}
dateDescription
variabledescription={dateDescription}
♻️ Reviewing proposal.
@mkzie2's proposal makes sense to me. The solution follows the Amount
field's model for adding additional data which is what we're looking for based on the issue's emphasis notes. Other details can be worked on during the PR phase. The solution result would look like this:
🎀👀🎀 C+ reviewed
@mountiny Is the BE part for this NewFeature
completed ? I wasn't able to find any variable like / related to postedDate
in the FE transaction types - therefore we might have to wait for BE to return the variable before moving on with the FE implementation for this issue.
Current assignee @mountiny is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.
Thanks! no the be is not completed. I fell for the trap from @JmillsExpensify called External
issue.
I will have to whip up a PR for this
Another thing I noticed when reviewing is that we have this check:
https://github.com/Expensify/App/blob/7256ad6eef046be3345e0b260252f6ec47fc4203/src/libs/TransactionUtils/index.ts#L637-L642
based on which we will show the Posted YYYY-MM-DD
label if postedDate
exists (based on proposed solution):
https://github.com/Expensify/App/blob/7256ad6eef046be3345e0b260252f6ec47fc4203/src/components/ReportActionItem/MoneyRequestView.tsx#L235-L242
but because of the !!transaction?.managedCard
check which determines isCardTransaction
, if managedCard
(boolean) is false
or doesn't exist in the transaction object -> isCardTransaction
will be false
-> label won't show.
@mountiny Is managedCard
always populated and true
on card transactions ? I wanted to bring up with you to ensure that we're tight here from the BE side, otherwise we could have a potential regression post-merge.
@mountiny Please let me know once the backend PR is done and let me know what data in a transaction that I can use to get the postedDate
@mkzie2 will let you know
@ikevin127 I assume managedCard is for all card transactions give the logic you showed but I will check once I will work on the PR
@JmillsExpensify, @mountiny, @ikevin127, @dubielzyk-expensify, @mkzie2 Huh... This is 4 days overdue. Who can take care of this?
the be is not completed
No update
In the queue
Made myself an owner as I was missing it my k2
@ikevin127 @mkzie2 the BE is up and it should be deployed on Monday.
The property in transaction will be posted
and its a string with format YYYYMMDD
so we will have to format it to what we need. This is how it is saved in the DB so I prefer not to change it to avoid confusion and just process it in the App. Types need to be updated too obviously
@mkzie2 @ikevin127 what is your eta on the pr? You can start working on it assuming the data is in posted field of a transaction. You cannot test card transactions nonetheless so you can go ahead
Then @mkzie2 can move forward with opening the PR and use posted
as the variable and I'll start reviewing as soon as it's ready for review.
Problem: Credit card transactions are unique because it's possible to buy something one day, but then the transaction isn't processed by the issuing bank until a couple of days later. Both dates are important, because the receipt will always have the transaction date, yet the accountant (and accounting system) need the posted date.
Solution: Let's add the posted date to all Expensify Card transactions. What this means in practice is that:
Date
label (just likeAmount
; see example below).Date * Posted %postedDate%
.I've annotated the mockup below so that this is hopefully all clear.
Other notes for emphasis:
* Posted %postedDate%
will not show.Issue Owner
Current Issue Owner: @mountiny