feat(datamodel): Add agent fields to Loan and Gift#7190
feat(datamodel): Add agent fields to Loan and Gift#7190grantfitzsimmons merged 8 commits intomainfrom
Conversation
Triggered by 217a13b on branch refs/heads/issue-7090
emenslin
left a comment
There was a problem hiding this comment.
- Verify that 5 new agent fields have been added to the schema for both the
giftandloantables - Verify that these fields are hidden by default, with schema captions and labels that correspond to the field name (e.g. "Agent 1")
- Verify that the default "Loan" and "Gift" view definitions have commented out agent fields now
- Add the 5 agent fields to both forms via the form editor
- Verify the fields appear in queries
- Verify that you can, in both tables:
- Add data to all 5 agent fields (search for existing agents, create a new agent)
- Upload data to these relationships via the WorkBench
- Edit existing data in these fields using Batch Edit
Only issue I found is that default gift view definition has the commented out agent fields but the default loan view definition does not.
Additionally I wanted to note that you cannot batch edit Gifts (#5417 (comment)), but batch editing loans with the agent fields works!
emenslin
left a comment
There was a problem hiding this comment.
- Verify that 5 new agent fields have been added to the schema for both the
giftandloantables - Verify that these fields are hidden by default, with schema captions and labels that correspond to the field name (e.g. "Agent 1")
- Verify that the default "Loan" and "Gift" view definitions have commented out agent fields now
- Add the 5 agent fields to both forms via the form editor
- Verify the fields appear in queries
- Verify that you can, in both tables:
- Add data to all 5 agent fields (search for existing agents, create a new agent)
- Upload data to these relationships via the WorkBench
- Edit existing data in these fields using Batch Edit
Looks good, agents are now commented out on the loan view definition!
There was a problem hiding this comment.
- Verify that 5 new agent fields have been added to the schema for both the
giftandloantables - Verify that these fields are hidden by default, with schema captions and labels that correspond to the field name (e.g. "Agent 1")
- Verify that the default "Loan" and "Gift" view definitions have commented out agent fields now
- Add the 5 agent fields to both forms via the form editor
- Verify the fields appear in queries
- Verify that you can, in both tables:
- Add data to all 5 agent fields (search for existing agents, create a new agent)
- Upload data to these relationships via the WorkBench
- Edit existing data in these fields using Batch Edit
The agent fields do not appear in schema config. They are visible in the query builder, but running the query causes an error. They are commented out in the gift and loan default forms, but adding these to the form causes an error when you access them.
Crash report:
Specify 7 Crash Report - 2025-08-14T17_23_30.261Z.txt
Database: lsumz_mammals_migration7090_2025_08_14
Collection: Mammals
User: spadmin
|
@lexiclevenger I think this is the problem: In short, another migration using the |
|
@grantfitzsimmons I reimported the database and tried again but am running into the same problems |
lexiclevenger
left a comment
There was a problem hiding this comment.
- Verify that 5 new agent fields have been added to the schema for both the
giftandloantables - Verify that these fields are hidden by default, with schema captions and labels that correspond to the field name (e.g. "Agent 1")
- Verify that the default "Loan" and "Gift" view definitions have commented out agent fields now
- Add the 5 agent fields to both forms via the form editor
- Verify the fields appear in queries
- Verify that you can, in both tables:
- Add data to all 5 agent fields (search for existing agents, create a new agent)
- Upload data to these relationships via the WorkBench
- Edit existing data in these fields using Batch Edit
Looks good now!
Fixes #7090
This PR adds 5 agent fields (
agent1,agent2,agent3,agent4, andagent5) to both theLoanandGifttables. This allows users to directly link to agents from these records without using theloanAgentsrelationship (one-to-many).This works to address primarily the issues with missing functions for report generation, particularly the
getByLoanAgentRolescriptlet. There have been requests from other users to simply have direct relationships to simplify the use of these forms in other contexts.Warning
This PR affects database migrations. See migration testing instructions.
Checklist
self-explanatory (or properly documented)
Testing instructions
UX/UI Testers
giftandloantablesDevelopers