1
0
-1
Hi there, I would like to set a default value for an Insight Object. Any help will be appreciated. Thanks
    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Hi Samuel Bartolome

      We are preparing a blog topic on insight synchronisation - can you elaborate on the use case.  What is the default value

      1. Samuel Bartolome

        Hi Francis Martens (iDalko),

        We have an extensive Insight Object with all different pieces of software available so users can select the appropriate one (ie. Adobe Reader, MS Word and so on).

        We would like that one of those pieces of software is set as default when we exalate

        I hope this helps better to understand the enquiry.

        Thanks

      2. Samuel Bartolome

        Any suggestions that can help us?

      3. Patrick Wittke

        Hi Francis Martens (Exalate),

        we are trying to set an Insight Object picker with one specified value that we know by ID or name.

        We can read the object, but it is not setting the field value and only returns NULL:


        /* Get Insight IQL Facade from plugin accessor */
        Class iqlFacadeClass = ComponentAccessor.getPluginAccessor().getClassLoader().findClass("com.riadalabs.jira.plugins.insight.channel.external.api.facade.IQLFacade"); 
        def iqlFacade = ComponentAccessor.getOSGiComponentInstanceOfType(iqlFacadeClass);
        def insightObject = iqlFacade.findObjectsByIQLAndSchema(1, "Key = MYKEY-124");
        
        issue.customFields["Affected Components"].value = insightObject

        Neither as Object, nor as the value returned via REST the field works and only stores null each time.

        Jira's REST API returns the following value for the field:

        "customfield_10710": [
        "MY TITLE (MYKEY-124)"
        ],



        Thanks,
        Patrick
        CC: Samuel Bartolome

      4. Ariel Mears

        Was there an answer on this?  I'm trying to do the same but when I use the iqlFacade, my object returns NULL even though I can run the same code in a groovy console which returns the object.

      CommentAdd your comment...