I tried to enable this feature on a fresh installation of Open Atrium beta8, and it completely broke my installation, to the point that I had to reinstall. When I enabled it, I got a bunch of errors like warning: mysql_real_escape_string() expects parameter 1 to be string, array given in /var/www/drupal/atrium/includes/database.mysql.inc on line 321.. It completely destroyed the Case and Project content types as well, so bad that I couldn't even "revert" them from the Casetracker feature (which is why I had to reinstall)

Comments

bryan kennedy’s picture

I can confirm this same behavior. Interestingly, even though the case tracker content types disappear from the admin content type menu, all the case tracker content is still there in all my groups. They don't have the due date field, but they didn't disappear with the loss of the content type.

bryan kennedy’s picture

I edited the .info file for the case tracker due date feature to not require the case_tracker_basic module and the content types don't disappear. However, as soon as I enable the casetracker_basic module they disappear. When I disable it again, they come back. I know this isn't much insight, but I just wanted to share as I try and dig into the issue.

I'm not fully sure of how the atrium_casetracker, casetracker, and casetracker_basic module relate.

Anonymous’s picture

Title: Borks Open Atrium beta8 install » MySql errors & missing content types in Open Atrium beta8 install

Thanks for the reports!

I am excited that beta8 is available. It was hard to track head with so many huge changes going on.

I'll get to work on this in the near future. Please report any more details you are able to track down.

Anonymous’s picture

I'm working on tracking this down.

It seems to be an issue that happens when the module is first installed, because disabling and even removing the module doesn't cause the errors to go away.

I'm using the demo module to take snapshots of the DB and revert to them on a clean atrium-beta8 install. If anyone else has time to help debug this issue, I suggest using that technique.

bryan kennedy’s picture

I've been able to get it 90% working, by disabling parts of the functions in the install of the module. It's weird. When it boils down to it "I think" it has something to do with the alter to the calendar view. The alter seems to need it's own argument for the due date type, rather than having the due date type being included in the argument for the event types. Getting close to a patch...

bryan kennedy’s picture

Assigned: Unassigned » bryan kennedy
Status: Active » Needs review
StatusFileSize
new4.03 KB

Patch

OK here's a patch that worked for me to fix the problem. Please review and test it out on your install. Just to be clear, I am using this on Open Atrium specifically. I'm not entirely sure if people are using this without Open Atrium...maybe I'm assuming too much there.

What I did:

  • removed the casetracker_basic module depenency
  • modified the alters to the calendar view
    • setup the due_date field as its own argument
    • added a filter that prevents cases from showing up on the calendar if there is no due date assigned

Upgrade path

What I did to test

  1. Created a dev version of my Open Atrium site (pre beta 8)
  2. Replaced my old Open Atrium code with the new Open Atrium beta 8 code
  3. Clear all caches
  4. Followed the upgrade instructions here and then here. AKA - upgrade the db, and reset your features.
  5. Clear all caches
  6. Enable the casetracker_duedate module (with this patch obviously)
  7. Seems like things work. I can see all the content types, no MySQL errors, and I can add due dates to cases, causing them to show up in the calendar and upcoming views.

Whitespace

When I made the patch I told the diff to ignore the whitespace. There are lots of stray whitespace endings in the module file. It'd be good to clean those out, but I didn't want to confuse this patch with that extra stuff.

Hope this works for others as well.

knarzer77’s picture

StatusFileSize
new17.2 KB

Hello,

I tried the patch and it works. But I have another problem: I have entered a task with dates from 01.07.2010 to 31.07.2010. But in the calendar the case is shown form 30.06.2010 to 30.07.2010 (see attachement).

Jan

bryan kennedy’s picture

That's interesting. The case content type shouldn't have a from and to due date. It just has a single date value. Right?

Anonymous’s picture

@knarzer77 - Can you please open a new issue to describe that problem? It doesn't relate to this issue.

@bryan - I will be testing the patch soon. It looks great at first glance, though. Thanks so much for your help tracking this down!

bryan kennedy’s picture

I think knarzer77 actually found a bug in this patch. I've got the granularity for the due date field settings including the hours, min, and sec. The default format in the view is also wrong. So I'm working on a 2nd patch that I'll upload here in a little bit.

Anonymous’s picture

Status: Needs review » Needs work

@bryan kennedy - Thanks. Looking forward to it.

Anonymous’s picture

@bryan - Are you still working on the patch? I was hoping to fix this bug up tomorrow. If you're busy with other stuff, no worries. Just wanted to check in. Thanks!

langworthy’s picture

StatusFileSize
new3.84 KB

Patch in #6 re-rolled so it applies cleanly for contrib (and can be included in a make file).

langworthy’s picture

I don't see where a to date is part of the casetracker_duedate functionality referenced in #7. I only see a single date field.

langworthy’s picture

StatusFileSize
new3.84 KB

It seems that some versions of drush don't like patch files with spaces in them. sorry for so many posts in here with essentially the same patch.

Anonymous’s picture

@langworthy - First off, thank you so much for your work on this patch. I apologize for not being more responsive. I'm at Pacific Northwest Drupal Summit now and I'm going to get your work committed. :)

The patch works great! That's awesome.

Only one question before I commit it: What is the reasoning behind removing the casetracker_basic dependency? The view and the due date field both depend on that module.

As soon as we have that question resolved, I'll commit it.

Thanks again!

Anonymous’s picture

Sorry. My bad. I didn't realize bryan added the original patch. I should be asking him about the decision to remove casetracker_basic.

I'm going to re-add the casetracker_basic dependency then commit. If there's an argument for removing casetracker_basic, then please re-open this issue.

Thanks!

langworthy’s picture

just to clear up all I did was re-roll so that the file paths in the patch were correct.

Anonymous’s picture

Status: Needs work » Fixed

Committed and closed! Thanks all!

http://drupal.org/cvs?commit=430720

PS - I also changed the format from "default" to "day"

Anonymous’s picture

AH HA! I discovered why Bryan removed the dependency on casetracker_basic.

Open Atrium basically forks casetrakcer_basic in their atrium_casetracker feature. If you have them both enabled, the delcare a lot of the same stuff and that causes most of the error messages.

So, to make this module compatible with OA and non-OA casetracker, we have to remove the explicit dependency on casetracker and rely on an implicit dependency. People will need to read the homepage or the readme to realize that they need one or the other (BUT NOT BOTH) installed.

http://drupal.org/cvs?commit=430742 removes the dependency

I'll update the readme in a moment.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.