We have a CRM database that stores Full Names. We are required to assign tickets based on these values in CRM.
Hence we have a nFeed field that extracts values from database, and this value is then copied to the 'Assignee' field.
But this does not work as we are trying to copy Full Name to 'Assignee' field.
Any ideas/suggestions to make this work?
No. The assignee field is effectively a list of user objects. You need to give it the right user object for it to work. Your nFeed field needs to work from user login ids, not name.
Our organisation uses numerical usernames like z12345 which are not at all user-friendly and hence we are using full names instead.
Will it be possible to copy full name to any other user field if not 'Assignee'? We can then copy it to Assignee.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No. A user field contains a user object, the same way an assignee does.
It's utter nonsense to use something like the user's given name in a user field. It has to be something that uniquely identifies them. In many cases a given name can do that, but it allows for failures, and hence cannot be used.
For example, imagine a Jira system that my family uses. "Nic" is unique in the family. But when my father-in-law Jim uses it, how does the computer know it is him and not his brother in law, Jim, or his cousin, Jim? Even adding a surname won't solve it - they're Jim Barclay, Jim Dart and Jim Barclay
For a user field to work, it must be able to uniquely identify a user. A full name fails that test.
The best you will be able to do is a text field that asks for a name and then tries to work out who it might be in your list of users, so it can populate assignee with the unique id it requires. But you're going to have to do a lot of thinking and coding around how to deal with duplicate names, misspellings and non-matching entries.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am trying to use this script but getting errors:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.CustomFieldManager;
import com.atlassian.jira.issue.Issue;
import com.atlassian.jira.bc.user.search.UserPickerSearchService;
CustomFieldManager customFieldManager = ComponentAccessor.getCustomFieldManager();
def nFeedField = issue.getCustomFieldValue(customFieldManager.getCustomFieldObject("customfield_12345"));
def userPickerSearchService = ComponentAccessor.getComponent(UserPickerSearchService);
def assignee = userPickerSearchService.findUsers("nFeedField[0]);
issue.setAssignee(assignee);
issue.store();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Also is there any equivalent class for "com.atlassian.jira.bc.user.search.UserSearchService" for Jira 6.4.2 ? And also corresponding method for "findUsersByFullName" ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your "def assignee" line is totally wrong, have another look at it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.