QueryDragDrop and PostDragDrop bug in Notes 8 Standard
Bookmark :
I've discovered another bug in the Notes 8 standard client. The QueryDragDrop and PostDragDrop events in the Database Script object (Domino Designer > Other > Database Resources) does not seem to be working the same way as it used to in Notes 7 and still does in Notes 8 basic. This means than some of the IBM's original code in the mail 8 template that developers placed in the PostDragDrop in particular is not working as intended. For example, this piece:
... which is there to prevent people from drag & drop operations on Group Calendar documents, works correctly in Notes 8 basic, but does nothing in Notes 8 standard. This means people are able to drag Group Calendar documents to any folder. Similar code has been deployed in there by IBM to prevent people from dragging & dropping other elements, such as Mail Rules. the fact that this no longer works is a serious problem because by dragging/dropiing people can now remove rules from the Rules folder (yes, it is a folder) and put them into some other folder. Unfortunately, they cannot drag them back into the Rules folder. I believe I reported this to IBM months ago while Notes was still in 8.0 but it does not seem like this got too much attention. Their answer at the time was: use workaround that is use a basic client... How disappointing.
The underlaying reason is the fact that the sequence of execution in the source code seems to be different between basic and standard. While in Notes 7 and Notes 8 basic the "source.Documents" in this context returns a handle to the document collection representing documents that the user selected before drag & drop operation, in Notes 8 standard this is not the case. Instead this ends up being a handle to a single document that Notes shifts focus on after drag/drop operation has been executed prematurely.
To illustrate this, I put some debug code in the QueryDragDrop and PostDragDrop events in the Database Script object:
When you drag and drop documents between folders in this test database based on the Mail 8 template, you will get different results depending if you use Notes 8 basic on standard:
NOTES 8 BASIC (same as in Notes 7)
Note that when the dialogue box comes up, at this point selected document are still where they are. They were not yet moved to a target folder. This box shows document count for the Document Collection representing selected documents.
Also note that QueryDragDrop has already been executed correctly hence you see the message in the status bar from the "Print" statement I added there.
NOTES 8 STANDARD
The first capture was taken before I released the mouse button during the drag/drop operation (only drag, not drop yet). Note that QueryDragDrop has NOT been executed at all hence you see no message in the status bar from the "Print" statement I added there.
This second capture was taken after I released the mouse button during the drag/drop operation.
Note that when the dialogue box comes up, at this point selected document are no longer in their original location. They were not yet moved to a target folder (I know that from a separate test) but they were already removed form the source folder. In addition the handle to the Document Collection representing selected documents was already lost. Hence, the document count is zero. If there were other documents in the source folder, Notes would have shifted it focus to the first one and the resulting source.Documents would have been 1.
I'm not sure if someone already reported this to IBM. I intend to open a PMR for this as soon as I finish documenting it here. I will be posting the updates based on their response.
Sample database with a debug code can be found in the downloads section of my blog.


