techservicesillinois / ticket-assister

Ticket Assister: Helping you work TeamDynamix tickets more efficiently
Other
0 stars 0 forks source link

Assign hotkey broken #37

Closed ekcom closed 10 months ago

ekcom commented 10 months ago

The assign hotkey feature is broken.

Steps to reproduce:

  1. Enable the hotkeys option
  2. Open any ticket
  3. Press "a" to open the assign dialog
    • The opened popup URL is like https://help.uillinois.edu/SBTDNext/Apps/40/Tickets/TicketReassign?TicketID=XXXXXX when it should be like https://help.uillinois.edu/TDNext/Apps/40/Tickets/TicketReassign?TicketID=XXXXXX
ekcom commented 10 months ago

The relevant code in hotkeyRules.ts is using TICKETS_BASE_URL, which should to be TDNext (not SBTDNext) since the rules are running on the proper pages.

Upon further investigation, the content scripts appear to have been passed an incorrect process.env.NODE_ENV while the main build (pages, service worker) receives the proper env vars.

See https://vitejs.dev/guide/env-and-mode.html

ekcom commented 10 months ago

Resolved in #37