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 CiviCase (Moderator: Dave Greenberg) »
  • Viewing prior case notes while you add a new activity to existing case?
Pages: [1]

Author Topic: Viewing prior case notes while you add a new activity to existing case?  (Read 623 times)

texvet_webmaster

  • I’m new here
  • *
  • Posts: 26
  • Karma: 3
    • The TexVet Initiative
  • CiviCRM version: 4.5.6
  • CMS version: Drupal 7.34
  • MySQL version: 5.5.38
  • PHP version: 5.3.20
Viewing prior case notes while you add a new activity to existing case?
April 22, 2014, 12:10:52 pm
Howdy,

One of my users wants to see/refer to prior case notes when she's on a New Activity page.  This makes sense; you're adding new notes, so you want to see what's already been added.  (Yes, she could press the "Print Report" button on the case summary page, then add a new activity.  It's kinder to the user to put it all in one place, right?)

I'd like to take the "Print Report" button that's on each case summary page (With the label changed to "Show Prior Notes") and put it on each New Activity page.  That way, a user can find an existing case, add a new activity to it, click the Show Prior Notes button to open the print report summary in a new window, and use that as a reference while they create their new activity.

Annotated explanatory screenshot: http://screencast.com/t/OlbUADpib3

What's the best way to have the Print Report button appear when a user opens a New Activity page for an existing case?  (Rephrased: What's the best way to locate the code that puts the Print Report button on each case summary page and appropriate it to make a functional version of that button appear when a user opens a New Activity page for an existing case?)

While I'm asking for a pony...  Even better would be an accordion-style "Prior Case Activity" view/section that appears in the New Activity window for an existing case.  This section would show the Case Activities information from the summary that appears when you press the "Print Report" button.

Thanks!

Jonathan L.

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: Viewing prior case notes while you add a new activity to existing case?
April 22, 2014, 01:37:21 pm
hi - this is a fairly big jump but the way we accomplish this is
- use a Views search block or page of 'clients' so you can click a link and be take to the below form with the cid of the contact in the url
- use webform_civicrm for adding the new Activity to a Case
- use a Views block embedded above the webform where we can display previous Activities of specific types

I can provide more detail if that sounds like a solution for you - the only tricky bit is the block needs to know the 'context' of the cid=xxxx in the url and that either requires php in the Views Contextual Filter or a small module that simply says 'the filter i need to use is the id number after cid="
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

texvet_webmaster

  • I’m new here
  • *
  • Posts: 26
  • Karma: 3
    • The TexVet Initiative
  • CiviCRM version: 4.5.6
  • CMS version: Drupal 7.34
  • MySQL version: 5.5.38
  • PHP version: 5.3.20
Re: Viewing prior case notes while you add a new activity to existing case?
April 22, 2014, 03:00:54 pm
Hello Pete,

First off: Thanks for the quick and informative reply!  That said...

Though I could not have written exactly what you wrote, I imagined that a solution would take a form shaped somewhat like that.  It's nice to know my expectations weren't completely off base.

The part that you note is tricky – letting the block know the context of the cid in the URL – is the part that challenges me the most.  I don't expect you to hand me the answer, but I'll happily accept any additional details you're willing to offer.  In the meantime, I'll work to figure it out myself.

(Sorry so short – Odds are good I'll write a follow-up to this tomorrow.  I'm mainly writing to let you know I spotted your reply.)

- Jonathan L.

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: Viewing prior case notes while you add a new activity to existing case?
April 22, 2014, 03:06:25 pm
something like this
Code: [Select]
/**
 * Implements hook_views_pre_build().
 */
function tidbits_views_pre_build(&$view) {
  switch ($view->name){
  case '<insert name of view>':
  case '<insert name of view>':
    $view->args[] = $_GET['cid1'];
    break;
 
  }
}
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

texvet_webmaster

  • I’m new here
  • *
  • Posts: 26
  • Karma: 3
    • The TexVet Initiative
  • CiviCRM version: 4.5.6
  • CMS version: Drupal 7.34
  • MySQL version: 5.5.38
  • PHP version: 5.3.20
Re: Viewing prior case notes while you add a new activity to existing case?
April 23, 2014, 07:41:30 am
Cool.  I'll run with that, see where it gets me, and report back.

Thank you,

Jonathan L.

texvet_webmaster

  • I’m new here
  • *
  • Posts: 26
  • Karma: 3
    • The TexVet Initiative
  • CiviCRM version: 4.5.6
  • CMS version: Drupal 7.34
  • MySQL version: 5.5.38
  • PHP version: 5.3.20
Re: Viewing prior case notes while you add a new activity to existing case?
May 01, 2014, 06:49:47 am
Been crazy-busy at work; have not had the chance to loop back to this yet, but have not forgotten it.  I *will* reply back once I've had a chance to do more work on this. =)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviCase (Moderator: Dave Greenberg) »
  • Viewing prior case notes while you add a new activity to existing case?

This forum was archived on 2017-11-26.