from com atlassian jira import ComponentManager from com atlassian jir

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from com.atlassian.jira import ComponentManager
from com.atlassian.jira.component import ComponentAccessor
customFieldManager = ComponentManager.getInstance().getCustomFieldManager()
issueManager = ComponentAccessor.getIssueManager()
candidate_issue = issueManager.getIssueObject('HR-11843')
cfCascade = customFieldManager.getCustomFieldObject(10129)
Cascade = candidate_issue.getCustomFieldValue(cfCascade)
cfsaname = customFieldManager.getCustomFieldObject(10900)
facesAssignee = { u"Games": u"o.shpilchevskiy@mail.msk",
u"Email&Portal": u"antigona",
u"Search&E-commerce": u"gabrelyan",
u"Технический департамент": u"gabrelyan",
u"Instant Messengers": u"yermakov",
u"Одноклассники": u"anton.fedchin@mail.msk",
u"Рекламные сервисы": u"dmitry.zevelev@mail.msk",
u"Орг. Развитие": u"e.malikov@mail.msk",
u"Финансовый": u"f.rubtsov@mail.msk"
}
candidate_issue.setCustomFieldValue(cfsaname, facesAssignee[Cascade])