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

0 vote
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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

86 views 0 5
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