Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing interim fields in Transposed Multi Results Form #2406

Merged
merged 2 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Changelog
2.5.0 (unreleased)
------------------

- #2406 Fix missing interim fields in Transposed Multi Results Form
- #2400 Add Transposed Multi Results Form
- #2402 Fix user cannot enter future date for DateSampled when sampling enabled
- #2401 Fix OverflowError when calculating datetime.min date for left-hand TZs
Expand Down
10 changes: 9 additions & 1 deletion src/senaite/core/browser/samples/multi_results_transposed.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,15 @@ def get_sample_folderitems(self, sample):
# the updated Analyses.
view.contentFilter = dict(self.contentFilter)
view.contentFilter["getAncestorsUIDs"] = [api.get_uid(sample)]
return view.folderitems()
items = view.folderitems()
# Interim columns are required for rendering in senaite.app.listing and
# are added in the Analyses View in the `folderitems` methdod.
# Therefore, we add the missing columns here!
# https://github.com/senaite/senaite.core/issues/2405
for col_id, col in view.columns.items():
if col_id not in self.columns:
self.columns[col_id] = col
return items

def get_analyses(self, full_objects=False):
"""Returns sample analyses from lab poc
Expand Down