...
- Go to Administration >> Plugins >> Kepler General Parameters
- Go to SIL Manager tab
- Create a new SIL script named "Lock.sil" :by clicking on the Show Unused button.
- Select the folder you prefer and click New. Choose File and enter the "Lock.sil" name.
- Enter the following code in the ""Lock.sil":
Code Block |
---|
if (length(customfield_10304) != 0 && customfield_10304 != currentUser()) { lfDialogMessage("Somebody else is editing this issue.", "WARNING"); lfDisable("issueType"); lfDisable("priority"); lfDisable("affectedVersions"); lfDisable("status"); lfDisable("resolution"); lfDisable("summary"); lfDisable("fixVersions"); lfDisable("assignee"); lfDisable("reporter"); lfDisable("created"); lfDisable("updated"); lfDisable("labels"); lfDisable("editSubmit"); lfDisable("transitionSubmit"); lfExecuteJS("ScriptHide.js"); } lfWatch("customfield_10304", {"customfield_10304"}, "disable.sil"); lfWatch("edit-issue", {}, "disable.sil","click"); |
...
The rowForcustomfield_10300 element represents the custom field ID for the Blitz-Action Custom Field you have created in the First Step. In fact you only have to replace the number with the ID you have.
- Add the first SIL script as a hook on the project you desire.
- Go to Live Fields tab.
- Add a new configuration by clicking the "Add configuration" button.
- Name it whatever you like.
- Add the Lock.sil script you have just created on the SIL File box.
- Press Add button.
- Associate this configuration by pressing the Associate link.
- Select your desired project and click the Associate button.
This is all. You can now test it by opening two different sessions with two different users and try the lock and unlock buttons .