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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Activity Tab Filtering
Pages: [1] 2

Author Topic: Activity Tab Filtering  (Read 4204 times)

adshill

  • I post occasionally
  • **
  • Posts: 96
  • Karma: 8
Activity Tab Filtering
March 17, 2010, 08:19:20 pm
We're wondering if anyone has implemented, or plans to implement a filter for activities on the contact activity tab. We are finding after a few months that individual contacts activity lists become very long so finding something becomes quite difficult. It would be great to have a filter drop down by activity type in order to help find the activity you're looking for?

Let me know if anyone has implemented this or thinks they could implement into the system - would be a useful thing to add to core I think?

Tiggr

  • I post occasionally
  • **
  • Posts: 38
  • Karma: 1
    • Rodgauer Workshop
  • CiviCRM version: 4.7.beta3
  • CMS version: Drupal 7
Re: Activity Tab Filtering
March 18, 2010, 02:38:27 am
Yes, that would be a great feature!

Bye
Marcus (aka Tiggr)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Activity Tab Filtering
March 19, 2010, 03:06:43 am
I added a sort+filter on the client side with a nice jquery datatable.

Kurund is working on that tab for the next version, can't recall what it is, might be around that.

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

elodie

  • I’m new here
  • *
  • Posts: 6
  • Karma: 0
  • CiviCRM version: 3.3.3
  • CMS version: Drupal 6.17
  • MySQL version: 5.0.77
  • PHP version: 5.2.10
Re: Activity Tab Filtering
February 10, 2011, 10:05:59 am
Any news on this request?
Is an activity tab filtering gonna be included in coming versions?

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 Tab Filtering
February 10, 2011, 11:14:36 am

No. Its currenty not on the short/medium term roadmap

if important to your org, please consider contributing code and/or sponsoring a developer to do the needed work

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

elodie

  • I’m new here
  • *
  • Posts: 6
  • Karma: 0
  • CiviCRM version: 3.3.3
  • CMS version: Drupal 6.17
  • MySQL version: 5.0.77
  • PHP version: 5.2.10
Re: Activity Tab Filtering
February 10, 2011, 11:42:21 am
I could definitely try to contribute some code here.
I'd appreciate if I could have some tips on where to start though. Which scripts are involved and should I focus on?
Thanks.

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 Tab Filtering
February 10, 2011, 11:44:20 am

http://en.flossmanuals.net/CiviCRM/DevelopIntro
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

elodie

  • I’m new here
  • *
  • Posts: 6
  • Karma: 0
  • CiviCRM version: 3.3.3
  • CMS version: Drupal 6.17
  • MySQL version: 5.0.77
  • PHP version: 5.2.10
Re: Activity Tab Filtering
February 10, 2011, 12:21:52 pm
I guess I was more asking about tips on the specific strategy to adopt.
Should it be implemented as a hook?
Should I modify a specific PHP file? Which one?
It's probably obvious to you as you know the back end very well. For me it's kind of like walking through a maze.
And if this is to be of any use to CiviCRM long term, it should be done the 'right' way, correct?

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 Tab Filtering
February 11, 2011, 01:59:35 pm

The developer intro chapter gives you a fair amount of info and guidance on how to locate the files involved in rendering a page.

I dont think u can do it with hooks

To a large extent it depends on how simple / complex you want the filtering to be. Seems like it could potentially be a modified version of the "find activities" function (and potentially complex). on the other hand you could add a simple form with status id's and activity type id's and reload the page with a filter on those

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

Piyush

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
    • Pecan Solutions
Re: Activity Tab Filtering
March 01, 2011, 03:38:09 am
elodie@neurodevnet.ca: Did you get something working on this?

xavier: Can you share what you did with your client side approach?

Thanks,
Piyush

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Activity Tab Filtering
March 01, 2011, 05:56:02 am
Quote from: Piyush on March 01, 2011, 03:38:09 am
xavier: Can you share what you did with your client side approach?

Yeap, quick and easy: modified the template to use datatables
http://www.datatables.net/

You still load all the raws, but they are now searchable/sortable

check, I think the plugin is now part of civi

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

franceslui

  • I’m new here
  • *
  • Posts: 5
  • Karma: 1
  • CiviCRM version: 3.33
Re: Activity Tab Filtering
March 15, 2011, 10:59:01 am
I have developed a drop-down list to filter activities by types. Please see my attached patches for my implementation.

I have used JQuery to implement the drop-down list and removed the pager. Would it be possible to include my patches in your source code?

Thank you.

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 Tab Filtering
March 15, 2011, 11:58:26 am

cool, thats quite awesome. Thanx for pushing this forward

A few thoughts:

I dont think getting rid of the pager is a good idea. If you have lots of activities / contact, loading all of them in the browser might take too long / consume too much memory / does not scale

I think improving the code at the backend to take "activity type" as a filter from the GET params and then filtering it at the mysql query level is a more scalable approach. So basically the select box, calls back to the server and filter it with the activity type.

Ping us on IRC, we can help you with it and potentially even "fix" the query to do the right things. I think u've made some great steps forward and with these changes we can get it into core for 3.4 / 4.0

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

franceslui

  • I’m new here
  • *
  • Posts: 5
  • Karma: 1
  • CiviCRM version: 3.33
Re: Activity Tab Filtering
March 15, 2011, 02:14:15 pm
Thank you for your quick reply and advice.

I am not familiar to IRC. Could you explain to me what you meant by "Ping us on IRC"?

Thank you.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Activity Tab Filtering
March 15, 2011, 03:10:53 pm
And online "chat"

http://webchat.freenode.net/?channels=#civicrm

type any phrase with "dlobo" on it, and he will get a pop-up that you try to contact him and so you can chat.

If you need to add extra pagination filters for the list of activities (and filter by activity type) can you extend
CRM_Activity_BAO_Activity::retrieve so we can re-use that logic in the api too ?


X+

-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Activity Tab Filtering

This forum was archived on 2017-11-26.