Hi,
In a project when a issue is created it should be auto assign to a particular group.
Hello @Parsa Mounika
Welcome to the community.
The Assignee field is a User Picker (single select) field. You cannot select a Group in that field.
Assignee should be used to designate the one person responsible for the issue at a given point in time. If you "assign" the issue to a group, then you never know which member of the group is actually responsible for the issue.
Instead I would recommend you use another field for selecting a Group. It has been a while since I worked with Jira Server, so I don't know anymore if it has native functionality to automate setting the field. Do all the issues in the project get assigned to the same group? If so, you should be able to do that as a Post Function in the workflow on the Create transition.
@Parsa Mounika ,
In Jira issue is assigned to Single User Only Not Group.
You can create Select Group field and use that one for your purpose. you can use following script to update that group picker field in the postfunction
import com.atlassian.jira.component.ComponentAccessorimport com.atlassian.jira.issue.CustomFieldManagerimport com.atlassian.jira.issue.Issueimport com.atlassian.jira.issue.ModifiedValueimport com.atlassian.jira.issue.util.DefaultIssueChangeHolderimport com.atlassian.jira.issue.util.IssueChangeHolder//Get Issue ObjectIssue issue = issue //The issue object is internally retrieved in the post-function//Get instance of Custom Field Managerdef customFieldManager = ComponentAccessor.getComponent(CustomFieldManager)//Initialize variables to setup group picker & automation type custom field valuedef groupManager = ComponentAccessor.getGroupManager()def singleGroupCf = customFieldManager.getCustomFieldObject("customfield_12700")def group = groupManager.getGroup(<YOUR JIRA USER GROUP NAME>)List groupList = new ArrayList()groupList.add(group)IssueChangeHolder changeHolder = new DefaultIssueChangeHolder();singleGroupCf.updateValue(null, issue, new ModifiedValue(issue.getCustomFieldValue(singleGroupCf), groupList), changeHolder)issue.store()
Accept the answer if it helps
Hi @Trudy P Claspill
Thanks for the quick response.
Yes all the issues in the project get assigned to the same group. I tried with post function also but when the ticket is IN PROGRESS I can assign it group. But when the ticket is created I can' t assign it group.
Can you provide a screen image of what you are seeing when trying to add the post function to the Create transition.
Can you please tell me how to do using post functions in the workflow on create transition using Assignee group.
Hi @Sachin Dhamale
Thanks for the response.
Can you please suggest a post function for this.
When tickets are created the Assignee = Unassigned and the Assigned Group = I_TRF_CCOD_T3
Above script can be used to update the Assigned Group custom field
def group = groupManager.getGroup(I_TRF_CCOD_T3)// Here you can mention the I_TRF_CCOD_T3 group name
def singleGroupCf = customFieldManager.getCustomFieldObject("customfield_12700") // Here you can mentioned the custom field id of Assigned Group Custom Field
For Assignee = Unassigned - You can use the inbuilt post function called issue field update there you can update assignee field with unassignee.
@Sachin DhamaleThanks for the help. The issue has be resolved.
Just adding my 2-cents here as I think you (Parsa) are in the same boat as we are. I went live with our Jira instance over 4 years ago and we utilized that Team concept - so I created a custom field called "Assignment Group" and also created a jira user work group for every team. Each member of our IT department was a member of one of those groups. Then we had a backend - Scriptrunner listener that listened for issue updates for those 2 particular fields - Assignment Group and Assignee. When one did not match what group they should be part of - it would auto-update so that way the assignment group would always match up to the Team name that the Assignee was a member of. Well fast forward to our last upgrade and that rule concept developed numerous issues that were ghosting issues on certain teams dashboards and filters.
I had to quickly implement another process that would reflect our team concept. Whether this is right or wrong - I still proceeded down this path and it has been working fine for us for over 2 weeks now.
I created an Internal Jira User for each of our 18 teams. The name of each Internal Jira User created is the actual Team name. For notification purposes - every team already has an exchange group email - so we utilized their group email for the internal Jira team name user. I repurposed the Jira User Work Groups for the same teams and made each of the internal Jira team name users members of their respective Jira user work group. On issue transitions that needed to be reassigned to a team - I added a specific transition so that the transition button only displayed the team names. We can also utilize this concept for the auto-assignment of issues from the customer portal customer requests.
So far so good - but I'm sure there are a few cons for proceeding down the path I chose; but none have boiled up as being Major issues thus far.
Hope my idea helps.
I found a solution, please go to this link. Thank me later Solved: Can Automation set the Team field when an issue is... (atlassian.com)
@Amir Ansari
The solution you reference is for Jira Cloud. It does not apply here as this post concerned Jira Server/Data Center.
It looks like you're new here. Sign in or register to get started.