1
0
-1



We have a two way synch with one of our customers, both using JIRA Cloud. We have been using this for some months, and it’s mostly been a success. However we have some issues.


  1. When it comes to the field “Request Type” they want us to send them a default of “How To”. Your documentation https://docs.exalate.com/docs/jira-cloud-how-to-sync-customer-request-type-field-in-jira-service-desk states:


replica.customFields."Request Type"   = issue.customFields."Request Type"


However, what we are trying to achieve is something on the lines of

replica.customFields."Request Type" = “How To”.


I tried all these and many more:


replica.customFields.requestTypeName.value="How To"

replica.customFields."Customer Request Type".value = "How To"

replica.customFields."Request Type"   = "How To"



  1. Similarly, on our end we have the Statuses of “Done” and “Closed” but they only have “Done”.

I tried:


if (issue.status.name == "Closed") {

  issue.status.name = "Done"

{color:black}}

replica.status  = issue.status


But it doesn’t work.

Is it possible to achieve this?


Regards.

  1. Javier Pozuelo

    Hello,


    The answer given by Thorsten works, but what's the intended use of the following {color:black}? It's placed incorrectly and does not have any function in this context. Color formatting is not supported in all text fields, which field are you trying to modify its color to black?

CommentAdd your comment...

1 answer

  1.  
    1
    0
    -1

    Hi Harold,


    for the default request type try this:

    if (replica.customFields."Request Type") { 
       issue.customFields."Request Type".value = replica.customFields."Request Type".value ?: "How To" 
    }


    for the issue states try this:

    if (replica.status.name == "Closed") { 
       issue.setStatus("Done")
       {color:black}}
    }

    regarding the color, I've never used this and I'm not sure if this works.


    BR,

    Thorsten

      CommentAdd your comment...