View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0007953 | mantisbt | time tracking | public | 2007-05-10 04:47 | 2008-08-11 09:41 |
Reporter | fman | Assigned To | daryn | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.1.0a3 | ||||
Fixed in Version | 1.2.0a2 | ||||
Summary | 0007953: Time Tracking assigment lost, when changing issue status without note text | ||||
Description | Try this
| ||||
Tags | No tags attached. | ||||
Attached Files | |||||
parent of | 0009179 | closed | daryn | Port 0007953: Time Tracking assigment lost, when changing issue status without note text |
has duplicate | 0007971 | closed | giallu | time tracking information only saved on added comment |
has duplicate | 0008362 | closed | giallu | Note text is mandatory for time tracking while closing bug |
has duplicate | 0008647 | closed | daryn | Notes are not saved when closing an issue |
related to | 0008509 | closed | giallu | Empty Note is added when updating issue |
In the bug_update.php file, the note type is not getting set or sent to the bugnote_add function. So even if a comment is made the reports will likely not be correct because the note type is defaulted to a normal bugnote rather than a time tracking note. In addition, when the status is changed to closed or resolved the bug_close and bug_resolve functions from the bug_api call bugnote_add. Neither function assigns the note_type or checks for time tracking information. If the text is empty, it skips the add note. I would think the check for empty text and time tracking information should happen in the bugnote_add function so that it doesn't have to be duplicated in five different places. There is also a note in the code regarding whether or not time tracking hours should be allowed with a blank comment. My opinion is that this should be configurable. This is a fairly simple fix and I would be happy to submit a patch for it. Anyone else have a preference as to whether this should be fixed in bugnote_add or if each place that calls bugnote_add should perform the checks first? |
|
In bug_update.php, Replace: With: |
|
Posted to mantis dev list on Friday 10-19-07: The bug was resolved with a fix to bug_update.php. There are three The bug_assign function also calls bugnote_add but as far as I can tell |
|
Posted to mantis dev list on Friday 10-19-07 Giallu, Sorry I missed your comment on IRC, I was in a meeting. I would be Daryn |
|
Posted by vboctor to dev list on Friday 10-19-07 Hi Daryn, I don't have the code handy now, but I agree with you that moving such bugnote_add()
This way all places that call bugnote_add() can call it without having Again, this is all based on memory, so my response may not be Thanks a lot for offering to provide a patch, I am looking foward to review it. I assume that you should have the access to reopen a resolved issue. |
|
Posted by Gianluca to dev list on Saturday 10-20-07. I agree on the general concept that the logic in pages should be moved In this case, I think the main problem is that bugnote_add() should be You should also have a look at a past discussion about time tracking http://thread.gmane.org/gmane.comp.bug-tracking.mantis.devel/1312 where I made a proposal that could help (despite I'm sure if you could thanks for your help Gianluca |
|
Discussion between daryn and giallu on IRC Monday 10-22-07 [09:41] <daryn> i was looking at the discussion as you suggested |
|
Apply to SVN Revision 4704. Changes to fix Bug 7953:
|
|
Daryn, looks good. Following are some comments: bugnote_add() -- should send email, can add a flag that controls whether it should be sent or not. This may be useful to inhibit the bugnote addition email if it is part of a bug update or bug reslove. This change makes it easier for SOAP API and other API to reuse the sending of emails (i.e. avoid it being forgotton). config_defaults_inc - fix indentation, use tabs. bug_close()/bug_resolve() - fix indentation. bugnote_add() should this method be using config_get_global() to get table names? bugnote_add(): adjust indentation, you seem to be using spaces rather than tabs. |
|
Daryn, please also make sure that any change of the interface / semantics of bugnote_add() or whatever else modified core APIs should be modified in the usage by api/soap/*. |
|
Moved checks for adding a bugnote into the bugnote add function. |
|
MantisBT: master bda0f406 2008-04-21 13:28 Details Diff |
Fix bug 0007953, 0007971, 0008362, 0008647, 0008509 Moved checks for adding a bugnote into the bugnote add function. Added configuration option for allowing adding time tracking without bugnote text. This defaults to ON. Moved email on adding a bugnote into the bugnote add function with a parameter to specify whether an email should be sent or not. Defaults to send email. Updated calls to bugnote add to prevent sending the email in cases where an email is already being sent. git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@5187 <a class="text" href="/?p=mantisbt.git;a=object;h=f5dc347c">f5dc347c</a>-c33d-0410-90a0-b07cc1902cb9 |
Affected Issues 0007953, 0007971, 0008362, 0008509, 0008647 |
|
mod - bugnote_add.php | Diff File | ||
mod - config_defaults_inc.php | Diff File | ||
mod - core/bug_api.php | Diff File | ||
mod - api/soap/mc_issue_api.php | Diff File | ||
mod - bug_update.php | Diff File | ||
mod - bug_reminder.php | Diff File | ||
mod - core/bugnote_api.php | Diff File |