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 for Exchange Out, Disposal, Gift, and Deaccession #2521

Closed
grantfitzsimmons opened this issue Dec 1, 2022 · 5 comments · Fixed by #4824
Closed

Add calculated fields for Exchange Out, Disposal, Gift, and Deaccession #2521

grantfitzsimmons opened this issue Dec 1, 2022 · 5 comments · Fixed by #4824
Assignees
Labels
1 - Request Improvements or extensions to existing behavior 2 - Interactions Issues that are related to interactions, including loans, exchanges, gifts, and more SeparationFrom6
Milestone

Comments

@grantfitzsimmons
Copy link
Member

grantfitzsimmons commented Dec 1, 2022

Exchange Out calculated fields currently are unsupported

  • Total Preps (Sum of all associated exchange out preparations)
  • Total Items (Sum of all associated collection object preparations)

Disposal calculated fields currently are unsupported

  • Total Preps (Sum of all associated disposal preparations)
  • Total Items (Sum of all associated collection object preparations)

Gift calculated fields currently are unsupported

  • Total Preps (Sum of all associated gift preparations)
  • Total Items (Sum of all associated collection object preparations)

Deaccession’s calculated fields currently are unsupported (#2114)

  • Total Preps (Sum of all associated disposal, gift, and exchange out preparations)
  • Total Items (Sum of all associated collection object preparations)

Requested By: RBGE, Pioneer Trails Regional Museum, University of Michigan

@grantfitzsimmons grantfitzsimmons added 1 - Request Improvements or extensions to existing behavior pri:unknown labels Dec 1, 2022
@grantfitzsimmons
Copy link
Member Author

This has been mentioned again today

@grantfitzsimmons grantfitzsimmons added 2 - Database/Schema Issues that are related to the underlying database and schema and removed Unsorted labels Jul 3, 2023
@grantfitzsimmons grantfitzsimmons changed the title Calculated fields for borrow Calculated fields for borrow, disposal, and all interactions matching 6 Oct 16, 2023
@grantfitzsimmons
Copy link
Member Author

Reported by Jordi at MCNB

image

@grantfitzsimmons grantfitzsimmons added this to the 7.9.6 milestone Apr 17, 2024
@grantfitzsimmons grantfitzsimmons changed the title Calculated fields for borrow, disposal, and all interactions matching 6 Add calculated fields for Exchange Out, Disposal, Gift, and Deaccession Apr 17, 2024
@grantfitzsimmons grantfitzsimmons added 2 - Interactions Issues that are related to interactions, including loans, exchanges, gifts, and more SeparationFrom6 and removed 2 - Database/Schema Issues that are related to the underlying database and schema labels Apr 17, 2024
@acwhite211
Copy link
Member

#4824 (comment)

I found the file https://github.com/specify/specify7/blob/production/specifyweb/specify/calculated_fields.py where many of the already implemented virtual calculated fields are coded. I think it will be good to extend this file, instead of using business rules. Although this file uses manually created sql code, so it would be ideal to use the Django ORM in this file where possible.

@alesan99
Copy link

alesan99 commented May 9, 2024

Note: currently the default form for Gifts uses these, which stops you from being able to save it through the visual editor.
q9xVldtgkf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - Request Improvements or extensions to existing behavior 2 - Interactions Issues that are related to interactions, including loans, exchanges, gifts, and more SeparationFrom6
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants