2
1
0

Jira Service Desk Cloud: 


I have some issues with setting the request type in the incoming script when components is a required field in the request type portal schema. 

issue.customFields."Request Type".value =  "Feil på utstyr i transportmiddel" 

 The incoming issue has components in the payload and this is the code I have to deal with components: 

issue.components   = replica.components.collect
{
    component -> nodeHelper.createComponent(
        issue,
        component.name,
        component.description,
        null,
        "PROJECT_DEFAULT"
    )
}

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 (smile) 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

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      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.

      1. Asle Kristian Andersen

        This is the error caught. 

      2. Francis Martens (Exalate)

        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.  


      3. Asle Kristian Andersen

        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? 

      4. Juan Grases

        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

      5. Juan Grases

        I have upgraded your instances, could you check if you still have the same problem?

      6. Asle Kristian Andersen

        Initial testing seems that the update was a success.

        We will make changes to all instances and connections where this is used. 

      CommentAdd your comment...