Author Topic: Allowing users to modify reports without going crazy  (Read 928 times)

Offline TwoMice

  • I post frequently
  • ***
  • Posts: 213
  • Karma: 16
    • Emphanos
  • CiviCRM version: Always current stable version
  • CMS version: Drupal 7
Allowing users to modify reports without going crazy
« on: November 15, 2011, 08:35:45 am »
I'm looking to solve a problem, and I'd like your feedback on the proposed solution:

Situation:  Some CiviCRM installations have large numbers of users who all rely on existing reports to do their work.  When those reports aren't just exactly right, users with "access Report Criteria" permission have the option to change the report criteria to modify sort order, filtering, and display columns, but that's only for a one-time use.  If they want to save that configuration for later use, the have to get someone with the "administer Reports" permission to re-create the report just as they want it, and save it as a permanently available report.

The problem here is the bottleneck in new report creation.  The more users a system has, and the more dynamic their business policies are, the more this bottleneck is felt.

A bad solution would be to give the "administer Reports" permission to everyone who wants it.  This is bad because then you have lots of people modifying system-wide reports, so that reports are no longer predictable and reliable.  If Bob changes a report's filter criteria in the morning, Alice will easily be confused by the report in the afternoon, because it doesn't contain what she expects.

A better solution:  This is something I think will work for a client of ours who's currently feeling some pain from this problem.  The basic idea is to give users some space to play with reports without polluting the site-wide report space.  We create a new permission called "administer own Reports", and users with that permission can get a little freedom:
  • Starting with an existing system-wide report, the user can modify the report criteria and then save this configuration as a new report. Let's call this a "user-private report" for now, and debate a better name later. A user-private report is only visible to the user who created it, and can be modified and saved, or copied again, by that user only.
  • Any user with the "administer Reports" permission could then, at his or her discretion, promote any such user-private report to be a system-wide report, which would then behave exactly as any other system-wide report, meaning it would be visible to other users, can't be edited by the user who created it, etc.

I'm pretty sure this client will want to something like this soon, and will probably want to release it to the community, either as a Drupal module or a core patch (if core wants it).

Anybody think this is A) interesting, B) silly, or C) needs improvement in any way? Or of course, there's always D) All of the above.

Thanks for the feedback.

- Allen
Please consider contributing to help improve CiviCRM with the Make it Happen! initiative.

Offline Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Allowing users to modify reports without going crazy
« Reply #1 on: November 15, 2011, 01:38:22 pm »

Thats a cool idea and definitely falls under category A :)

I also think that there are quite a few other civicrm objects (Groups, Events, Mailings?) that come under a similar scenario, so might be worth thinking of this a bit more broadly.

My only concern is: is "administer own reports" a bit too user specific? What happens when that user leaves the org (and hence needs to be deleted / privileges taken. fairly common in most small orgs and non-profits). So far, we've kept permissioning at a group level but i'm not sure how to bridge the user <-> group divide in this case.

But overall, i would definitely say: just do it :)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Offline TwoMice

  • I post frequently
  • ***
  • Posts: 213
  • Karma: 16
    • Emphanos
  • CiviCRM version: Always current stable version
  • CMS version: Drupal 7
Re: Allowing users to modify reports without going crazy
« Reply #2 on: November 15, 2011, 02:17:59 pm »
Hey Lobo,

I think when a user is removed from the system, her user-private report instances are just deleted with them.  If those report instances have been promoted to site-wide usage before that, then they continue as such. Otherwise, when the user goes away, reports that were only used by her aren't relevant to anymore.

As for the permission itself, it's still just a Drupal permission that applies to a role. Users in the role having that privilege can copy system-wide report instances as their own user-private instances and modify them as needed, while those without the permission cannot.   If a user were to create several user-private reports and then be removed from this role, they wouldn't be able to see their user-private reports anymore.

Is that what you mean about bridging the user <-> group divide?  Maybe I answered the wrong question...

Thanks,
Allen
Please consider contributing to help improve CiviCRM with the Make it Happen! initiative.