Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.