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

getBehaviourContextId() and getContextIssueId() always return null

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Done
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 5.4.43
    • Fix Version/s: None
    • Component/s: Behaviours
    • Labels:
      None
    • Critical Points:
      1.5

      Description

      The methods that allow customers to get the BehaviourContextId and ContextIssueId within a behaviour script now seem to always return null.

      If you create a basic behaviour that just logs those variables:

       

      import org.apache.log4j.Logger
      import org.apache.log4j.Level
      def log = Logger.getLogger(getClass())
      log.setLevel(Level.DEBUG)
      
      log.debug("getBehaviourContextId method returns = " + getBehaviourContextId() )
      log.debug("getContextIssueId method returns = " + getContextIssueId() )
      

      And create your own web Item such as the following:

      When you click the link that will now be in the "More" menu of the issue you will see in the debuger and logs that the values are null.

      /rest/scriptrunner/behaviours/latest/validatorsByPid.json [Script1] getBehaviourContextId methods returns = null
      /rest/scriptrunner/behaviours/latest/validatorsByPid.json [Script1] getContextIssueId method returns = null

       

      I also checked the result of clicking the default menu items such as "Create Sub-task" which also shows nulls.

       

      Regards

      Matthew

       

       

       

       

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              mclark Matthew Clark
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: