Sample").get(0)
Long tgngCustomFieldId = tgngCustomField.getIdAsLong()
ApplicationUser user = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
// Get GridService
PluginAccessor pluginAccessor = ComponentAccessor.getPluginAccessor()
Class apiServiceClass = pluginAccessor.getClassLoader().findClass("com.idalko.tgng.jira.server.api.GridService")
def gridService = ComponentAccessor.getOSGiComponentInstanceOfType(apiServiceClass)
// Add a row
// Only "key" is required for userlist columns
gridService.addRows(issueId, tgngCustomFieldId, user, [
["jsummary": "Buy groceries", "jassignee": ["key": user.getKey()], "jstatus": "Open"],
["jsummary": "Plan vacation", "jassignee": ["key": user.getKey()], "jstatus": "In Progress"]
]) |