organic group and case tracker
| Project: | Case Tracker |
| Version: | HEAD |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | zero2one |
| Status: | closed |
I have combined og and casetracker as here suggested:
These combine to create the following previously unavailable feature:
* cases assigned to a project can only be viewed by subscribers. This happens because OG's node visibility controls what appears whenever you create a node assigned to a particular Group (which is what'd happen when you create a Case Tracker case assigned to a particular project which, as we've established earlier, is also an Organic Group).
It works really really great!! And the flexibility is enormous.
But one small improvement I had to do is that the adding cases form has automatically preselected og-audiences:
- if project is a group, cases should have the audience of that project-group, by all means per default.
- if project is part of a group or part of more groups, its adding cases form also should have checked this groups as audiences per default.
this patch works for me...
| Attachment | Size |
|---|---|
| ct_og.txt | 3.73 KB |

#1
sorry, this one is the newest version of the patch...
#2
sorry, this one is the newest version of the patch...
#3
I'd be interested to hear thoughts from Morbus.
I've always been interested in clean, complete OG/CT integration, and will be diving back in w/ upgrading some relevant sites this week.
I'd like to see code in that area committed where appropriate.
#4
At first glance, this sounds like a dupe of http://drupal.org/node/106574.
#5
Looking at the patch, I'm pretty sure that adding &gids to the URL is not the way to do this properly.
#6
ok, but og.module is doing it with &gids[] and so I thougt that would be appropriate...
hope to have time soon for some improvements. but everybody feel free to provide a version with hook_form_alter in the meantime.
#7
The previous patch was failing on the first hunk for me. I've attached a new patch file which does work.
Other modules use the addition of &gids to the URL. It may not be the tidiest way of doing it, but it's easy to implement and it works.
#8
Interesting approach... I'm looking forward to testing the patch and will report back.
#9
adding gids to querysting is just fine. perhaps og could do that itself with hook_link_alter() - not sure.
anyway, use og_is_group_type() to check if a node is a group.
#10
hey moshe,
can you give an example of how og_is_group_type() would be used here?
the current patch is not detecting that i have made the basic casetracker project type the default group type.
i had to remove the if statements to get it to do anything.
this is an extremely important feature seeing as how casetracker has no built in node access and no views filter for "assigned to current user"
#11
I have to confess to that I don't have much clue about case tracker and og, but
as far as I can see,
$node_result->typeis the nodetype, so you are checking always for the nodetype "group", isn't it?og_is_group_type()allows you to check whether the specific node type belongs to og or notSo I think you should replace your
$node_result->type == 'group'-checks withog_is_group_type($node_result->type)But don't blame me, if I'm completely false, because I coded the last time with drupal seven months ago
(not because I'm not any more interested, but because of study related matters)
#12
+1 This works like a charm and is a critical patch to getting casetracker to work effectively with og.
* At first it didn't seem to work. I had to go flush out the modules page and empty the cache and perhaps re submit some of the admin forms before I noticed the changes.
#13
subscribe
#14
The function
og_is_group_type()exists only if you have installed the OG module. We can't use this function here, otherwise the CaseTracker module would break for non OG installations!#15
don't you check for the existence of og by "$node_result->og_groups"?
#16
I've modified the patch (copy code is bad practise, wrote the OG query string generation in a function) and integrated it in the casetracker module.
This is integrated since the #88464 commit.
#17
Released, see: #193431
#18
What happened to the link? Was fine earlier today, now it's not found.
#19
Hi. I think zero2one had created a broken release before he created this:
http://drupal.org/node/193612
#20
Thx!
#21
Yes , I created a release 5.x.2.0 and that was a wrong one.
I asked the website maintainers to remove that nodes.
The only right release is: http://drupal.org/node/193612 (or higher)
#22
#23
Could someone provide a more indepth summary of what this does exactly? I'm using OG and CT and I'm not exactly sure what this patch fixes. Also, which version of CT should be used with it?
#24
Pasting the description here. According to the casetracker project page:
The Case Tracker module supports now Organic groups:
* When creating a new Project for a group the group(s) is/are pre-selected in the groups box
* When creating a new case for a group Project the group(s) is/are pre-selected in the groups box
There is 1 special feature:
* If a user (user1) is in a group (group1) and creates a new case for a groups project (project1).
* Another user (user2) who is in multiple groups (group1 & group2) opens the case, sees that it is not for that project but for a project of group2 (project2), changes the project from project1 to project2.
* The user who created the case will still have access to the case he created! Otherwise this user won't have further access to own created case.