-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsnow.bat
43 lines (36 loc) · 1.09 KB
/
snow.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
@ECHO OFF
REM To use this script:
REM 1) Create C:\Shortcuts and add it to the system path
REM 2) Copy this script to C:\Shortcuts
REM 3) Change the URLBASE variable to your Atlassian organization name
REM 4) Type "Win+R" and "snow" or "snow [change request number]"
REM THIS WORKS:
REM https://company.service-now.com/nav_to.do?uri=%2Fchange_request.do%3Fsysparm_query%3Dnumber%3DCHG0192129
REM THIS WORKS FOR CHANGE TASKS / CTASKS:
REM https://company.service-now.com/nav_to.do?uri=%2Fchange_task.do%3Fsysparm_query%3Dnumber%3DCTASK0356139
REM SET URLBASE=https://company.service-now.com
SET URLBASE=%SERVICENOWURL%
SET DEFAULTPAGE=nav_to.do?uri=%2Fhome.do%3F
IF '%1'=='-?' GOTO :HELP
IF '%1'=='/?' GOTO :HELP
IF '%1'=='?' GOTO :HELP
IF NOT '%1'=='' GOTO :OPENTICKET
GOTO :OPENHOME
:HELP
ECHO snow ([change request number])
ECHO Examples:
ECHO snow
ECHO snow CHG0192129
GOTO :EXIT
:OPENTICKET
SET TICKET=%1
SET URL="%URLBASE%/nav_to.do?uri=%%2Fchange_request.do%%3Fsysparm_query=number%%3D%TICKET%"
START "" %URL%
GOTO :EXIT
:OPENHOME
START %URLBASE%
REM /%DEFAULTPAGE%
GOTO :EXIT
:EXIT
REM PAUSE
EXIT