|
2 | 2 | Customising Roundup |
3 | 3 | =================== |
4 | 4 |
|
5 | | -:Version: $Revision: 1.202 $ |
| 5 | +:Version: $Revision: 1.203 $ |
6 | 6 |
|
7 | 7 | .. This document borrows from the ZopeBook section on ZPT. The original is at: |
8 | 8 | http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx |
@@ -3386,6 +3386,32 @@ be able to give a summary of the total time spent on a particular issue. |
3386 | 3386 | the code changes. When that's done, you'll be able to use the new |
3387 | 3387 | time logging interface. |
3388 | 3388 |
|
| 3389 | +An extension of this modification attaches the timelog entries to any |
| 3390 | +change message entered at the time of the timelog entry: |
| 3391 | + |
| 3392 | +1. Add a link to the timelog to the msg class: |
| 3393 | + |
| 3394 | + msg = FileClass(db, "msg", |
| 3395 | + author=Link("user", do_journal='no'), |
| 3396 | + recipients=Multilink("user", do_journal='no'), |
| 3397 | + date=Date(), |
| 3398 | + summary=String(), |
| 3399 | + files=Multilink("file"), |
| 3400 | + messageid=String(), |
| 3401 | + inreplyto=String() |
| 3402 | + times=Multilink("timelog")) |
| 3403 | + |
| 3404 | +2. Add a new hidden field that links that new timelog item (new |
| 3405 | + because it's marked as having id "-1") to the new message. |
| 3406 | + It looks like this:: |
| 3407 | + |
| 3408 | + <input type="hidden" name="msg-1@link@times" value="timelog-1" /> |
| 3409 | + |
| 3410 | + The "times" property of the message will have the new id added to it. |
| 3411 | + |
| 3412 | +3. Add the timelog listing from step 5. to the ``msg.item.html`` template |
| 3413 | + so that the timelog entry appears on the message view page. |
| 3414 | + |
3389 | 3415 |
|
3390 | 3416 | Tracking different types of issues |
3391 | 3417 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
0 commit comments