CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • Views3 and filtering to Activities for Assigned to for logged in user
Pages: [1]

Author Topic: Views3 and filtering to Activities for Assigned to for logged in user  (Read 2393 times)

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Views3 and filtering to Activities for Assigned to for logged in user
December 16, 2011, 10:29:56 pm
Hi - getting brain ache trying to make this view work  ::)

Scenario - Person A fills in Webform, creates an Activity, assigned to Manager, who can then reassign to Auditor

Outcome - need a View that the Auditor sees when logged in that shows them only Activities that are Assigned to them.

Problem - I think that I need to be able to set the following Relationships
- CiviCRM Activity Assignments: Assignee Contact ID
to be available as a Relationships to this Relationship
- CiviCRM Contacts: Drupal ID

so that I can then use the Filter criteria
- User = Current = Yes

So the latter uses the Drupal User relationship - hence thinking i need to make the Drupal User relationship tie in with the Assignee Contact ID - as without doing so it filters to show all Activities where the CiviCRM Source Contact is the logged in User.

The error I am getting is this

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'civicrm_contact_civicrm_activity_assignment.uf_id' in 'on clause'

Of course I may be barking up the wrong tree and need to build this from an Argument but when I try, it of course uses the Relationship = Drupal User - and therefore limits the results to only those 'submitted by' the logged in user, which I think brings me round full circle to needing to change how the Drupal User relationship is firing.

Any suggestions?

I am attaching a View that may help for anyone who thinks it is a case of my mis-configuration.

I hope i have stripped out all the Custom bits that would trip up anyone who imports it (note in D7 there are issues that only User1 can import Views I believe).

It has columns to show the following to help make it clearer whether it is succeeding or not
- target
- assignee
- submittor

and an exposed filter for 'is the logged in user' and a few others. You will probably need to filter the Activity Type to something like Meeting where you have some examples of Activities that have a different Source Contact, Target Contact and Assignee Contact for it to make sense.

This will be working correctly when I set 'is the logged user' to Yes and see only Activities that are Assigned to me, rather than the ones that are submitted by me (which is how it is working currently) - unless of course the solution is to build a smarter an Argument that sidesteps the relationship problem with some php.

I am also of course hoping this View will end up being useful to others since it gives us the option of popping blocks in anywhere that can be filtered to show particular Activities that the assignee needs to work on.
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

adshill

  • I post occasionally
  • **
  • Posts: 96
  • Karma: 8
Re: Views3 and filtering to Activities for Assigned to for logged in user
February 08, 2012, 05:51:01 pm
Hi Peter,

Did you ever find a solution to this? I am trying to get the same - basically a list of all activities assigned to the logged in user. I don't get the error but can't seem to make it work.

Any guidance of how you set it up is greatly received! Thanks and all the best,

Adam

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Views3 and filtering to Activities for Assigned to for logged in user
February 08, 2012, 08:37:57 pm
Hi Adam - pretty sure this stalled until we had more urgency to come back to it.
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

adshill

  • I post occasionally
  • **
  • Posts: 96
  • Karma: 8
Re: Views3 and filtering to Activities for Assigned to for logged in user
March 11, 2012, 04:38:49 pm
Thanks :) we took the same approach...

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Views3 and filtering to Activities for Assigned to for logged in user
November 08, 2012, 10:09:58 pm
Hitting this one again so bringing it back to life to see who has an opinion on where to fix. Our first go at resolving this got nowhere ;-(
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Views3 and filtering to Activities for Assigned to for logged in user
November 08, 2012, 10:19:16 pm
and just flagging this 'fixed' JIRA in case it has any bearing on this issue
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Tony Horrocks

  • I post occasionally
  • **
  • Posts: 110
  • Karma: 7
    • Fabriko Limited
  • CiviCRM version: 4.5.x
  • CMS version: Drupal 7
Re: Views3 and filtering to Activities for Assigned to for logged in user
March 21, 2013, 07:40:27 am
Yep just tried doing exactly this and getting the same error
Tony Horrocks
Author of the CiviCRM CookBook https://www.packtpub.com/web-development/civicrm-cookbook

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • Views3 and filtering to Activities for Assigned to for logged in user

This forum was archived on 2017-11-26.