Welcome to TamperMonkey Scripts for Newcastle University.
For use with the NUSERVICE - helps to create new incidents and Service Requests quickly and easily
What is needed to use the scripts
- Install the TamperMonkey extension in your Google Chrome Browser
- Create a GitHub Account
- Fork my TamperMonkey scripts into your GitHub account (see help (2) below)
- Download GitHub Desktop Application and install it on your desktop
- Edit HeaderDetails.user.js to reflect your own details (See help (5) below)
- Download the forked copy of my TamperMonkey Scripts to the Desktop application (see help (3) below)
- Now in TamperMonkey go to Dashboard/Utilities and import from the GitHub location on you Desktop, this need the extension to be allowed to access URLs. If this hasn't been enabled go into extensions and check the box against the TamperMonkey Extension to allow this.
- Type the following in the URL prompt File://H:/GitHub/TamperMonkey/setUpButtons.user.js (this is the default desktop app local folder location for GitHub repositories). If you're having problems importing check the TamperMonkey Extension setup allows the access of URLs.
- You now should have an option to install the script - go ahead and click the Install button
- The last thing you need to do now is change the path to the Header Details file you edited earlier. Do this by selecting Dashboard/Installed userscripts and click on the script that has now been installed. The script has header details at the top of it and you need to change the path to the following... ( see help (1) below)
1. Change this path in the setUpButtons script
// @require https://raw.githubusercontent.com/ibettison/tamperMonkey/master/headerDetails.user.js to // @require https://raw.githubusercontent.com/{yourGitHubId}/tamperMonkey/master/headerDetails.user.js
2. Fork - I thought that was something to eat with
A fork in GitHub terms is basically making a copy of a repository into your GitHub account. Click on the FORK button when you are in my account (TamperMonkey)
You now have a copy of the TamperMonkey Scripts and should now download it to the GitHub desktop application. (see help below)
3. How can I download the repository to my computer
Firstly you have to have the GitHub Desktop Application installed on your computer. GitHub knows that this has been installed and creates an icon inside your version of the TamperMonkey Scripts repository. Make sure you are viewing your TamperMonkey repository and click the download button. This copies the repository contents to your computer and should copy it to the default location on your H: drive - H:\GitHub\TamperMonkey.
4. How do I keep the script up to date
Ok! If I make any changes to the code and upload them to GitHub your script will automatically update without any need for you to do anything. Just check the Script Update settings in settings and make sure the check interval is NOT set to 'Never'.
5. How do I change the Header Details
You need to go into GitHub on the internet and select the file headerDetails.user.js, there is a pencil icon at the top of the viewing window that allows you to edit the file. To save the file you need to type a description as to why the file was changed then you can click the Commit Changes button.
6. I've made additional changes to the Header Details but they're not showing when I add a Canned Answer
TamperMonkey Caches the external files it uses within the scripts and you need to change a setting in the Settings options to make TamperMonkey re-cache the external Header Details file. In Settings find the Externals option and change the setting to 'Always'.
Run the script once then change this setting back to 'Every Week' or 'Every Month' or 'Never' the Externals will only change if you change the Header Details.
7. Everything is working but how do I use the script in NUService
The script runs on two pages within NUService, the new Incident page and the new Service Request page; it is obvious that the script is running on these pages because new web form objects are shown in the content header location.
7.1 Default Button
Pressing the default button, as it may suggest, fills out some of the fields with default information; which it gets from the header details file. The list of default information for a new Incident is as follows:
- Raise User
- Suggested Group
- Impact
- Urgency
- Response Level
- Location
- Ticket Source
For a new Service Request the default Information is as follows:
- Raise User
- Impact
- Urgency
- Response Level
- Location
- Ticket Source
NB: There is a requirement to press the Default button a number of times. This is because some of the drop down boxes are populated in real time depending on the values of other drop down boxes. (Press the default button 3 times with a pause in between)
7.2 Assign to me and Resolve on Creation check-boxes
These are just toggle buttons for the check-boxes inside the form. They allow for easier selection, as you don't have to go searching the form for them.
7.3 Select a canned Answer drop down box
There are two types of canned Answers - i)Default and your own ii) saved canned answers, which I'll get onto in a minute. A canned answer contains a Summary and Description that is typed into a commonly created ticket, an example of which is the requirement for 'Guest Wireless Access' or the creation of a new user Id; the process is the same pretty much every time.
Selecting any of the canned answers in the list automatically copies the summary and description into the fields but it also adds other data into the following fields for the new Incident and the new Service Request.
Adding a canned answer to a new Incident also adds data to the fields:
- Incident Category Level 1
- Incident Category Level 2
- Suggested Group
Adding a canned answer to a new Service Request also adds data to the fields:
- Request Type
- Service Item
NB: Again as the drop-downs take time to populate with the correct data you will need to click the Select a canned Answer drop down a number of times with a slight pause between to add the information to the form drop-down fields (3 times should do it)
These DEFAULT values are entered in the Header Details and can be changed if you want to have something different as your default canned Answers, but there is no need to as you can create your own canned answers as eluded to earlier. Let me show you!
7.4 The New Canned Answer ^ button
Clicking the button opens up a form where you can add the information needed to create a new canned answer. The script knows which page you have open and will prompt you for the information required for a new Incident or a new Service Request canned answer. Entering the details and an optional '<<Add Signature>>' variable, which uses the Header Details file to create a signature on the fly and adds it to your new canned answer, then saving the details; creates a new canned answer. This will be available every time you use NUService unless of course you delete the canned answer and I'm going to discuss this in a second.
Copying
Copying entered details is possible by clicking the 'Copy' button. This as it suggests, copies the values in the normal form into the Canned Answers form and allows you to then save the details as described before.
NB: clicking the 'New Canned Answer ^' button again closes the form
Deleting
If you right click the 'New Canned Answer ^' button it's function changes and displays a new button 'Delete Canned Answer ^'. Left clicking this button shows a new form allowing you to remove any canned answers you have no more use for. Select the check-box by the side of the canned answer you want to delete and it will be deleted when you press the 'Delete' button.
NB: clicking the 'Delete Canned Answer ^' button again closes the form
I hope this script is of some help to you by making it a little easier to enter tiresome tickets. Of course, if you have any suggestions or helpful advice; please tweet them to me @ibettison.
Many thanks,
Ian.