Published
Tuesday, December 9, 2008 - 11:28
Written by
Hello everyone, Tags are a powerful way of organising contacts, and you can use them to add topics of interest, type of organisations, type of donors... as you might already have discovered, you can quickly get a lot of them, and it becomes quite difficult to use them properly as soon as you have more than an handful. To solve that, you can now organise the tags and group them in a clearer hierarchy, much like what has been introduced for the groups on the 2.1 release. So instead of having a flat list of all the topics of interest, regions they work, type of organisations, and whatever you can use the tags for mixed and sorted by alphabetical order, you can have them nicely ordered by categories and sub categories, and find them more easily. A few months ago, we have been offered the possibility to elect what features we wanted most. The 3rd most chosen user suggestions is a more "ajaxified" interface for the contacts. I've taken that into account and instead of reloading the complete page once you've changed the tags, they are changed directly in the background as soon as you check/uncheck them. Moreover, and to save you an extra click, the tags are directly selectable in the tags tab, without having to go to a different "edit tags" page. We've done it in a non obstructive way, so if you don't have javascript enabled, or use a text only brower, you are going to have a simpler, but working interface. Please test this new feature on the sandbox and let us know what you think about it: http://sandbox.civicrm.org/civicrm/contact/view?action=browse&selectedChild=tag Feel free to add more tags (only 3 levels are supported): http://sandbox.civicrm.org/civicrm/admin/tag?reset=1&action=browse With all these improvements, I wish you will use more the tags and keep a better track of your contacts and what they are interested by! For those that are interested by what's under the hood, this feature is the first one using the REST interface to ajaxify a page. With jquery, that's a powerful way to make quicker an faster interfaces with a few lines of code. All the v2 apis are already available to be ajax called. For instance, adding a tag is a one line in javascript when you have included the right stuff: civiREST ('entity_tag','add',{contact_id:contactID,tag_id:tagid}); So ajaxifying a list of check-boxes (the list itself is an dumb html list with each checkbox having an id check_{tagid}):
jQuery(document).ready(function(){
   $("#tagtree input").change(function(){
     tagid=this.id.replace("check_", "");
     if (this.checked) {
       civiREST ('entity_tag','add',{contact_id:contactID,tag_id:tagid});
     } else {
       civiREST ('entity_tag','remove',{contact_id:contactID,tag_id:tagid});
   });
});
X+
Filed under

Comments

New tags feature looks great -- definitely extends the usefulness of the tool.

It might be nice to have a toggle for "container/category" tags so that they are not selectable. Since it's likely parent "container" tags are not actually a tag, but simply the category holding actual tags, the option to make them simple server as a container, and not a tag, would be useful. In the sandbox, the "type of organisation" shouldn't really be selectable. Just the child tags under it.

But for some reasons, the quickform didn't want to display it, and I decided not to use it for now.

If one can have a look at CRM/Admin/Form/Tag.php and find the problem...

Congrats on both the ajaxing and the hierarching. I look forward to seeing the ajaxification spread through the system.

And now that I am just spec'ing a new job I need to rethink my assumptions about making little use of Tags. Having gotten so used to building masses of Custom Data I need to review my approach for new clients with both hierarchical Groups and Tags - though I still have a preference for being able to do exports with information in columns rather than having it buried in to a cell.

Which makes me wonder how the export function handles hierarchies. I see it just runs them as a flat sequence.

Also, very minor issue, but I found I kept wanting to have all the nestings open but this was not possible as everytime I clicked on one arrow it caused the other one I had open to close.

pete davis : fuzion : advocacy + strategy + communication

Well,

it was like that at the beginning, but honest, you will not want to keep them open as soon as you have more than a few dummy tags.

X+

I am one of those people that is yet to find a compelling reason to suggest to clients that they use Tags rather than Groups. Most of them ask the question, "When should I create a tag and when should I create a group?" I am yet to find a compelling reason to suggest they use tags at all (rather than just use groups). Given your apparent major use of tags, perhaps you can give me some good reasons to use them alongside groups?

Also, I note that in the search boxes the tags are not listed under their parent tag (or will one tag be able to have multiple parents like groups)? I believe the listing of heirarchical elements like groups and tags has a lot to be desired for the reason that the hierarchies are not attractively or clearly displayed at present (you shouldn't have to go looking for the Parent ID and then go and cross reference that to the relevant group number in order to work out what groups are within each other).

Thanks for your ongoing contribution!

Andrew

Hi,

As any of you, I've had this questions for every single installation. I'm nearly having a very modest definitive answer. Give me a week or two to macerate it, and I'll post something, where you will all be able to disagree... and be wrong ;)

See you next year, I'm nearly off to Pakistan.

X+

and as I try to apply this possibility as I set up a new job - some off the cuff thinking.

Reasons for using Tags:
- keeps clutter out of Groups particularly for information that is not going to be used directly for Mailing Lists or other functions (eg ACLs) that require Groups
- visibility; Tags show on the Summary page

pete davis : fuzion : advocacy + strategy + communication