Uploaded image for project: 'SR for Jira - Development'
  1. SR for Jira - Development
  2. SRJIRA-6287

Error on method builder() while using data (Third party app: Extension for Jira Service Management) from Bundled Fields with Script Console

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Done
    • Low
    • Resolution: Fixed
    • 7.4.0
    • 8.4.0
    • None
    • 2.5

    Description

      We have a customer who is trying to use data (Third party app: Extension for Jira Service Management) from Bundled Fields in ScriptRunner with Script Console.

      The script executes correctly, but they also see the error message on script like:

      [Static type checking] - Cannot find matching method com.deviniti.plugins.bundledfields.api.issue.Subfield$SubfieldBuilder#build(). Please check if the declared type is correct and if the method exists.
      Possible solutions: find(), find(groovy.lang.Closure), wait(), dump(), split(groovy.lang.Closure), equals(java.lang.Object)

      Steps to Reproduce

      1. Installing "Extension for Jira Service Management" on JSD instance.
      2.  Go to the script console, paste this script and run:
        import com.atlassian.jira.component.ComponentAccessor
        import groovy.json.JsonSlurper
        import org.apache.log4j.Logger
        import org.apache.log4j.Level
        import com.intenso.jira.plugins.bundledfields.api.ExtensionBundledService
        import com.deviniti.plugins.bundledfields.api.issue.Subfield
        import com.onresolve.scriptrunner.runner.customisers.PluginModule
        import com.onresolve.scriptrunner.runner.customisers.WithPlugin
        
        @WithPlugin("com.intenso.jira.plugins.jsd-extender")
        
        @PluginModule
        ExtensionBundledService extensionBundledService
        
        def newGroupFields = [
           Subfield.builder()
             .originId("7a23604a-c78a-4a54-b5ff-9f92175ba7a7")
             .value("John")
             .build()
        ]
        

      Expected Behaviour

      The script should run without an error message.

      Actual Behaviour

      The script is executed, but also there's a static type error on the script.

      Additional Info

      • Able to replicate this issue with SR version 7.4.0
      • The error will disappear with SR version 6.50.0, which means that it used to work fine in the previous version.

      Attachments

        Activity

          People

            Unassigned Unassigned
            tlihyao Tiong Yao
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: