Confluence has been updated to ver 6.15.9. In case of any troubles, please contact infra team.

Outgoing sync script

 
1
0
-1

Hi,


is it possible to test on a value on a custom field in JIRA Cloud?


If i have a custom field and want to test on value and skip sync if it has a value = No


if (issue.customFields."To TSC".value == "No") return;


Regards


Mikael

    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      Hi Roman,


      the intial condition does not work. The script is run every time, despite the vlalue of the field.


      Regards


      Mikael

      1. Roman

        Mikael Bohlin


        Can you please create a support ticket and attach your support.zip?

      CommentAdd your comment...
    2.  
      1
      0
      -1

      Hey Mikael Bohlin,


       Yes. If you have in your Outgoing Sync

      if (issue.customFields."To TSC".value == "No")
      {
          return;
      }
       else
       {
      replica.key            = issue.key
      replica.type           = issue.type 
      replica.assignee       = issue.assignee 
      replica.reporter       = issue.reporter
      replica.summary        = issue.summary
      replica.description    = issue.description
      replica.labels         = issue.labels
      replica.comments       = issue.comments
      replica.resolution     = issue.resolution
      replica.status         = issue.status
      replica.parentId       = issue.parentId
      replica.priority       = issue.priority
      replica.attachments    = issue.attachments
      replica.project        = issue.project
      }

      it will not send any data if the custom field value is No. Is this what you are trying to achieve? 

        CommentAdd your comment...