Worst Practices....
Tags: development
Currently I have to migrate documents from a (very complex) Notes/Domino application (written by someone else, no, not at our company!) to a Notes/Domino application written by us. By the way: the same bl**dy application as blogged some time ago.
After migrating some documents I tested them. I noticed, that my input validation (done by QuerySave, calling some script library functions as we have to do some complex computation) was broken: I was able to enter wrong data, got a (correct) error message - but when I cancelled out the trash had been saved.
So I started debugging the input validation, the script library, and so on. But I could not explain what was going on - I searched for a NotesDocument.save in the LS code, then for @Command([FileSave]) in some of the buttions. But of course I could not find anything (who would do such things?).
Finally I found out.
They had saved *some* (not all) of their documents with an item "SaveOptions", which was set to 1. And of course that was neither visible in the forms nor commented anywhere. Which leads to saving the documents when cancelling without even being asked.
Currently I have to migrate documents from a (very complex) Notes/Domino application (written by someone else, no, not at our company!) to a Notes/Domino application written by us. By the way: the same bl**dy application as blogged some time ago.
After migrating some documents I tested them. I noticed, that my input validation (done by QuerySave, calling some script library functions as we have to do some complex computation) was broken: I was able to enter wrong data, got a (correct) error message - but when I cancelled out the trash had been saved.
So I started debugging the input validation, the script library, and so on. But I could not explain what was going on - I searched for a NotesDocument.save in the LS code, then for @Command([FileSave]) in some of the buttions. But of course I could not find anything (who would do such things?).
Finally I found out.
They had saved *some* (not all) of their documents with an item "SaveOptions", which was set to 1. And of course that was neither visible in the forms nor commented anywhere. Which leads to saving the documents when cancelling without even being asked.










Comments
Posted by Chad Schelfhout At 22:12:51 On 03.02.2006 | - Website - |