biocore / LabControl

lab manager for plate maps and sequence flows
BSD 3-Clause "New" or "Revised" License
2 stars 15 forks source link

Unselected plates get added when pooling #474

Closed wasade closed 5 years ago

wasade commented 5 years ago

In the attached .gif, a single amplicon plate is added during pool library plates (plate "Amplicon test plate 2019-04-22 15:47:49.390417"). This plate is then removed using the X, and does not appear to be visible. I then switch to adding shotgun plates, and add a single plate (named "Test Shotgun Library 2019-04-22 15:50:10.818223"). Following this, the display shows two plates: the shotgun plate added, and a 16S plate that was not previously added (named "16S Test plate 4").

pool_libraries

While writing up this issue, I was redoing this to get plate names, and after some delay, a reinitialization error message popped up (screenshot at the end).

Screen Shot 2019-04-22 at 5 08 08 PM

charles-cowart commented 5 years ago

I believe this is a known issue with the asynchronous callback. If you're a twitchy clicker, you can also get the same plate twice if you double click fast enough. This should be fixed, but it's also a known issue, and the wet-lab knows to just delete the entries they don't want.

AmandaBirmingham commented 5 years ago

@charles-cowart No, this is definitely something different--it is adding plates that were never clicked on, ever!

@wasade Did you observe this issue in the current master or in PR https://github.com/jdereus/labman/pull/468 ? I can reproduce it in the PR but not in the master, which makes me think this is not an existing issue but a bug in the (unmerged) PR (thank you for the thorough testing!!)

charles-cowart commented 5 years ago

Gotcha, I'll check too with the unmarked PR

AmandaBirmingham commented 5 years ago

@charles-cowart dinna fash yersel, I believe I found the cause (and I believe this IS only in the PR). The PR is missing this line:

https://github.com/jdereus/labman/blob/645c798e0094e9962973c2d111c4860b1e8e5b23/labcontrol/gui/templates/library_pooling.html#L383

... that was in the old labcontrol/gui/templates/library_pooling.html but didn't get moved into the new setUpAddPlateModal.js. Wouldn't you know, it actually does something? :) Specifically, it removes OLD event handlers from the add buttons in the add plate modal dialog ... and this isn't needed on other pages but most desperately IS needed on the library_pooling.html page because you can CHANGE the contents of the add plate modal dialog by changing the plate type.

I think this is an easy fix and I will incorporate it into the PR when I go through the code review comments.

charles-cowart commented 5 years ago

@AmandaBirmingham Aye, thank ye!

wasade commented 5 years ago

@AmandaBirmingham, ya was within #468, sorry for not being clear about that. And good find on the underlying issue!