did someone encounter this problem ? Apparently this is some new error:
Could not create an work item with type `Service Ticket` on project `XXX`: Unable to create request because of these errors : Field with id ‘priority’ named ‘Priority’ has these errors : Specify the Priority (name) in the string format.
What i have tried, and in the past it worked:
def priorityMapping = [
// remote side priority <-> local side priority
"Critical" : "Critical",
"Major" : "Major",
"Minor" : "Minor",
"Trivial" : "Trivial"
\]
def priorityName = priorityMapping[replica.priority?.name] ?: “Minor” // set default priority in case the proper urgency could not be found
Hi! Thanks for reaching out. Could you please clarify your question or provide more details about what you’re looking to achieve with Exalate? This will help me point you in the right direction or provide the most relevant information.
The error suggests that the receiving system expects the Priority field to be set using a string value (the name of the priority), not an object or ID.
The nodeHelper.getPriority() function returns a Priority object, which works for some Jira configurations, but some systems (especially Jira Service Management or Azure DevOps) require the priority to be set as a string (the name of the priority).
Funny enough, it requires a string, and then it complains about it:
Error Detail Message:
Illegal argument type class java.lang.String for setPriority
com.exalate.api.exception.script.ScriptException: Illegal argument type class java.lang.String for setPriority at com.exalate.error.services.ScriptExceptionCategoryService.categorizeProcessorAndIssueTrackerExceptionsIntoScriptExceptions(ScriptExceptionCategoryService.scala:51) at com.exalate.processor.ExalateProcessor.executeProcessor(ExalateProcessor.java:77) at com.exalate.replication.services.processor.CreateIssueProcessor.$anonfun$executeScriptRules$1(CreateIssueProcessor.scala:221) at scala.util.Try$.apply(Try.scala:210) at com.exalate.replication.services.processor.CreateIssueProcessor.executeScriptRules(CreateIssueProcessor.scala:213) at com.exalate.replication.services.processor.CreateIssueProcessor.$anonfun$createIssue$1(CreateIssueProcessor.scala:119) at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:470) at akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:63) at akka.dispatch.BatchingExecutor$BlockableBatch.$anonfun$run$1(BatchingExecutor.scala:100) at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18) at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:94) at akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:100) at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:49) at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(ForkJoinExecutorConfigurator.scala:48) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) Caused by: javax.script.ScriptException: javax.script.ScriptException: java.lang.IllegalArgumentException: Illegal argument type class java.lang.String for setPriority at