Originally asked by Stephen Atkinson on 08 September 2020 (original question)
Reading the source of CustomFieldSync.groovy you define a number of Closurers for handling Errors
Closure<com.exalate.basic.domain.hubobject.v1.BasicHubCustomField> onNoCfFound,
Closure<com.exalate.basic.domain.hubobject.v1.BasicHubCustomField> onCfContextMismatch,
Closure<com.exalate.basic.domain.hubobject.v1.BasicHubOption> onNoOptionFound,
Closure<com.exalate.basic.domain.hubobject.v1.BasicHubUser> onNoUserFound,
Closure<com.exalate.basic.domain.hubobject.v1.BasicHubVersion> onNoVersionFound,
Do you have any examples of creating a closure for determining how to create the custom field for you if it does not exist?
You have a great example here for nfeed (https://docs.idalko.com/exalate/display/ED/How+to+sync+nfeed+fields+when+key+values+are+different) that can fetch the values required to populate the custom field.
Can this be expanded for singleselect, multiselect and cascadeselect custom fields?
You also have onNoUserFound Closure but this isn’t propogated to the CreateIssue.groovy and UpdateIssue.groovy scripts so it isn’t much use for creating (essentially non active) users.