1
0
-1

Hi All

we have a specific use case :

client wants to sync all value in component expect one specific value

Your help will be appreciate


Thanks

    CommentAdd your comment...

    4 answers

    1.  
      1
      0
      -1

      Tomás Martynowicz

      thanks a lot i tried

      replica.components = issue.components.findAll{ component ->
      (component.name != "swan)
      }
      it works perfectly
      thanks a lot
        CommentAdd your comment...
      1.  
        1
        0
        -1

        Hi Salma Nairi,


        What you can do is to filter the components on the outgoing side, using a script like:

        replica.components = issue.components.findAll{ component ->
        (component.name == "tr69" || component.name == "wifi")
        }

        You can also write the same code on Incoming script and filter the components there, depends on your use case. From my perspective filtering should be done on the outgoing script.


        Let me know if this helps.


        Best Regards

        1. Salma Nairi

          thanks a lot

          but we haven't a hole list of component , the client can add more we can't modify rules every time tha client add new one 

          i think it will better if

          replica.components = issue.components.findAll{ component ->
          (component.name != "swan)
          }
        2. Tomás Martynowicz

          I see, that will work even better for your use case. I misunderstood that you wanted to filter "wifi" and "tr69" and dump the rest components.

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

        Hi Mariia

        we suppose that client indicate component= tra69 , wifi, swan

        we want to sync only tr69 and wifi only , we exclude swan

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

          Hi Salma Nairi, yes, that sounds doable. Could you please explain the use-case in more detail? What value do they want to exclude? 

            CommentAdd your comment...