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

Add calculated fields to Loan #1193

Closed
tlammer opened this issue Mar 16, 2022 · 6 comments
Closed

Add calculated fields to Loan #1193

tlammer opened this issue Mar 16, 2022 · 6 comments
Assignees
Labels
1 - Bug Incorrect behavior of the product 2 - Interactions Issues that are related to interactions, including loans, exchanges, gifts, and more SeparationFrom6
Milestone

Comments

@tlammer
Copy link

tlammer commented Mar 16, 2022

From @grantfitzsimmons:
Loan has a number of calculated fields:

  • totalPreps - Count of all associated loan preparations records
  • totalItems - Count of all associated collection object preparations records
  • unresolvedPreps - Count of all loan preparation records that are not resolved
  • unresolvedItems - Count of all collection object preparation records that are not resolved
  • resolvedPreps - It is the result of totalPreps - unresolvedPreps
  • resolvedItems - It is the result of totalItems - unresolvedItems

These need to be visible and functional when added to the form. These are in the default form definition for Loan.

Relevant Specify 6 code:
https://github.com/specify/specify6/blob/945d28f00288d2d64979848fb2fb63fda34bdd1b/src/edu/ku/brc/specify/datamodel/Loan.java#L807-L838

Original comment by @tlammer:

The latest version of specify 6 added calculated fields, similar to the ones in Loan, to Gift, Accession, and Exchange Out. The fields are blank in Specify 7

@tlammer tlammer added 1 - Bug Incorrect behavior of the product pri:unknown labels Mar 16, 2022
@tlammer tlammer added this to Unsorted in Catching up with Sp6 via automation Mar 16, 2022
@tlammer tlammer added this to Unsorted in Forms via automation Mar 16, 2022
@grantfitzsimmons grantfitzsimmons added this to the a11y milestone Mar 31, 2022
@maxpatiiuk maxpatiiuk removed this from the a11y milestone May 17, 2022
@maxpatiiuk maxpatiiuk removed this from Unsorted in Forms Jun 14, 2022
@maxpatiiuk maxpatiiuk added this to Unsorted in Interactions via automation Jun 14, 2022
@maxpatiiuk
Copy link
Member

See also #1009

@grantfitzsimmons
Copy link
Member

@benanhalt Can you use the changes for the accession, preparation, and collectionobject calculations to solve this?

@benanhalt
Copy link
Contributor

To a certain degree. I still need to go into 6 and see what the actual calculations are and replicate them in 7.

@bronwyncombs
Copy link

Reported by Corinna as CSIRO:

I am just playing around with the accession form and I am trying to display the object count with a label of 'Total databased' (3rd row highlighted). My CO count for this accessionID is currently 12 - in the form it displayed 55. So I ended up pasting all the count fields from the original form back in to see what's happening (the red bracketed section), and I only see the '55' value against the 'total current Items' label. I suspect that includes a count of preps as well? At any rate, why are the other three count fields not populating and how can I get the count of the collection objects displayed? Any thoughts?
image

@grantfitzsimmons
Copy link
Member

grantfitzsimmons commented Dec 14, 2023

From my comment:

image

Specify 7 supports the actualTotalCountAmt calculated field, but as Bronwyn mentioned, we do not support the other fields included on the default Accession form (totalCountAmt, preparationCount, or collectionObjectCount )

The count field you are looking for to give a sum of all collection objects is unfortunately the collectionObjectCount field rather than the actualTotalCountAmt field which sums the counts of all preparations in the list of associated collection objects.

See on Asana

@grantfitzsimmons grantfitzsimmons changed the title Support Calculated fields in Gift, Accession, and Exchange Out Add calculated fields to Loan Apr 17, 2024
@CarolineDenis CarolineDenis assigned sharadsw and unassigned benanhalt May 24, 2024
@CarolineDenis CarolineDenis added this to the 7.9.x milestone May 24, 2024
@sharadsw
Copy link
Contributor

sharadsw commented May 24, 2024

Looks like this already got added at some point after this issue was created.

This is on KU_VertPaleo_1_11_23 (edge):
image

KU_Fish_Tissue (edge) has them under shipments:
image

Catching up with Sp6 automation moved this from Unsorted to Shipped May 24, 2024
Interactions automation moved this from Unsorted to Shipped May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - Bug Incorrect behavior of the product 2 - Interactions Issues that are related to interactions, including loans, exchanges, gifts, and more SeparationFrom6
Projects
Interactions
  
Shipped
Development

No branches or pull requests

7 participants