Hello all,
I would like to use an automation to copy the organizations from a customer in a custom field. Is there a smart value field for this? Is this possible.
Example:
customer A is in organization xyz
copied
xyz in custom field
You can actually do this in normal automation - we do the same thing - when the value changes we copy the entry from the organisation field into the log and then write that to the custom field, this has helped with integrating this into other non JSM projects
Hi @Torsten Möckel ,
you can do that through a scripted post function provided by Script Runner.
Here the scripted pf code :
def cfMyField = customFieldManager.getCustomFieldObjects(sourceIssue).find {it.name == 'YOUR_FIELD_NAME_HERE'}
def cfOrganization = customFieldManager.getCustomFieldObjects(sourceIssue).find {it.name == 'Organizations'}
def cfOrganizationValue = sourceIssue.getCustomFieldValue(cfOrganization)
if (cfOrganizationValue) {
issue.setCustomFieldValue(cfMyField,cfOrganizationValue.first().name.toString())
}
Hope this helps,
Fabio
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.