erpnext icon indicating copy to clipboard operation
erpnext copied to clipboard

feat: add login user to driver if available for notifications

Open blaggacao opened this issue 2 years ago • 16 comments

Use Case

  1. Driver is internal user (for example when employee)
  2. 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

blaggacao avatar Jan 30 '24 09:01 blaggacao

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:

... and 334 files with indirect coverage changes

codecov[bot] avatar Jan 31 '24 20:01 codecov[bot]

image

blaggacao avatar Feb 14 '24 10:02 blaggacao

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.

stale[bot] avatar Mar 02 '24 11:03 stale[bot]

Send notifications to driver based on data that is only available or maintained on internal users

Any example of an Internal User specific data?

ruthra-kumar avatar Mar 29 '24 06:03 ruthra-kumar

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.

blaggacao avatar Mar 29 '24 07:03 blaggacao

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.

blaggacao avatar Mar 29 '24 08:03 blaggacao

Looks like a simple addition. Once the Framework changes are merged, then we can merge this as well.

ruthra-kumar avatar Mar 29 '24 08:03 ruthra-kumar

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.

stale[bot] avatar Apr 13 '24 11:04 stale[bot]

@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!

blaggacao avatar Apr 14 '24 06:04 blaggacao

ping

blaggacao avatar May 02 '24 07:05 blaggacao

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.

stale[bot] avatar May 18 '24 05:05 stale[bot]

@ruthra-kumar Could you please help to push for https://github.com/frappe/frappe/pull/24725 Thanks!

blaggacao avatar May 22 '24 14:05 blaggacao

ping

blaggacao avatar Jun 23 '24 14:06 blaggacao

Go for it now. The future is promised to no one. - Wayne Dyer


Kindly help move this PR forward. Many thanks from Yours Sincerely!

blaggacao avatar Jun 28 '24 08:06 blaggacao

Fears are nothing more than a state of mind. - Napoleon Hill


Kindly help move this PR forward. Many thanks from Yours Sincerely!

blaggacao avatar Jul 04 '24 09:07 blaggacao

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!

blaggacao avatar Jul 11 '24 12:07 blaggacao

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!

blaggacao avatar Jul 18 '24 09:07 blaggacao

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.

blaggacao avatar Jul 18 '24 10:07 blaggacao