post function Expression

Hi, i have a code in the post function, condition "if Is1 == 'ABIS Colvir':" work only expressions in Latin...

If we write the condition in Russian, then it does not hold, Example

"if Is1 == 'АБИС':"

what could be the problem?

 

from com.atlassian.jira.component import ComponentAccessor
from com.atlassian.jira.issue import CustomFieldManager
from com.atlassian.crowd.embedded.api import User
from com.atlassian.jira.issue import Issue
from com.atlassian.jira.issue import MutableIssue
from com.atlassian.jira.issue import IssueManager
from com.atlassian.jira.security.groups import GroupManager
from com.atlassian.jira.security.roles.actor import UserRoleActorFactory

customFieldManager = ComponentAccessor.getCustomFieldManager()
customField = customFieldManager.getCustomFieldObject("customfield_10100")
Is1 = issue.getCustomFieldValue(customField).getValue()

Ur_dit = ComponentAccessor.getGroupManager().getUserNamesInGroup("K2_ABIS")

if Is1 == 'ABIS Colvir':
for key in Ur_dit:
issue.setAssigneeId(key)

1 answer

This widget could not be displayed.
Mizan Community Champion Sep 26, 2017 • edited

I tried the below code in script console and it returns true

def sa='АБИС'

if (sa == 'АБИС')
return true

I am not sure but it seems your if needs parenthesis { } .

try some logging and see the values returned by JIRA for the customfield 

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 22, 2018 in Marketplace Apps

How a Marketplace app tech team is achieving gender diversity

Hello! My name is Genevieve Blanch, and I'm the Marketing Manager at RefinedWiki, creators of apps to give teams the tools to customize Atlassian platforms. Currently, 44% of the tech team at Re...

511 views 3 18
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you