My name is Hugo Maurício, i work in the company Deloitte.
I have an problem with the custom fields in Service Desk, i want to make a rule using the addon ScriptRunner but when i put in the code,
"cfValues['Customer Request Type '] == 'Marcação de videoconferência'"
It do nothing. What i want is that the email only bee sent when the costumer selecet the request type "Marcação de videoconferência",what is the way to call that block field as it is written on the top?
With recent Service Desk version, "Customer Request Type" value consists in a `project/UUID` string which can be found in database tables AO_54307E_VIEWPORTFORM (key) in relation with AO_54307E_VIEWPORT (key).
SELECT concat(lower(p.pkey),'/',vform.key) as value FROM jiraissue i , project p, issuetype t , AO_54307E_VIEWPORT vport, AO_54307E_VIEWPORTFORM vform WHERE p.id = i.project AND i.issuetype = t.id AND i.project = vport.project_id AND vport.id = vform.viewport_id AND vform.issue_type_id = t.id AND i.id = 'PROJECT-123';
you can extract the UUIDS via scriptrunner script console. If you have an issue with the selected option:
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def issueManager = ComponentAccessor.getIssueManager()
def issueObject = issueManager.getIssueObject("issuekey")
String customFieldId = "customfield_10009"
CustomField customField = customFieldManager.getCustomFieldObject(customFieldId)
String fieldValue = issueObject.getCustomFieldValue(customField)
return "KEY: "+fieldValue
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs