Auto naming of Transfer Transaction #1393
Reference in New Issue
Block a user
Delete Branch "fix-1384"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why?
What?
Transfer from {from_account} to {to_account}.Earlier it was saved asTransfer from Originator to Receiveror whatever user inputs in the Transfer form.Probable Concerns
https://github.com/user-attachments/assets/344791ae-16b0-4034-9cbc-4100b4837282
I think we should move this logic directly to the transfers controller:
490f44589e/app/controllers/account/transfers_controller.rb (L18)Furthermore, it may be a nice touch if we had generated names for each of the entries within the transfer:
490f44589e/app/models/account/transfer.rb (L46-L64)For example, the "from" name could be something like
"Transfer to #{to_account.name}"and the "to" name could be"Transfer from #{from_account.name}"Yes , This makes sense.
I believe if we’re assigning distinct names to both entries, then the
nameparameter inbuild_from_accountsfunction would be of no use, so removing it seems like the right approach to meAlso, Are we going to store the full name i.e Transfer from {from account} to {to account} elsewhere or this will going to be generated at runtime, like we do now.
Also, I've noticed that locales are already used in the project, so directly adding
"Transfer to #{to_account.name}"might not be ideal. Would it be better to create a locale attribute under theentryfolder inen.yml, or would that be overkill for this change?@Harry-kp regarding locales, we're going to have to go back through a lot of the model stuff and make bulk updates once we start down the path of #1225 , so for this change, let's just hardcode it for now.
And in regards to the
name:param, fully agree.That's my bad, I forgot that
Transferdoes not have a storednamefield. We can just keep generating at runtime as we're doing now.@zachgoll Changes are done.
Awesome, looks great!