Stories #138 Track broken equipment & #139 Notify members of broken equipment. - cseseniordesign/reservations GitHub Wiki

End User Documentation

Dev Testing Instructions

  1. If on a dev (local host) environment (i.e. not staging or production), make sure you are using the UNL VPN. This is necessary for emails to send properly. NOTE: several IP addresses have been blocked from sending emails. As of this page’s creation, the “US South” server works for me. However, it is entirely possible that none of the VPN servers will allow the sending of emails. In this case, testing must occur on the staging/production environment.
  2. Ensure you are on the most recent version of the dev-track-broken-equipment-and-notify-impacted-members branch.
  3. Start your dev environment and log in with the account associated with your email address.
  4. Ensure you have the required permissions:
    1. Go to Admin > Users.
    2. Find yourself and click Edit.
    3. Make sure all the boxes under Manager Permissions and Make Super User are checked. Click Update.
  5. Navigate to the Reserve Equipment tab.
  6. Find a tool you wish to reserve but do not reserve it yet.
  7. In a new tab, navigate to Admin > Tools.
  8. Ensure the tool you wish to reserve does not have its corresponding INOP box checked. If it does, uncheck it and click the Update Tools INOP Statuses box at the bottom of the page.
  9. Go back to the Reserve Equipment tab you previously opened and reserve the tool for any date in the future.
  10. Go back to Admin > Tools and check the INOP box for the tool you reserved. Click the Update Tools INOP Statuses box at the bottom of the page.
  11. You should receive an email at the address you have listed on your My Account page.
  12. Verify the event is no longer listed under My Reservations on your Manage Your Studio (home) page.
  13. Navigate to the Events tab under Admin.
  14. Click New Event from Preset
  15. Verify the tool you marked as INOP is not displayed in the reservable tools boxes.
  16. Navigate to the Reserve Equipment tab.
  17. Find the tool that you marked as INOP and try to reserve the tool. A message should be displayed telling you the tool is “Currently unavailable due to service.”

Production Testing Instructions

  1. Go to https://innovationstudio-manager.unl.edu/home/
  2. Log in as an admin user, then follow steps 4-17 from the dev testing instructions above.

Technical Documentation

routes/admin/tools.rb

  • Changes within the POST /admin/tools/? action:
    • Update tool INOP status.
    • Added code to automatically email users when they have a future reservation on a tool that has newly been marked as INOP.

new_schema.sql

  • Included SQL script to add INOP column to resources table.

views/admin/tools.erb

  • Added the INOP column to the tools table with a checkbox for each tool.
  • Added the "Update Tools INOP Statuses" button.

views/admin/new_event.erb

  • Added check to see if tools are INOP and the ability to not display them if they are.

views/reserve.erb

  • Added a message that tool is currently out of service if the tool is INOP.
  • Prevents the submit button from showing so the user cannot reserve the tool if it is INOP.

models/user.rb

  • Added an email model to be used when notifying users of broken equipment.

routes/tools.rb

  • Fixed a typo in the success message after creating a reservation.