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

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 Wednesday in Marketplace Apps

Marketplace Spotlight: Marketing apps for Confluence to keep your teams working on the same page

                                                      &nbsp...

182 views 0 4
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