Requirements to Partition a Sample

Hello,

I’ve just installed Senaite 2.2.0 and I was interested in the partitioning functionality. Our situation is that we will receive bags of samples that need to be tested separately, but the results need to be reported by bag.

I followed the quick start guide for Senaite 2.2.0, down to: https://www.senaite.com/docs/sample-partitions and I’m not seeing a button or prompt for partitioning samples. Perhaps there is an option to activate? Are there requirements to satisfy for a sample to be partitioned?

Hi @cwisch

Once your select a sample from your samples list, you should see a create partitions button at the bottom of the page

Hi @ronaldm,

Thanks for posting the screenshot, my install of Senaite does not look like this, I have all the options except “create partitions”.

Should “create partitions” show up for every sample, or are there certain contexts that it shows up? For example only certain types of units?

Thank you,

-Corey

Hi @cwisch

Which version of Senaite Core and Senaite LIMS are you on?

Your problem might be as a result of:

I came across this github issue as well and I had trouble making sense of it. When I’ve been making samples I have been signed in as the admin user, so I wouldn’t think I would be seen as a “client” of the organization. But perhaps that is the case?

As for versions, I appear to be on 2.2.0 for everything:

Quick update, I’ve installed Senaite multiple different ways, and I finally restored the “create partitions” button, by “unpinning” senaite.lims to senaite.core 2.2.0. I used the current build of senaite.core as development egg, and removed senaite.core=2.2.0 from the setup.py of senaite.lims.

The result is that the analyses portion of the samples break in a myriad of ways. The most obvious is the analyses portion of the sample breaks:

2022-09-14 19:19:31,590 ERROR   [Zope.SiteErrorLog:252][waitress-0] 1663183171.590.894890538015 senaite.test.com:8080/senaite/clients/client-1/ops-0001/table_lab_analyses/folderitems
Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 162, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 371, in publish_module
  Module ZPublisher.WSGIPublisher, line 274, in publish
  Module ZPublisher.mapply, line 85, in mapply
  Module ZPublisher.WSGIPublisher, line 63, in call_object
  Module senaite.app.listing.view, line 224, in __call__
  Module senaite.app.listing.ajax, line 111, in handle_subpath
  Module senaite.core.decorators, line 22, in decorator
  Module senaite.app.listing.decorators, line 63, in wrapper
  Module senaite.app.listing.decorators, line 50, in wrapper
  Module senaite.app.listing.decorators, line 100, in wrapper
  Module senaite.app.listing.ajax, line 436, in ajax_folderitems
  Module senaite.app.listing.decorators, line 88, in wrapper
  Module senaite.app.listing.ajax, line 317, in get_folderitems
  Module bika.lims.browser.analyses.view, line 700, in folderitems
  Module senaite.app.listing.view, line 938, in folderitems
  Module bika.lims.browser.analyses.view, line 651, in folderitem
  Module bika.lims.browser.analyses.view, line 889, in _folder_item_result
KeyError: 'help'

So perhaps going back to version 2.1.0 is the answer since partitions seem to have issues in version 2.2.0.

@ronaldm Downgrading to 2.1.0 and now it appears to behave as shown in the documentation.