2
1
0

Hello there,

We have got a Custom Field of type select list (single choise) named "Projectnumber" at two instances. Both have the same configuration, but a different set of options.
When we setup the sync using the following command, the options only get synchronized when they exist at the destination side. If the option does not exist at the destination, "none" is selected. We would like to have a new option created if it does not exist. Could you help us with the script?

if(replica.customFields."Projectnumber"){
        issue.customFields."Projectnumber".value = replica.customFields."Projectnumber"
}


Btw. your "How to" section contains an article on how to sync a text field to a select list, but not how to sync two lists. Maybe you could add it afterwards.


Regards,
Paul

    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      I checked out how one would add options to a select list in case that a value is missing and found following article on AAC

      https://community.atlassian.com/t5/Answers-Developer-Questions/How-do-you-add-custom-field-options-in-a-plugin/qaq-p/480724



      The code provided by Nic Brough can be used as a basis.


      The sync scripts provide access to all the services provided by Jira, and thus creating a script that adds the options when missing is doable.




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

        Hi Paul,


        What we offer is to set a default value if the option isn't found in the destination instance, it doesn't have to be "None", you can set it to whatever option you want as a default, but we don't actually have a method to create a new option if it doesn't exist. 


        If this functionality is crucial for you, I can re-direct you to professional services so it can be developed for you.


        Let me know if you're interested in setting a default value (smile)


        Thanks,


        André

        1. Paul Schmidt

          Hi André,


          In fact that is a crusial functionality for us because it prevents from manually updating the lists with new entries on each side every time. So it would be nice to have this functionality to be developed.


          Regards,

          Paul

        2. Paul Schmidt

          Hi André Leroy-Beaulieu Castro,


          Is there some progress on that issue?


          Regards,

          Paul

        3. Francis Martens (Exalate)

          Hi Paul - This is not a support channel so there is no SLA for getting replies and such.


        4. Paul Schmidt

          Hi Francis Martens (Exalate),
          Usually I was asked to create an entry in here before creating a support ticket. That's why I did it this way this time. As we have not found a solution so far, I will rise a support request. I'm sure we can handle this issue as good as we handled the other ones before. See you on the other side (smile)

        5. Francis Martens (Exalate)

          Hello Paul Schmidt


          The support channel is meant for product issues - such as stuck syncs, or bugs where a workaround needs to be established.


          What you are looking for is help setting up a configuration.  As stated in the SLA (here), the configuration of your synchronization is not included in the regular support.  To illustrate - It is not because you buy Office, that Microsoft will help you write your book.

          Still, we want to help our users as much as possible, that's why we established this community site.  And we'll provide answers to requests, like the one you have - whenever time allows.  That's why there is no SLA related to configuration questions.   


          An alternative is to reach out to one of the Exalate partners (here), who can provide professional services to implement your use case.


          Hope you understand.


          Francis







        CommentAdd your comment...