Clickable Link Disguised as a Power Action™ with Live Fields
This recipe assumes :
- You already have a Power Actions™ custom field and an action inside it that you want to convert to a link.
- You have configured Live Fields to work with your project.
It often happens that our customers would like to create a link on the issue that will send the user to a customized page (external systems anyone?). The link will, most probably, be generated based on the user, his/her permissions and other issue data.
For the purpose of this recipe, we'll create a link to Google's homepage, but this can be anything you want (keep in mind, it can be generated conditionally using SIL™).
You will only need to call makeClickableLink at the end of the script for each button you want to convert. The rest of the script can be used as it is. The function takes two parameters:
- the button id. This is the id of the Power Actions™ button. You can retrieve it by looking for the selectedValue parameter in the URL of any of the screens that allow you to edit the SIL™ scripts behind the button. It should be at the very end of the address (for instance /secure/admin/EditBlitzCondition.jspa?[...]selectedValue=10000).
- the field name. This is the field name which will be used with lfSet. Chose any unique name you want for this parameter. For this example, we'll use "goToGoogle".
Place this script in your silprograms folder.
Step 2 - Configure the Initial Script for Live Fields
All you have to do now, is to configure the initial script to run the JS and then set the URL you want.
Don't you love us ?
- Hiding Time-Tracking Information
- Show custom message field based on select list value
- Create a 'Select All' option in a select list
- Hide the comment field during a transition