Add 'Loan type' information as a simple entity
Description
Environment
Potential Workaround
Attachments
defines
Checklist
hideActivity

Kathleen MooreFebruary 24, 2025 at 1:23 PM
confirmed this is working as expected on eureka snapshot

Emma_HaroyanFebruary 24, 2025 at 12:26 PM
Tested on Eureka Snapshot.
The following fields are available/queryable in the “Items” ET:
Temporary loan type — Name
Permanent loan type — UUID
Permanent loan type — Name
Temporary loan type — UUID
The following fields are available/queryable in the “Loans” ET:
Item permanent loan type — Name
Item temporary loan type — Name
Item permanent loan type — UUID
Item temporary loan type — UUID
All these fields are part of the exported CSV File.

Matt WeaverFebruary 20, 2025 at 9:17 PMEdited
As part of this, I had to make some somewhat arbitrary decisions that we can always change later if needed:
I went ahead and set up a dropdown menu for the loan type name, since it just makes sense for that field. We could do it for the UUID field, if we want, but we generally don’t bother with those, so I didn’t this time either.
When adding it to the Loans entity type (twice; once for temp loan type and once for permanent loan type), I went ahead and put them after the item fields and before the instance fields (so it’s [other loan fields], items, permanent item loan type, temporary item loan type, instance, […])
I didn’t bother setting an order on them in the items composite, since nothing else is ordered in that one right now (they’ll just show up in alphabetical order)
I set it up so only the UUID and name fields are essential (with only the name being visible by default) and put it into the composites as essentialOnly, so they only show those 2 fields now. Prior to this, neither field was essential nor visible by default
For the translations for these, I called the sources “Permanent loan type” and “Temporary loan type” in the items composite, and “Item permanent loan type” and “Item temporary loan type” in the loans composite
I removed the
source
andupdated_by
fields from the simple, since they seem to point to data that just isn’t there
FYI

Matt WeaverFebruary 20, 2025 at 6:18 PM
Oh, hey! It looks like we already have a “Loan type” entity type! It looks like it’s not quite correct (it has a “source” which doesn’t look like it corresponds to any real data in that table), but it shouldn’t be a big deal by any means to fix it up and add it to the items and loans ETs

Matt WeaverFebruary 20, 2025 at 4:58 PMEdited
For joining this with items, it looks like there’s are permanentloantypeid and temporaryloantypeid columns directly in the item table, which both have indexes. Assuming those are actually used, they would be a pretty solid choice. We already have both included in the simple_item
entity type, but we get the data for both from the item’s JSONB data instead of the columns with indexes, so if those columns are used, we should definitely update those entity type files to use the columns instead of JSONB; that will be significantly faster for querying and joining.
I don’t see a way to join the loan type directly with loans, but we already join loans with items, so we should be able to add it in by joining with the items without any issues.
Update: It looks like the real columns are actually used, based on the bugfest dataset, so I think it’s safe to switch from the JSONB version to the column version
Details
Assignee
Matt WeaverMatt WeaverReporter
Kathleen MooreKathleen MooreLabels
Priority
P3Story Points
1Sprint
NoneDevelopment Team
CorsairFix versions
Release
Sunflower (R1 2025)TestRail: Cases
Open TestRail: CasesTestRail: Runs
Open TestRail: Runs
Details
Details
Assignee

Reporter

make loan type as a queryable/displayable field in Lists/FQM
note: users have requested this data be available for loans, and item lists.
Acceptance criteria:
The loan type simple entity is added to the Items and Loans composite entities
Query results table display the “Permanent loan type” and “Temporary loan type”
“Permanent loan type” and “Temporary loan type” are available as fields to build a query