Storing Files in SIL Manager

Organizing scripts in the SIL Manager is one of those things that everyone does wrong when they first start using the tools. Assume that you will end up with hundreds of script because you are so fond of all the magical things they can do to save you time that you keep creating them because you can’t get enough of them (usually happens). Realizing that you should have been more organized only after you gave hundreds of script can be too late since various settings are pointed to the script in it’s current location. Use these simple tips from the start and you could save yourself a lot of headache in the future.

Naming Conventions

Do

  • Name the files something meaningful. The number of scripts in the silprograms folder will build up over time. It is not recommended to name files something ambiguous like "script1.sil". Once you have dozens of scripts you will not be able to identify what the purpose of the script is. Instead, name the file something meaningful like "userstoryPostFunction.sil".

  • Use folders. Keeping scripts organized in folders makes finding them later much easier. See below for recommended organization methods.

  • Use a file extension. While not required it is possible to different types of files in the silprograms folder other than SIL scripts. The recommended file extensions are:

    • For SIL scripts: .sil

    • Text files: .txt

    • CSV data files: .csv

    • JavaScript files: .js

  • Use Camel Case. Using camelCase is a good way to keep file names short yet readable.

Don't

  • Don't add a version number to the "good" or working copy of the script. Adding a version number to the working copy of the script requires you to modify the workflow, listener, etc., to use the script with the latest version. Instead, use version numbers on the old versions of the script. The working copy can have something like "latest" in the name to indicate that it is the most recent version. Example:

    • userstoryPostFunction_latest.sil

    • userstoryPostFunction_v1.sil

    • userstoryPostFunction_v2.sil

    • userstoryPostFunction_v3.sil

  • Do not use spaces in the file or folder names. While spaces are allowed it can cause difficulty when using file paths with spaces in them. Spaces can be substituted with underscores.

Folders

Before creating scripts in the SIL manager you should have a general plan on how to organize the files in folders. In general, there are two main schools of thought into organizing files in the SIL Manager:

  1. Organize scripts by script type

  2. Organize scripts by use or by project

Script Type

Most scripts are designed to be applied in a specific way, as part of a workflow for example. By organizing scripts by type it is an easy way to locate the script. This would be preferred way since scripts can be applied multiple projects but are typically applied using a single method.

Example:

  • Calls

  • Custom_Fields

  • Includes

  • Javascript

  • JQL

  • Listeners

  • Live_Fields

  • Runner_Gadget

    • Param_Scripts

  • Scheduled_Services

  • Workflows

    • Conditions

    • Validators

    • Postfunctions

Project

You are not limited to a single method. In this example the scripts are organized by project at the highest level then type in the next level of the hierarchy.

Example:

  • Project_A

    • Workflows

      • Conditions

      • Validators

      • Postfunctions

  • Project_B

    • Listeners

    • Live_Fields

  • Project_C