Date index for Mar 2003


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug in NF_TRACK_CHANGES? [was: Re: [achievo] PostAdd -> PostEdit for project class]



At 16.58 13/03/2003 +0100, you wrote:
At 13.16 13/03/2003 +0100, you wrote:
Since the project node is NF_EDITAFTERADD, you can ignore postAdd() and just use postUpdate() and postDel(). You might want to add NF_TRACKCHANGES so you in postUpdate() get the orginialrecord and easily could see wether the project is totally new or "merely" updated.

I really like this solution and I've adopted this, works perfectly!

Little problem: $rec["atkoldrec"] is different from $rec in several ways, generally it contains way less data in it (for instance in $rec coordinator is a field composed only by "userid" whereas $rec["atkoldrec"] has userid and name in it. This can be a problem for two reason:


1) it's quite difficult to build a "isProjectUpdated($rec,$rec["atkoldrec"]) function that is aware of this fact (and moreover you're going to modify this function it whenever you add an attribute to the project class
2) it would be useful to be able to access to all the data that is stored in $rec["atkoldrec"] (for instance, $rec["coordinator"]["name"]) without having to make a new query to the database


maybe I don't have understood something in atk logic, otherwise i think there could be a "bug" in atknode class (updateDb function)

I've not tried V.0.9.2 yet, but 0.9.1 seems to have the same problem.

Thanks a lot,
Pietro Ravasio






-- Pietro Ravasio <pietro.ravasio dot  System and Network Engineer Abbeynet s.r.l. -
http://www.abbeynet.it TEL: +390702109044 FAX: +390702109013


http://www.achievo.org/lists achievo.org - ©1999-2002 ibuildings.nl BV