If the component field is not mandatory in the request type, it works fine. Components are created if not found and if found used on the issue.
The error is thrown from Jira itself since the error message is in Norwegian and is of type: Blocked, cant create issue because no value found in a mandatory field. However as stated, the replica issue has components.
Also, if I ‘comment out’ the request type line in the script, the issue is created and the components attached. I can then manually set the request type in the issue.
I would like the issue to be ready formated as the request type as if the issue was creaded in the portal
Answer by Francis Martens (Exalate) on 04 November 2020
Can you check that issue.components has components set using
throw new Exception("The components are ${issue.components.properties}")
This will throw an error and provide you a hint if components have been set.
Comments:
Asle Kristian Andersen commented on 04 November 2020
This is the error caught.
Francis Martens (Exalate) commented on 05 November 2020
Thats indeed the exception to be expected.
Can you further check if the first element is set correctly and continue to poke around until you find the root cause.
Asle Kristian Andersen commented on 12 November 2020
It seems the only reason the error happens is, if components is a mandatory field on the Request Type. I have changed it back and forth and have additional text fields as mandatory whithout it throwing an error. Only when components is set as mandatory is the issue stopped in the sync.
Is this something you can replicate in your test systems?
Juan Grases commented on 12 November 2020
Hi!
Actually this is a missing feature on Jira Cloud but we have already a fix for it, it will be released soon. For now, Could you provide to us your Jira Cloud URL, so I can deploy this fix to you?
Best regards,
Juan
Asle Kristian Andersen commented on 12 November 2020