User count toward license is not correct in JIRA

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Low
    • None
    • Affects Version/s: 5.2.5
    • Component/s: None
    • 5.02

      When JIRA is using more than one User Directory, the user count can get incorrect after User Directories are removed and added a few number of times.

      I'm not sure how JIRA is counting users toward the license today, but I believe the following query should return the most correct user count.

      SELECT distinct u.lower_user_name
      FROM cwd_user u
      JOIN cwd_membership m
      ON u.id = m.child_id
      AND u.directory_id = m.directory_id
      JOIN schemepermissions sp
      ON LOWER(m.parent_name) = LOWER(sp.perm_parameter)
      JOIN cwd_directory d
      ON m.directory_id = d.id
      WHERE sp.permission IN ('0','1','44') AND d.active = '1' and u.active = '1';
      

      The query may need some changing considering nested groups.

            Assignee:
            Unassigned
            Reporter:
            Marcus Silveira
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: