Was wondering if you could embed print friendly-ness into the list. You can make fantastic views with the casetracker types, but then can't print it nice.

Also, can you add a completion date requirement into a case?

Comments

alt_paul’s picture

This wouldn't be too hard to do. There's a status, type, and priority. You could just add Month and Day, and add all 12 months, and all 31 days for each respective drop-down. Then, you would also be able to change the end date easily and on the fly. I experimented with giving Event attributes a case node, but it doesn't work too well. You have to go in and edit the node to change the date which doesn't work if you don't have the permissions to do that.

morbus iff’s picture

Theoretically, if you "close" a case using a comment, that comment's timestamp would be representative of the "Completion Date".

reqIUm’s picture

A completion date (ie a due date) would be an excellent feature (something that you could just look on the case list and see that your a case is it is due in "2days 3hours"). I think this would be especially good for implementations where a project manager assigns tasks to groups or individuals for completion, and where there are deadlines taht must be met.

It would be really cool if, istead of the priority selection, the priority was determined dynamically by the number of days to go before it is due - ie urgent if 1 day to go, medium if a week left to go, etc.

Ill see if i can make any headway into it,

-S

morbus iff’s picture

For due dates, I'm integrating with the event.module. A CCK case is also an event node type, and the "due date" is the "End date" as provided by event.module. This also allows it to be used in the calendar. As alt_paul says, though, commenters can't change the End date (which may be a good thing in the long run, as only the creator of the case could approve such a drastic slippage). With that said, your idea of priority switching is rather nice, and it WOULD be possible to extend to the event stuff to comments as well. It is something I will plan to do eventually.

reqIUm’s picture

Integration with the event module sounds great.. in the meantime ive just added a simple form component (type = 'date') to set a due date, and am going to insert it into the db as "case_due_date". The only thing is im not sure how to retreive its value from the database in one section of the code: that is im not sure what the "cc."s mean, eg in "cc.case_priority_id" (and i don't even know what they're called to search for them!). Should i use "cc.due_date" or "ncs.due_date", etc?

Thanks in advance!
-S

morbus iff’s picture

This is not something I will spend a lot of time helping you with. You'd want "cc" (it's a table abbreviation for
"casetracker_case" and is defined in the SQL query, not the database).

reqIUm’s picture

Thankyou for your help, ive actually got it up and running now, and it was quite simple to do (after getting past the cc). It was also easy to give it a "dynamic state changes" (one ive used is replacing due date with 'OVERDUE' in red letters when time has elapsed). If anyones interested i just used:


function format_timestamp($date = 1) {
return mktime(0,0,0,$date['month'],$date['day'],$date['year']);
}
...

  $form['casetracker_case_information']['case_due_date'] = array(
    '#type'              => user_access('assign case to user') ? 'date' : 'hidden',
    '#title'             => t('Due Date'),
  );

And use "format_timestamp($node->case_due_date)" to insert it onto the database

To give the countdown and any "dynamic state changes" you can just match it to some checks:

                    (format_interval($result->task_due_date - time()) == '0 sec') ? ($result->task_status_id == 'Ready (to be committed)') ? '<strong class="error">'.t('Overdue').'</strong>' : t('%time to go', array('%time' => format_interval($result->task_due_date - time()))),

I hope this is useful to someone else.. Morbus i could make a patch for it if you'd like if you wanted to add a placeholder for the event integration?

-S

markdionne’s picture

As of June 2007, in Drupal 5, you can add a Due Date field by editing the "Case" Content Type and adding a new field.

zero2one’s picture

Status: Active » Closed (won't fix)

I'm sorry but there will be no further development for the drupal 4.7 branch...