Bug 996165 - [RFE] Notify system owner when a system is loaned or returned
Summary: [RFE] Notify system owner when a system is loaned or returned
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: general
Version: 0.14
Hardware: All
OS: All
medium
medium
Target Milestone: 25.0
Assignee: Dan Callaghan
QA Contact: Roman Joost
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-12 14:35 UTC by Arthur Benoit
Modified: 2024-04-08 10:40 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-03-19 04:19:17 UTC
Embargoed:


Attachments (Terms of Use)

Description Arthur Benoit 2013-08-12 14:35:50 UTC
Description of problem:
Returned System loans should send a messages to the Request Tracker (RT) when system loans are set and released. Currently if users set or release loans there is no Request Tracker notification of granting or returning system loans. 

Loan tracking is currently a manual task and often results in tickets being held open far longer than required. Requests require the manual effort of the owner of the ticket checking the status of the loan in beaker then updating the RT. Adding this feature would make the loan process far more efficient.

To implement it would require adding a field to the loan dialog window (RT ID#) which would allow the ability to collect the RT ID# of the requested loan. When filled in it would trigger the sending of an e-mail updating the RT with a notice (with a canned reminder to return the system as soon as possible) that the loan had been granted. Once the loan has been set, the action of releasing it would trigger a second e-mail updating the RT with a notice that the system was returned. 

Version-Release number of selected component (if applicable):
Version - 0.14.1

Comment 2 Nick Coghlan 2013-08-12 20:52:12 UTC
Beaker will not be directly integrated with an external service like Request Tracker. The improved Access Policies mechanism currently being implemented (http://beaker-project.org/dev/proposals/access-policies-for-systems.html#proposal-access-policies) should allow an independent service to manipulate Beaker loans on behalf of the system owner (as well as updating an external service like RT of the change).

Comment 3 Arthur Benoit 2013-08-12 21:06:07 UTC
Nick,
Beaker can currently send e-mail notices. I don't see any integration work that needs to be done to complete this request. Do you see any need for additional work to integrate the two products?

Thanks,
Arthur

Comment 4 Nick Coghlan 2013-08-12 21:26:13 UTC
We'd have to add the storage for the ticket ID, configuration settings for where to send the email, formatting code to create the email. It's all specific to the way a particular Beaker installation is used, and out of scope for the upstream project.

However, while we won't add direct integration, feel free to contact the Beaker development list about how we could help improve the situation without altering Beaker itself. For example, it seems to me it should be possible to write a cron job that monitors the system history for loan grants and returns (we'd just have to keep an eye on the query used to ensure it didn't hit the database server too hard).

This may lead to the definition of a new "supported query", which would be a separate RFE (but one that's easy to add - it's just an SQL file and a test to ensure it continues to return the expected answer as Beaker evolves).

Comment 5 Nick Coghlan 2013-08-12 21:28:38 UTC
Note that there's also a longer term plan to have a request management capability in Beaker itself, for both group membership and system loans. However, there's no ETA for that, so helping to define an external cron job to update a ticketing system seems like a better near term approach.

Comment 6 Nick Coghlan 2013-08-14 19:57:20 UTC
Arthur clarified his request to indicate that simply emailing the system owner when the system was loaned or returned would suffice. That's a different question from adding a custom issue tracker field, so retitling and reopening this.

Comment 7 Dan Callaghan 2017-12-21 05:43:40 UTC
Now that we have notification preferences, we could add this as a new notification type which will default to *off* for all users. Users could opt into it as desired.

Also, I assume we would not want to send the notification when the user themselves issues the loan -- this would only be for the case where the system permissions allow other people to lend/borrow the system. We notify the owner when somebody *else* has loaned or returned the system.

Comment 8 Dan Callaghan 2017-12-21 06:41:47 UTC
https://gerrit.beaker-project.org/5965

Comment 10 Roman Joost 2018-02-12 05:59:12 UTC
Tested this in my local environment with: beaker-server 25.0.git.203.08fe7cd7a

* I've created a new user rjoost
* all systems are owned by admin
* preferences for admin have checked: System automatically marked broken 

Scenario 1: Owner of the system performs a loan/return action will not be notified of it's own actions.

1) Logged into the WebUI as admin
2) Under loan, lend the system to user 'rjoost'
3) No mail has been sent to admin

Scenario 2: Borrower returns system to owner which wants to be notified

1) Logged into the WebUI as rjoost
2) Under loan click "Return Loan"
3) Owner 'admin' received an email with "System beaker-test-vm1 loan returned" as a subject.

Comment 11 Roman Joost 2018-03-19 04:19:17 UTC
Beaker 25.0 has been released.

Release notes are available upstream: https://beaker-project.org/docs/whats-new/release-25.html

Comment 12 JakStrong 2024-04-08 10:40:17 UTC
Let’s not forget that it is really hard to work on a system that is connected with loans. I was spending a lot of time just to make a project where people could easily take cash from and earn some from the app. I spend some time on fixing different bugs and people send me some reports that they were not able to loan money via my system. You can try this out here https://apps.apple.com/us/app/personal-loan-for-bad-credit/id6449185223 and send some reports to me if you would have problems with getting a loan.


Note You need to log in before you can comment on or make changes to this bug.