Uploaded image for project: 'SR for Bitbucket - Development'
  1. SR for Bitbucket - Development
  2. SRBITB-407

List of event handlers not displayed when events to listen for are empty

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 5.4.18
    • Fix Version/s: 5.4.44
    • Labels:
      None
    • Sprint:
      Sprint 42, Sprint 43
    • Critical Points:
      2.5

      Description

      If you have a custom event handler and save it without specifying any events to listen for the script event handler will not be rendered and you'll get the following error in the browser console logs:

      webpack:///./src/main/resources/js/admin/RootPage.tsx?:263 Uncaught error in ScriptRunner admin UI TypeError: Cannot read property 'map' of undefined
      at EventHandlersConfig._this.renderLeftPanelDescription (webpack:///./src/main/resources/js/admin/tabconfig/bitbucket/EventHandlersConfig.tsx?:51)
      at ConfiguredItem (webpack:///./src/main/resources/js/admin/ConfiguredItem.tsx?:38)
      at mountIndeterminateComponent (webpack:///./node_modules/react-dom/cjs/react-dom.development.js?:8574)
      at beginWork (webpack:///./node_modules/react-dom/cjs/react-dom.development.js?:8978)
      at performUnitOfWork (webpack:///./node_modules/react-dom/cjs/react-dom.development.js?:11814)
      at workLoop (webpack:///./node_modules/react-dom/cjs/react-dom.development.js?:11843)
      at renderRoot (webpack:///./node_modules/react-dom/cjs/react-dom.development.js?:11874)
      at performWorkOnRoot (webpack:///./node_modules/react-dom/cjs/react-dom.development.js?:12449)
      at performWork (webpack:///./node_modules/react-dom/cjs/react-dom.development.js?:12370)
      at performSyncWork (webpack:///./node_modules/react-dom/cjs/react-dom.development.js?:12347) Object

      We should validate that the custom event handler has events before saving and show an error message on the events field if it's empty to prompt the user to pick an event.

        Attachments

          Activity

            People

            Assignee:
            rholban Roland Holban [X] (Inactive)
            Reporter:
            amarkham Adam Markham
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: