saved-search scrivenings add random documents

Not a descriptive title; I apologize. Here’s the weird bug I’m getting that I finally managed to reproduce, though it’s a bit funky:

I have a saved search based on custom meta-data. I keep it open in one editor pane so I can watch my word count while doing the actual typing, checking other docs, etc. in the second pane. When I close the project and reopen, the editor showing the custom search (for A) still has the proper title but it’s showing additional documents–ones that have a different set of meta-data (B) in that custom field. It doesn’t show all the additional documents, but it always includes one from group B any time there are two more more B documents between A documents in the binder. Eg. if my binder looks like this: A, B, A, B, B, A then the search should just show A, and it does, but my scrivenings session on reopen will show A, A, B, A. In one project it’s always the last B document before the next A, but in my latest test project it was the first, so I don’t know if there’s any kind of real pattern there. And in fact I just reproduced this in a blank project with it showing everything, so…yeah.

To reproduce:

  1. Create a set of 6 documents in the Binder with a custom meta-data field (“test”)
  2. Make documents 1, 3, and 6 “test: A”
  3. Make documents 2, 4, and 5 “test: B”
  4. Make a saved search for custom meta-data “A”
  5. Open that search as a Scrivenings session
  6. Close the collections view so only the regular binder is showing (for some reason, this is key)
  7. Close the project
  8. Reopen the project. The editor should still be showing the saved search (it will have the search title in the header), only it will include additional B documents

Like I said, I just tested this and it actually included all the documents, but typically (perhaps a difference of using split pane or having text in the documents) I get additional B documents only when there are two or more between A documents and then only one for each set is added. If it makes a difference for the bug tracking, I can work out a way to replicate that.

2.0 (build 6094) on OS X 10.6.5

This also works with other view modes too. A corkboard of a saved collection will lose specificity after a reload, if binder is the selected tab upon project load. Any collection tab selection other than Binder will suffice to retain the original view, from what I can tell. Standard collections do not exhibit this problem—just the dynamic ones (Search Results included).

Note in both screenshots, “a” is in the header bar, and that after project load, the original selection is retained despite the addition of new cards to the corkboard.

Ouch. This one was painful. However, I think I’ve now nailed this one for 2.0.1.


Yay, thanks, Keith! I’m sorry it was painful. But hey, it’s Friday! Beer night, right? :slight_smile: And thanks Ioa for the more thorough testing. I got so carried away when I finally managed to reproduce it and knew I wasn’t just crazy with that one project that I forgot to really test it. Heh.

On the other hand, it was fun to finally see Trash, Research, and Draft on a corkboard together. :slight_smile: