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

Workflow permission variable misconfiguration Exception message is misleading

    XMLWordPrintable

Details

    Description

      NOTE: This bug report is for JIRA Server. Using JIRA Cloud? See the corresponding bug report.

      Incorrect Exception message thrown, which misleads users.

      Also see
      https://jira.atlassian.com/browse/GHS-3325

      The Exception thrown when entering a permission related workflow step variable looks like following:

      java.lang.RuntimeException: Error parsing meta attribute <meta name='jira.permission.edit'>false</meta>. Name format is 'jira.permission.[subtasks].<permission>.[group|user|assignee|...]'
      [INFO] [talledLocalContainer] java.lang.RuntimeException: Error parsing meta attribute <meta name='jira.permission.edit'>false</meta>. Name format is 'jira.permission.[subtasks].<permission>.[group|user|assignee|...]'
      [INFO] [talledLocalContainer] 	at com.atlassian.jira.permission.WorkflowPermissionFactory.createWorkflowPermission(WorkflowPermissionFactory.java:81)
      [INFO] [talledLocalContainer] 	at com.atlassian.jira.permission.WorkflowPermissionFactory.getWorkflowPermissions(WorkflowPermissionFactory.java:41)
      [INFO] [talledLocalContainer] 	at com.atlassian.jira.security.WorkflowBasedPermissionManager.hasPermission(WorkflowBasedPermissionManager.java:75)
      

      The user mistook the format (jira.permission.[subtasks].<permission>.[group|user|assignee|...]) for a pseudo regex, and thought subtask as well as the last part were optional, where only the subtask in fact is. According to the documentation

      http://confluence.atlassian.com/display/JIRA044/Workflow+Properties

      which links to

      http://docs.atlassian.com/software/jira/docs/api/latest/com/atlassian/jira/security/WorkflowBasedPermissionManager.html

      the correct format is 'jira.permission.[subtasks.]{permission}.{type}[.suffix]'

      Please adapt the Exception message accordingly.

      Scenario 2:
      We have tested to add the workflow property and reproducible in JIRA 4.4.5, 5.0.7, 5.1.8 and 5.2.11:

      • jira.permission.work = denied

      It looks like the property is doing it's job, and the log work feature will be disable for that specific issue status.

      Steps to reproduce

      1. Go to Administration > Workflows
      2. Edit the related workflow, and create a draft workflow if required
      3. Go to any of the workflow step (not transition!), open the property for that workflow step
      4. Add the following property:
        jira.permission.work = denied
        

      Finding:
      Though the property seems to work, it looks like apparently we managed to reproduce the problem as well. In our test setup, the log work is disabled in the In Progress step due to the property, but when we try to resolve the issue, we get the following error:

      2013-05-23 22:24:21,341 http-bio-8081-exec-11 ERROR admin 1344x11961x1 1lif4su 0:0:0:0:0:0:0:1 /secure/IssueAction!default.jspa [atlassian.jira.permission.WorkflowPermissionFactory] Error parsing meta attribute <meta name='jira.permission.work'>denied</meta>. Name format is 'jira.permission.[subtasks].<permission>.[group|user|assignee|...]'
      2013-05-23 22:24:21,342 http-bio-8081-exec-11 ERROR admin 1344x11961x1 1lif4su 0:0:0:0:0:0:0:1 /secure/IssueAction!default.jspa [atlassian.plugin.web.DefaultWebInterfaceManager] Could not evaluate condition 'com.atlassian.plugin.web.conditions.AndCompositeCondition@63e5635f' for descriptor: com.atlassian.jira.plugin.system.issueoperations:log-work (null)
      java.lang.RuntimeException: Error parsing meta attribute <meta name='jira.permission.work'>denied</meta>. Name format is 'jira.permission.[subtasks].<permission>.[group|user|assignee|...]'
      	at com.atlassian.jira.permission.WorkflowPermissionFactory.createWorkflowPermission(WorkflowPermissionFactory.java:81)
      	at com.atlassian.jira.permission.WorkflowPermissionFactory.getWorkflowPermissions(WorkflowPermissionFactory.java:41)
      	at com.atlassian.jira.security.WorkflowBasedPermissionManager.hasPermission(WorkflowBasedPermissionManager.java:75)
      	at com.atlassian.jira.security.AbstractPermissionManager.hasPermission(AbstractPermissionManager.java:113)
      	at com.atlassian.jira.security.AbstractPermissionManager.hasPermission(AbstractPermissionManager.java:142)  <+2> (DelegatingMethodAccessorImpl.java:25)
      

      Attachments

        1. Bildschirmfoto 2012-06-12 um 12.36.png
          279 kB
          childnode
        2. Bildschirmfoto 2012-06-13 um 11.04.02.png
          18 kB
          childnode
        3. error_thrown_when_transite.JPG
          172 kB
          John Chin

        Issue Links

          Activity

            People

              Unassigned Unassigned
              miruflin Michael Ruflin
              Votes:
              14 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

                Created:
                Updated: