lundi 26 juillet 2021

Jelly script

All, Simply, I need to compare two strings within a jelly script and if they are not the same, I want to update one string with the other value. Simply, I'd like something like this:

     <j:if test="${currentTestName} != ${trTest_Name_Pass}">
         <j:set var="currentTestName" value="${trTest_Name_Pass}"/>
     </j:if>

I've tried various test conditions such as

     <j:if test="!( ${currentTestName.equals('${trTest_Name_Pass}')} )">
         <j:set var="currentTestName" value="${trTest_Name_Pass}"/>
     </j:if>

and some other combinations, but I'm stymied to see how to compare the strings. I've done a fair amount of searching, but have not hit on a solution. Maybe Jelly does not support this. In any case, apologies if this has been addressed elsewhere, but I seemed to have missed it, if it was.

Thanks in advance for any thoughts. -- JC

Aucun commentaire:

Enregistrer un commentaire