feat: add login user to driver if available for notifications
Use Case
- Driver is internal user (for example when employee)
- Send notifications to driver based on data that is only available or maintained on internal users
Proposed Solution
- [x] add internal user to driver document
- [x] take it from employee, if employee is set and make the field read-only
no-docs
Codecov Report
Attention: Patch coverage is 75.00000% with 1 lines in your changes are missing coverage. Please review.
Project coverage is 60.13%. Comparing base (
8e52218) to head (b39f7b1). Report is 398 commits behind head on develop.
:exclamation: Current head b39f7b1 differs from pull request most recent head 7032a10
Please upload reports for the commit 7032a10 to get more accurate results.
Additional details and impacted files
@@ Coverage Diff @@
## develop #39638 +/- ##
===========================================
- Coverage 60.76% 60.13% -0.64%
===========================================
Files 760 758 -2
Lines 71881 70955 -926
===========================================
- Hits 43682 42669 -1013
- Misses 28199 28286 +87
| Files | Coverage Δ | |
|---|---|---|
| erpnext/setup/doctype/driver/driver.py | 33.33% <75.00%> (+5.55%) |
:arrow_up: |
This pull request has been automatically marked as inactive because it has not had recent activity. It will be closed within 3 days if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing.
Send notifications to driver based on data that is only available or maintained on internal users
Any example of an Internal User specific data?
Any example of an Internal User specific data?
Yes, in our case it's Matrix ID (for matrix chat). But it could be email, phone or pager, too.
I should also note, that not every driver is also an employee. Hence, if employee isn't set, then the user field can be set freely.
However, any driver that should be incorporated into the company's notification infrastructure can be required, if not an employee, to be(come) a user.
Thus external service providers, indeed are users so they get notifications, itinerary, maps links, etc via Matrix Chat.
Maybe I should also add, that in our deployment, this works together with: https://github.com/frappe/frappe/pull/24725
That PR implements the selection of a user field as a notification target.
Looks like a simple addition. Once the Framework changes are merged, then we can merge this as well.
This pull request has been automatically marked as inactive because it has not had recent activity. It will be closed within 3 days if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing.
@ruthra-kumar can you maybe help recommend the framework changes with a trusted colleague responsible for the framework? It would be nice if we where to avoid the endless and nasty stale bot loop on this one. Thx, that'd be much appreciated!
ping
This pull request has been automatically marked as inactive because it has not had recent activity. It will be closed within 3 days if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing.
@ruthra-kumar Could you please help to push for https://github.com/frappe/frappe/pull/24725 Thanks!
ping
Go for it now. The future is promised to no one. - Wayne Dyer
Kindly help move this PR forward. Many thanks from Yours Sincerely!
Fears are nothing more than a state of mind. - Napoleon Hill
Kindly help move this PR forward. Many thanks from Yours Sincerely!
What the caterpillar calls the end of the world, the master calls a butterfly. - Richard Bach
Kindly help move this PR forward. Many thanks from Yours Sincerely!
Watch your thoughts, they become your words Watch your words, they become your actions Watch your actions, they become your habits Watch your habits, they become your character Watch your character, it becomes your destiny. -
Kindly help move this PR forward. Many thanks from Yours Sincerely!
Looks like a simple addition. Once the Framework changes are merged, then we can merge this as well.
@ruthra-kumar fyi, the framework changes have just been merged.