Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-29168

Missing Comments Restricting Drop-Down leads to JavaScript error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • 5.1.4, 5.2-m04
    • 5.1.1
    • Issue - Comments
    • Linux x64 Standalone installer with internal database, private mode
      Clients:

      • Reproducible with Chrome 18 and Firefox 14 (Linux)
      • Reproducible with Firefox 12 (Windows)

    Description

      It is possible to adjust global and project specific permissions such that the drop-down to select comment restrictions is empty and thus not displayed.

      This leads to a javascript error and the user is presented a popup saying:
      "This page is asking you to confirm that you want to leave - data you have entered may not be saved. Leave Page Stay on Page" (FF 14/Linux)

      The issue can be reproduced as follows:

      • install standalone 5.1.1 x64 linux (as non-root)
      • create a humble user with membership only in jira-users
      • create a project and set its Users role to jira-developers
      • adjust permission settings as follows:
        • Browse Issues: add jira-users
        • Add Comment: add jira-users
      • create an issue in the created project
      • login and add a comment with the humble user to the created issue
        => Dialog appears and user has to click 'Leave Page' to add the comment

      Workaround:

      • In Global Settings, switch Comment visibility from 'Project Roles only' to 'Groups & Project roles'

      JavaScript error looks as follows in Chrome Developer Tools:

      Uncaught TypeError: Cannot call method 'split' of undefined
      commentForm.getCommentVisibility in jira.webresources:viewissue-components.js:70
      commentForm.ajaxSubmit in jira.webresources:viewissue-components.js:70
      commentDrawer.ajaxSubmit in jira.webresources:viewissue-components.js:70
      $.delegate.delegate.delegate.delegate.delegate.delegate.delegate.delegate.delegate.delegate.bind.bind.bind.bind.preventEscClosingComments in jira.webresources:viewissue-components.js:70
      f.event.dispatch in batch.js:3
      f.event.add.h.handle.i in batch.js:3
      

      Note that the behavior is not reproducible in a development environment (e.g. using atlas-run from a bare bone jira5 plugin directory)

      Attachments

        Activity

          People

            edalgliesh Eric Dalgliesh
            03205c8b323c Christoph Lenggenhager
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: