2 messages in com.mysql.lists.eventum-develRe: Issue::insert() creates an issue ...
FromSent OnAttachments
William Bailey27 Mar 2006 04:04 
William Bailey27 Mar 2006 05:15 
Subject:Re: Issue::insert() creates an issue with an invalid status id.
From:William Bailey (wb@pro-net.co.uk)
Date:03/27/2006 05:15:18 AM
List:com.mysql.lists.eventum-devel

-----BEGIN PGP SIGNED MESSAGE----- Hash: RIPEMD160

Have just seen the Eventum wiki page and the 'Known Issue with Eventum 1.7.0' notice. Sorry for the duplication.

William Bailey wrote:

Hi All,

I have been playing with Eventum and have come across a small bug that will result in an issue being created with an invalid status value and therefore not displaying in the issues list.

The bug relates to the fact that when an issue is created Eventum assumes that a status of 'Assigned' is available, now since the administrator as full control over the Statuses available to Eventum projects there is a chance that this status does not exist and the issue gets assigned a status of '0'.

The quick fix is simple and involves checking that the id returned by the Status::getStatusID('Assigned') function call is > 0 and if so then we update the issue status. If not then we just carry on out way and leave the status as it is.

So in the Issue::insert() function replace the line...

Issue::setStatus($new_issue_id, Status::getStatusID('Assigned'), FALSE);

with...

if(Status::getStatusID('Assigned') > 0){ Issue::setStatus($new_issue_id, Status::getStatusID('Assigned'), FALSE); }

I suggest that a better fix would be to change the Issue::setStatus() function so that it will only set the status to a valid status id for the issue in question. However I don't know how this will effect the rest of the application.

- --

Regards,

iD8DBQFEJ+V9zSfrYDJMXmERA0JUAJ4mRGd6cJK7ZoRlNHHtE/koSoSsiACgnp3i Y2D031DnUi8LQsTnW4i0dvE= =kExY -----END PGP SIGNATURE-----