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 Profiles (Moderator: Dave Greenberg) »
  • Activity profile
Pages: [1]

Author Topic: Activity profile  (Read 2555 times)

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Activity profile
December 28, 2011, 12:46:42 pm
I believe it's now possible to access an activity based profile in edit mode if I construct the URL correctly?

Anyone know the right URL?
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Activity profile
December 29, 2011, 05:04:57 am
Quote
Anyone know the right URL?

http://<siteurl>/civicrm/profile/edit?gid=10&reset=1&aid=544 where aid is activity id

Kurund
Found this reply helpful? Support CiviCRM

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Activity profile
December 30, 2011, 02:44:40 pm
OK - so in 3.4.7 I have a profile with only one field - 'activity date' & when I access it

civicrm/profile/edit?gid=19&reset=1&aid=784548

I get

"Profile search, view and edit are not supported for Profiles which include fields for more than one record type. "

If I add first name I get

"This activity cannot be edited or viewed via this profile."

I tried different activity types (including built in 'meeting') & swapping activity_date for details

Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Activity profile
December 30, 2011, 03:44:09 pm
Ok - so it seems you can only use the activity profile for data entry if the activity is either assigned to you OR you are the target which seems to be a bit of a use-case specific limitation.

In our case we have the activity id on a piece of phone turf print out & want the back office data to edit it based on the results of a phone call.

It seems to me that this permissioning is a new on-it's own form of permissioning and the profile should allow the assignee & target to update the activity (ideally that would be configurable since you wouldn't always want both) but in addition anyone who would normally be able to edit the activity should be able to.

We DO have the concept of ACLs to limit access to profiles so ideally the ability for targets & assignees to edit the items would extend that rather than preclude it.

Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Activity profile
December 30, 2011, 03:47:55 pm
NB - a possible work around in our case is to have a data entry account & assign all the activities to that account & get back office data entry operators to use that & it might fit our time frame ...

But it is a bit of case of hack the system to accomodate a limitation (& incur data bloat enroute) & it would be better to find a more generic solution.

The way the code is written I think it would be pretty hard to circumvent using a buildForm hook.
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

totten

  • Administrator
  • Ask me questions
  • *****
  • Posts: 695
  • Karma: 64
Re: Activity profile
December 30, 2011, 07:23:33 pm
Short answer:

Try adding "&id=CONTACT_ID" to the URL. The CONTACT_ID should be the ID of the constituent (not the ID of the staff member).

Long answer:

The confusion may stem from the fact that the forms aren't strictly activity-based -- they actually let you edit a mix of contact and activity fields. For example, if the activity is "Review Volunteer Application", then the form might include information about the applicant (first name, last name, etc) as well as information about the review (due-date, status, notes, outcome).

Unfortunately, there's some impedance mismatch -- the "Activity" data model allows several contacts (multiple targets, multiple assignees, source), but the form processor only works with one contact. Someone, somehow needs to pick a particular contact to use with the form. In the current implementation, that responsibility falls on the person writing the URL.

In the URL you've tried, it basically abdicates and uses the default "current user's contact ID." But you probably don't want fields in the form to display information about the current user -- you want them to display information about the target-contact (i.e. the constituent/applicant).

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Activity profile
December 30, 2011, 07:26:16 pm
Thanks Tim - I did try that but I'll try again in case I didn't get it right
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Activity profile
December 31, 2011, 09:14:23 am
Eileen - let us know what you "discover". I'll figure out a place to doc this in the book as well.
Protect your investment in CiviCRM by  becoming a Member!

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Activity profile
December 31, 2011, 10:37:50 am
Hi Tim was right - adding 'id=2' works - where id is the contact id - pretty sure I was using cid before.

From our point of view having it default to source contact id if id isn't provided. Or not require a contact if only activity fields would make sense. The second one is probably pretty uncontraversial
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Activity profile
December 31, 2011, 12:42:57 pm
Eileen,

You need to have contact fields along with activity fields in the profile.

Kurund
Found this reply helpful? Support CiviCRM

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Activity profile
December 31, 2011, 03:28:18 pm
Yes, that's the current limitation. It's not possible to use it to edit activity only fields - although in theory that shouldn't be too hard to change.
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

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: Activity profile
December 31, 2011, 06:23:38 pm

The main reason we have an id in there is for permissioning reasons.

Basically if the id is associated with an activity AND the user has edit permissions on that contact, then the user has edit permissions on the activity. This can also be accomplished via a checksum (i.e. if the url has a valid checksum for the id passed in, then the user has temp edit permissions on that activity)

We'll need to figure out what the permissioning rules are in the absence of IDs (with or without any contact fields)

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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • Activity profile

This forum was archived on 2017-11-26.