Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

Warning

Looking for the documentation on the newest versions of Power Scripts for Jira 8 for Server/Data Center? Click here !

Info
titleAvailability

This routine is available starting with Power Scripts 3.0.10 (server).

Syntax

runnerLog(message)

...

runnerLog(message, percent, action) 

or

runnerLog(message, treatAsHtml) - (since version 4.6.5)

or

runnerLog(message, treatAsHtml, percent) - (since version 4.6.5)


Description

Puts the 'message' message on the console of a runner gadget. This is a special routine only for the Power Scripts for Jira or SIL Excel Reporting and only for the runner. The use of it has no effect in other places besides for the runner.

Note

Starting with Power Scripts for Jira 3.0.10 (server), the runnerLog routine can also render a progress bar by specifying the percent we that you want to be set.

Note

The runnerLog routine can be called in the SIL Manager, but also in the Power Scripts SIL Runner Gadget.


Parameters

ParameterTypeRequiredDescription
messagestringYesSpecifies the message to be put on the runner console
percentnumberNoSpecifies the percent to be updated on the progress bar
actionstringNo

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)

treatAsHtmlbooleanNoSpecifies either to show the message as a string, or treat it and render it in the browser as HTML code. - Since version 4.6.5

Return type

string, can always be ignored

...

Code Block
titleexecution_script.sil
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!";


In this case, using the new runnerLog routine, when the script execution is done, the runner will look like this:

Image Added


Example 2

The following runnerLog routine call:

Code Block
titleparameterhtml_runner_scriptlog.sil
gadget_createDatePickerrunnerLog("Start Date", currentDate(), true, "Choose<font color='red'>This is 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:

...

red text!</font>", true);



Will print a red text in the runner log:

Image Added

See also