User by organisation unit issue

Hi Devs,
I am having a hard time understanding why I cannot unassign all
organisational units for a given user through the Users->Users by
organisation unit-> Edit button (Under a specific user).

I want to unassign all organisational units for a given user, but
leave the user active in the system. I get a message (This field is
required) when I hit "Unselect all" from the organisational unit tree
towards the bottom of the screen. I would expect that it should be
possible to delete all associations between users and orgunits.

Another (big issue) which I have noticed is that for users who do not
have any organisational units assigned to them, they get ALL
organisational units which have a particular dataset enabled. This is
a huge issue for us here in Nigeria, as there are some users in the
system who currently do not have any orgunits assigned to them (but
will in the future) but should not be able to enter data into orgunits
to which they not have been explicitly assigned.

Best regards,
Jason

Version:
2.3
Build revision:
4051

Hi Jason

Hi Devs,
I am having a hard time understanding why I cannot unassign all
organisational units for a given user through the Users->Users by
organisation unit-> Edit button (Under a specific user).

I want to unassign all organisational units for a given user, but
leave the user active in the system. I get a message (This field is
required) when I hit "Unselect all" from the organisational unit tree
towards the bottom of the screen. I would expect that it should be
possible to delete all associations between users and orgunits.

This is a good question, the reason is that people often forget to
assign users to organisation units if it is not enforced through
validation. The user needs to have one or more orgunits for the system
to work properly in several situations: i) dynamic generation of
charts based on the current user's orgunit ii) what root in orgunit
tree to choose when logging in iii) the mobile facility reporting
needs to know for which orgunit to save data afaik, and so on. So we
decided to enforce this, I guess we haven't considered the situation
where you want to inactivate a user.

What does it imply to deactivate a user? Should she not be able to log in?

Another (big issue) which I have noticed is that for users who do not
have any organisational units assigned to them, they get ALL
organisational units which have a particular dataset enabled. This is
a huge issue for us here in Nigeria, as there are some users in the
system who currently do not have any orgunits assigned to them (but
will in the future) but should not be able to enter data into orgunits
to which they not have been explicitly assigned.

OK the intended behavior is to display nothing in the orgunit tree
when user has no org units. A bit hard to reproduce this bug. Can you
pls double check the usermembership table for any associations for
this user, and clear the system (Hibernate) cache (guess you have
already done this though).

Lars

···

On Thu, Aug 25, 2011 at 10:15 AM, Jason Pickering <jason.p.pickering@gmail.com> wrote:

can we have a button on “data set report” which would allow us to download the report as excel just as in the case of “standard report”?

lungo

Hi Lars,

OK, I guess this sort of makes sense, but to which administration unit
should an administrator "belong" to? The "topmost" orgunit?

I suppose it might make sense to delete a user entirely , which what
happens if you want to see who last modified a data value, but the
user has been deleted? Isn't it best to "deactivate" them (which does
seem possible) and/or deassign them from all orgunits (which also does
not seem possible)?

The bug can be reproduced by "TRUNCATE usermembership" of less drastic
means, such as deleting all orgunit associations of a particular user
from the "usermembership" object.

In this case, I am sure it was a result of truncation of the
"usermembership" table, which I needed to populate though an external
Excel file which provided the orgunit/user associations, and was
transformed to SQL . However, some users were not associated with any
orgunits (yet) and other users did not make sense to associate with
any orgunits (such as administrators). I suppose I need to either
remove these users, or assign them "some" orgunit, although they do
not really have any at the moment.

I guess the "root orgunit" property should really be an attribute of
the user and should be set to NOT NULL?

What are the implications if a user is associated with multiple
facilities (lowest orgunit level) which exist in multiple districts
but has no true "root"?

Thanks,
Jason

···

2011/8/26 Lars Helge Øverland <larshelge@gmail.com>:

Hi Jason

On Thu, Aug 25, 2011 at 10:15 AM, Jason Pickering > <jason.p.pickering@gmail.com> wrote:

Hi Devs,
I am having a hard time understanding why I cannot unassign all
organisational units for a given user through the Users->Users by
organisation unit-> Edit button (Under a specific user).

I want to unassign all organisational units for a given user, but
leave the user active in the system. I get a message (This field is
required) when I hit "Unselect all" from the organisational unit tree
towards the bottom of the screen. I would expect that it should be
possible to delete all associations between users and orgunits.

This is a good question, the reason is that people often forget to
assign users to organisation units if it is not enforced through
validation. The user needs to have one or more orgunits for the system
to work properly in several situations: i) dynamic generation of
charts based on the current user's orgunit ii) what root in orgunit
tree to choose when logging in iii) the mobile facility reporting
needs to know for which orgunit to save data afaik, and so on. So we
decided to enforce this, I guess we haven't considered the situation
where you want to inactivate a user.

What does it imply to deactivate a user? Should she not be able to log in?

Another (big issue) which I have noticed is that for users who do not
have any organisational units assigned to them, they get ALL
organisational units which have a particular dataset enabled. This is
a huge issue for us here in Nigeria, as there are some users in the
system who currently do not have any orgunits assigned to them (but
will in the future) but should not be able to enter data into orgunits
to which they not have been explicitly assigned.

OK the intended behavior is to display nothing in the orgunit tree
when user has no org units. A bit hard to reproduce this bug. Can you
pls double check the usermembership table for any associations for
this user, and clear the system (Hibernate) cache (guess you have
already done this though).

Lars

Hi Lungo,

this function was introduced in version 2.3, but it is only for type
default and section. Are you referring to custom forms? Its a bit
difficult to recreate the form design within an Excel worksheet but we
can develop a basic report with the data if that is OK.

Lars

···

On Sat, Aug 27, 2011 at 7:23 AM, Juma Lungo <jlungo@yahoo.com> wrote:

can we have a button on "data set report" which would allow us to download
the report as excel just as in the case of "standard report"?

lungo

_______________________________________________
Mailing list: DHIS 2 developers in Launchpad
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : DHIS 2 developers in Launchpad
More help : ListHelp - Launchpad Help

Hi Lars,

OK, I guess this sort of makes sense, but to which administration unit
should an administrator "belong" to? The "topmost" orgunit?

Yes in my opinion it makes sense to use the topmost/root orgunit. The
administrator is to supposed to be able to perform all kinds of
operations in the system and hence must have access to all org units.

I suppose it might make sense to delete a user entirely , which what
happens if you want to see who last modified a data value, but the
user has been deleted? Isn't it best to "deactivate" them (which does
seem possible) and/or deassign them from all orgunits (which also does
not seem possible)?

The link between data values and users is currently simply text-based
so nothing ugly happens, you only loose the information of which user
saved the value. We should really make this a foreign key rather.

To cater for this I suggest we rather create a function and a property
"disabled" on User. A user can be disabled, if so we simply deny that
user to log in.

The bug can be reproduced by "TRUNCATE usermembership" of less drastic
means, such as deleting all orgunit associations of a particular user
from the "usermembership" object.

In this case, I am sure it was a result of truncation of the
"usermembership" table, which I needed to populate though an external
Excel file which provided the orgunit/user associations, and was
transformed to SQL . However, some users were not associated with any
orgunits (yet) and other users did not make sense to associate with
any orgunits (such as administrators). I suppose I need to either
remove these users, or assign them "some" orgunit, although they do
not really have any at the moment.

OK

I guess the "root orgunit" property should really be an attribute of
the user and should be set to NOT NULL?

What are the implications if a user is associated with multiple
facilities (lowest orgunit level) which exist in multiple districts
but has no true "root"?

A user has a collection of org units (roots). This implies that the
user has access to those org units and each of the sub-trees. The
origin of the many-multiplicity was a requirement from India where
some officers were in charge of multiple districts. One wanted to give
access to those districts with its facilities but not to the province
above. It does not really makes sense to assign org units from
multiple layers, and we should enforce this better in the system.

Anyway, the org units assigned to a user will all appear in the tree
as roots. So in your example you will simply see those facilities
alone in the tree area.

Lars

···

2011/8/27 Jason Pickering <jason.p.pickering@gmail.com>:

Hello,

I’d like to bring up to you a very simple way to export from html to excel file.

When the user click on export button then just post the html code of form along with data input to the server side. At there, we will create excel file with the content of html code above then let the client is downloaded this file. I’ve tried in my local. It works.

P.S: The exported file which could be read bt OpenOffice and MsExcel. But perhaps there is an inconvenient thing is that the format of file would be broken such as font, size, and span in column/row.

···

2011/8/27 Lars Helge Øverland larshelge@gmail.com

Hi Lungo,

this function was introduced in version 2.3, but it is only for type

default and section. Are you referring to custom forms? Its a bit

difficult to recreate the form design within an Excel worksheet but we

can develop a basic report with the data if that is OK.

Lars

On Sat, Aug 27, 2011 at 7:23 AM, Juma Lungo jlungo@yahoo.com wrote:

can we have a button on “data set report” which would allow us to download

the report as excel just as in the case of “standard report”?

lungo


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Good heath !