Hi, i use jira 7. I wrote the script:
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
CR = issue.getCreatorId()
App_cr = ComponentAccessor.getUserManager().getUserByName(CR)
Gr_cr = GroupManager.isUserInGroup(App_cr,"DIT")
But i have error
root cause: Traceback (most recent call last): File "<string>", line 13, in <module> TypeError: isUserInGroup(): expected 3 args; got 2
According to the documentation, only two parameters are passed to the input
This should help:
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
grm = ComponentAccessor.getGroupManager()
CR = issue.getCreator()
GR = grm.getGroup("DIT")
Gr_cr = grm.isUserInGroup(CR,GR)
Regards,
Shaakunthala
At the American Academy of Family Physicians, siloed marketing teams faced delays and duplicate work. Kerrie Gottschalk shook things up by moving the department to Jira, streamlining processes, boosting visibility, and sparking stronger collaboration.
Read the story
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.