Scripting changes in upcoming Picard 2.3

Tags: #<Tag:0x00007f00c2ea18d8> #<Tag:0x00007f00c2ea17c0>

This is just a heads up as we will be releasing a beta for Picard 2.3 soon. With the upcoming Picard 2.3 release we have fixed some scripting functions that are supposed to be used as conditions but behaved differently then other similar functions. This affects $is_complete(), $startswith() and $endswith().

You always could use other conditional checks like for example $in() like this:

$if($in(%var%,text),...)
$if($not($in(%var%,text)),...)

But for $startswith() this did not work, you had to use $eq() to check if it returned 1 or 0:

$if($eq($startswith(%var%,text),1),...)
$if($eq($startswith(%var%,text),0),...)

This inconsistency has now been addressed and in Picard 2.3 you can use $startswith() as expected:

$if($startswith(%var%,text),...)
$if($not($startswith(%var%,text)),...)

The same is now true for $endswith() and $is_complete(). Please check your scripts after you have upgraded to Picard 2.3 and replace these calls:

$eq($is_complete(),1)
$eq($is_complete(),0)
$eq($startswith(%var%,text),1)
$eq($startswith(%var%,text),0)
$eq($endswith(%var%,text),1)
$eq($endswith(%var%,text),0)

with their new variant:

$is_complete()
$not($is_complete())
$startswith(%var%,text)
$not($startswith(%var%,text))
$endswith(%var%,text)
$not($endswith(%var%,text))
7 Likes