[Bug 1596275] [NEW] Remove selected dimension restrictions for data analytics from user

Public bug reported:

Hello Again

DHIS 2 version 2.22
Build 22057

I created 2 category option groups/groupsets to use for data approvals and assigned users to either one or both groups. The approvals did not work as envisaged probably because I may not have set them up correctly. So I deleted the approval levels and the workflow but did not remove the users from the approval levels and also removed the approval workflow from the datasets as well.

For some inexplicable reason all the analytics on that system are not
working also (have reported this on the mailing list already and
awaiting feedback).

The catalina logs show this:

and "uidlevel1" in ('C983g0J6p9m') and ( "sASLYFgAkiG" in ('CW20DvNk041') ) and ( "LKC6LlcxjzT" in ('jj2GfLHSgGP') ) group by "dx","co","monthly","uidlevel1"]; nested exception is org.postgresql.util.PSQLException: ERROR: column "sASLYFgAkiG" does not exist
  Position: 1213

Checked the reference from the API
<identifiableObject xmlns="http://dhis2.org/schema/dxf/2.0&quot; created="2016-06-15T09:39:32.539+0000" lastUpdated="2016-06-18T10:47:00.363+0000" name="WRP-N" href="http://…/api/categoryOptionGroupSets/sASLYFgAkiG" id="sASLYFgAkiG">
<displayName>WRP-N</displayName>
<publicAccess>rw------</publicAccess>
<externalAccess>false</externalAccess>
<user id="eLLQLkoS0hq"/>
<userGroupAccesses/>
<attributeValues/>
</identifiableObject>

I exported all the metadata and entered data from the server to a local instance on my computer (v2.22 Build 22075). I was trying to run a dataset report for different periods on my laptop instance and one of the reports did not run. I reviewed the logs (on my laptop) to see whats was going on and found this:

* INFO 2016-06-26 07:33:25,499 Create table SQL: create table
_categoryoptiongroupsetstructure_temp (categoryoptioncomboid integer not
null, "WRP-N" varchar(230), "sASLYFgAkiG" character(11), "MODHIP"
varchar(230), "LKC6LlcxjzT" character(11), primary key
(categoryoptioncomboid)) (JdbcResourceTableStore.java [taskScheduler-2])

I then tried to remove the selected dimension restrictions for data
analytics for each user on the server but when I remove it and save, and
open the user details again to check, the dimension restriction is still
applied. I have tried this several times for different users but not
working.

The user metadata import failed for the instance on my laptop, so I do
not have the users with the restrictions and analytics are running well
except for the time period October 2015 (dataset reports and pivot
tables) - not sure why.

How do I resolve this issue? Is this a bug?

Would gladly provide any more required information.

** Affects: dhis2
     Importance: Undecided
         Status: New

** Tags: analytics approvals reports restriction users

···

--
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1596275

Title:
  Remove selected dimension restrictions for data analytics from user

Status in DHIS:
  New

Bug description:
  Hello Again

  DHIS 2 version 2.22
  Build 22057

  I created 2 category option groups/groupsets to use for data approvals and assigned users to either one or both groups. The approvals did not work as envisaged probably because I may not have set them up correctly. So I deleted the approval levels and the workflow but did not remove the users from the approval levels and also removed the approval workflow from the datasets as well.

  For some inexplicable reason all the analytics on that system are not
  working also (have reported this on the mailing list already and
  awaiting feedback).

  The catalina logs show this:

  and "uidlevel1" in ('C983g0J6p9m') and ( "sASLYFgAkiG" in ('CW20DvNk041') ) and ( "LKC6LlcxjzT" in ('jj2GfLHSgGP') ) group by "dx","co","monthly","uidlevel1"]; nested exception is org.postgresql.util.PSQLException: ERROR: column "sASLYFgAkiG" does not exist
    Position: 1213

  Checked the reference from the API
  <identifiableObject xmlns="http://dhis2.org/schema/dxf/2.0&quot; created="2016-06-15T09:39:32.539+0000" lastUpdated="2016-06-18T10:47:00.363+0000" name="WRP-N" href="http://…/api/categoryOptionGroupSets/sASLYFgAkiG" id="sASLYFgAkiG">
  <displayName>WRP-N</displayName>
  <publicAccess>rw------</publicAccess>
  <externalAccess>false</externalAccess>
  <user id="eLLQLkoS0hq"/>
  <userGroupAccesses/>
  <attributeValues/>
  </identifiableObject>

  I exported all the metadata and entered data from the server to a local instance on my computer (v2.22 Build 22075). I was trying to run a dataset report for different periods on my laptop instance and one of the reports did not run. I reviewed the logs (on my laptop) to see whats was going on and found this:

  * INFO 2016-06-26 07:33:25,499 Create table SQL: create table
  _categoryoptiongroupsetstructure_temp (categoryoptioncomboid integer
  not null, "WRP-N" varchar(230), "sASLYFgAkiG" character(11), "MODHIP"
  varchar(230), "LKC6LlcxjzT" character(11), primary key
  (categoryoptioncomboid)) (JdbcResourceTableStore.java
  [taskScheduler-2])

  I then tried to remove the selected dimension restrictions for data
  analytics for each user on the server but when I remove it and save,
  and open the user details again to check, the dimension restriction is
  still applied. I have tried this several times for different users but
  not working.

  The user metadata import failed for the instance on my laptop, so I do
  not have the users with the restrictions and analytics are running
  well except for the time period October 2015 (dataset reports and
  pivot tables) - not sure why.

  How do I resolve this issue? Is this a bug?

  Would gladly provide any more required information.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1596275/+subscriptions