Availability
This routine is available starting with Power Scripts 3.0.10
Syntax
runnerLog(message)
or
runnerLog(message, percent, action)
Description
Puts the message 'message' on the console of a runner gadget. This is a special routine making sense only in Power Scripts for Jira/SIL Excel Reporting and only for the runner. The use of it has no effect whatever besides for the runner.
Starting with Power Scripts for Jira 3.0.10, runnerLog routine can also render a progress bar by specifying the percent we want to be set.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
message | string | Yes | Specifies the message to be put on the runner console |
percent | number | No | Specifies the percent to be updated on the progress bar |
action | string | No | Specifies the action to be executed (so far, the only action considered is init_progressBar - to initialize the progress bar; everything else will be ignored) |
Return type
string, can be always ignored
Example
The scripts would look like below:
date start_date = gadget_getDateValue(argv, "Start Date"); string tanks = gadget_getSingleValue(argv, "Tanks"); string infantry = gadget_getSingleValue(argv, "Infantry"); string rockets = gadget_getMultiValues(argv, "Rockets"); runnerLog("Preparing to start a war...", 0, "init_progressBar"); runnerLog("The war will start at this date: " + start_date, 10); runnerLog("Building tanks..."); runnerLog("Built " + tanks + " tanks.", 30); runnerLog("Gathering infantry..."); runnerLog("Gathered " + infantry + " brave men.", 60); runnerLog("Fueling rockets..."); runnerLog(rockets + " ready.", 90); runnerLog("Dispatching orders...", 100); return "Good job! The world is now at war!";
gadget_createDatePicker("Start Date", currentDate(), true, "Choose a start date"); gadget_createInput("Tanks", "500", true, "The number of tanks"); gadget_createInput("Infantry", "1600", true, "The number of tanks"); gadget_createCheckboxGroup("Rockets", {"A big one", "A lot of small ones"}, "", false, "Do you want to use rockets?");
In this case, using the new runnerLog routine, when the script execution is done, the runner will look like this: