I think I can confirm this issue.
I'm not sure if it's a bug or not, but what I have found is that when running this code:
String jira_version = vars.get("jiraVersion");
if (jira_version =="7") ) {
vars.put("closeIssueTitle_local","Done");
vars.put("isJIRA6_local","false");
vars.put("isJIRA7_local","true");
} else if ( jira_version.equals("6") ) {
vars.put("closeIssueTitle_local","Close Issue");
vars.put("isJIRA6_local","true");
vars.put("isJIRA7_local","false");
} else {
vars.put("closeIssueTitle_local","CLOSEISSUETITLE_BEANSHELL_FAILURE");
vars.put("isJIRA6_local","ERROR");
vars.put("isJIRA7_local","ERROR");
}
Where the value of jira_version is either literally 6 or 7, then the if condition always evaluates to it's last, no-match case.
when I change my evaluation condition to
if ( jira_version.equals("6") ) {
then it evaluates as expected.
Here's the rub for me. When I run this in the standalone beanshell environment, bsh-2.0b5.jar for example, it my code example works as expected. It's only within JMeter that I have to rely on .equals("X").
This does feel a bit like a bug.