-
Notifications
You must be signed in to change notification settings - Fork 36
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
Update Schema Config to include new geo fields and COG picklists #5257
Conversation
Missing Sp tables in Schema Config: NOTE: ALL missing tables in Schema Config - Most of these seem to be only be internally used: |
TODO: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing instructions
Test new geo fields
StorageTreeDef -> institution
CollectionObjectGroup -> children
- Verify above fields exist in Schema Config
Test COG picklists in Workbench
- Create a workbench dataset with base table CollectionObjectGroup
- Map a column to
CogType -> name
and toCogType -> type
- Click save
- Verify
CogType -> name
consists of all CogTypes added in the db as table records - Verify
CogType -> type
consists of values: Discrete, Consolidated, Drill Core
Test COG picklists in Data Entry
Here are some viewdefs that can be used to test the picklists in data entry
CollectionObjectGroup
<viewdef name="CollectionObjectGroup" class="edu.ku.brc.specify.datamodel.CollectionObjectGroup" type="form" gettable="edu.ku.brc.af.ui.forms.DataGetterForObj" settable="edu.ku.brc.af.ui.forms.DataSetterForObj">
<desc>The CollectionObjectGroup Table</desc>
<enableRules/>
<columnDef>p,2px,p,2px,p,2px,p,2px,p,2px,p,p:g</columnDef>
<rowDef auto="true" cell="p" sep="2px"/>
<rows>
<row>
<cell type="label" labelfor="1"/>
<cell type="field" id="1" name="name" uitype="text"/>
<cell type="label" labelfor="2"/>
<cell type="field" id="2" name="cogtype" uitype="combobox"/>
</row>
</rows>
</viewdef>
CollectionObjectGroupType
<viewdef name="CollectionObjectGroupType" class="edu.ku.brc.specify.datamodel.CollectionObjectGroupType" type="form" gettable="edu.ku.brc.af.ui.forms.DataGetterForObj" settable="edu.ku.brc.af.ui.forms.DataSetterForObj">
<desc>The CollectionObjectGroupType Table</desc>
<enableRules/>
<columnDef>p,2px,p,2px,p,2px,p,2px,p,2px,p,p:g</columnDef>
<rowDef auto="true" cell="p" sep="2px"/>
<rows>
<row>
<cell type="label" labelfor="1"/>
<cell type="field" id="1" name="name" uitype="text"/>
<cell type="label" labelfor="2"/>
<cell type="field" id="2" name="type" uitype="combobox"/>
</row>
</rows>
</viewdef>
-
Go to Data Entry > CollectionObjectGroup
-
Verify CogType is a picklist consisting of all CogTypes added in the db
-
Go to Data Entry > CollectionObjectGroupType
-
Verify type is a picklist consisting of values: Discrete, Consolidated, Drill Core
-
Verify a COGType and a COG can be saved
-
Verify that 'Default Collection Object Group Types' pick list is incorrectly defined #5289 is fixed
-
Verify that Cannot create COG Type via UI #5292 is fixed (i.e: A new CollectionObjectGroupType can be created)
-
Verify that Creating a COG without a type causes a crashes #5293 is fixed (i.e: There's a save blocker when COGType has not been selected)
CollectionObjectGroup -> children does not show up in the schema config but it is present in the database schema. Everything else looks good though!
@emenslin Looks like the migration was either skipped due to it being run already previously or incomplete on certain databases. I have manually reverted the migration on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test new geo fields
StorageTreeDef -> institution
CollectionObjectGroup -> children
- Verify above fields exist in Schema Config
Test COG picklists in Workbench
- Create a workbench dataset with base table CollectionObjectGroup
- Map a column to
CogType -> name
and toCogType -> type
- Click save
- Verify
CogType -> name
consists of all CogTypes added in the db as table records - Verify
CogType -> type
consists of values: Discrete, Consolidated, Drill Core
Test COG picklists in Data Entry
Here are some viewdefs that can be used to test the picklists in data entry
CollectionObjectGroup
<viewdef name="CollectionObjectGroup" class="edu.ku.brc.specify.datamodel.CollectionObjectGroup" type="form" gettable="edu.ku.brc.af.ui.forms.DataGetterForObj" settable="edu.ku.brc.af.ui.forms.DataSetterForObj">
<desc>The CollectionObjectGroup Table</desc>
<enableRules/>
<columnDef>p,2px,p,2px,p,2px,p,2px,p,2px,p,p:g</columnDef>
<rowDef auto="true" cell="p" sep="2px"/>
<rows>
<row>
<cell type="label" labelfor="1"/>
<cell type="field" id="1" name="name" uitype="text"/>
<cell type="label" labelfor="2"/>
<cell type="field" id="2" name="cogtype" uitype="combobox"/>
</row>
</rows>
</viewdef>
CollectionObjectGroupType
<viewdef name="CollectionObjectGroupType" class="edu.ku.brc.specify.datamodel.CollectionObjectGroupType" type="form" gettable="edu.ku.brc.af.ui.forms.DataGetterForObj" settable="edu.ku.brc.af.ui.forms.DataSetterForObj">
<desc>The CollectionObjectGroupType Table</desc>
<enableRules/>
<columnDef>p,2px,p,2px,p,2px,p,2px,p,2px,p,p:g</columnDef>
<rowDef auto="true" cell="p" sep="2px"/>
<rows>
<row>
<cell type="label" labelfor="1"/>
<cell type="field" id="1" name="name" uitype="text"/>
<cell type="label" labelfor="2"/>
<cell type="field" id="2" name="type" uitype="combobox"/>
</row>
</rows>
</viewdef>
-
Go to Data Entry > CollectionObjectGroup
-
Verify CogType is a picklist consisting of all CogTypes added in the db
-
Go to Data Entry > CollectionObjectGroupType
-
Verify type is a picklist consisting of values: Discrete, Consolidated, Drill Core
-
Verify a COGType and a COG can be saved
-
Verify that 'Default Collection Object Group Types' pick list is incorrectly defined #5289 is fixed
-
Verify that Cannot create COG Type via UI #5292 is fixed (i.e: A new CollectionObjectGroupType can be created)
-
Verify that Creating a COG without a type causes a crashes #5293 is fixed (i.e: There's a save blocker when COGType has not been selected)
Great work! I didn't find any issues that were a part of this pr.
Comments:
For future @specify/ux-testing:
- Add the form definition for COG in App Resources, or else the
name
text field will be defaulted into a picklist because of the workbench picklist.
- @sharadsw: "The field defaults to the workbench picklist created in this PR if the form definition does not explicitly set it as a text field."
-
"Formatter will be invalid until we implement defaults for geo":
-
Having multiple COGs with the same name is not reflected in the workbench picklist. WorkBench picklist only displays unique COGtype names, ignoring duplicates #5346
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test new geo fields
StorageTreeDef -> institution CollectionObjectGroup -> children
- Verify above fields exist in Schema Config
Test COG picklists in Workbench
- Create a workbench dataset with base table CollectionObjectGroup
- Map a column to
CogType -> name
and toCogType -> type
- Click save
- Verify
CogType -> name
consists of all CogTypes added in the db as table records- Verify
CogType -> type
consists of values: Discrete, Consolidated, Drill Core
This would have saved me a lot of time before the demo this morning. Nice work!
Test COG picklists in Data Entry
Here are some viewdefs that can be used to test the picklists in data entry
CollectionObjectGroup
<viewdef name="CollectionObjectGroup" class="edu.ku.brc.specify.datamodel.CollectionObjectGroup" type="form" gettable="edu.ku.brc.af.ui.forms.DataGetterForObj" settable="edu.ku.brc.af.ui.forms.DataSetterForObj"> <desc>The CollectionObjectGroup Table</desc> <enableRules/> <columnDef>p,2px,p,2px,p,2px,p,2px,p,2px,p,p:g</columnDef> <rowDef auto="true" cell="p" sep="2px"/> <rows> <row> <cell type="label" labelfor="1"/> <cell type="field" id="1" name="name" uitype="text"/> <cell type="label" labelfor="2"/> <cell type="field" id="2" name="cogtype" uitype="combobox"/> </row> </rows> </viewdef>CollectionObjectGroupType
<viewdef name="CollectionObjectGroupType" class="edu.ku.brc.specify.datamodel.CollectionObjectGroupType" type="form" gettable="edu.ku.brc.af.ui.forms.DataGetterForObj" settable="edu.ku.brc.af.ui.forms.DataSetterForObj"> <desc>The CollectionObjectGroupType Table</desc> <enableRules/> <columnDef>p,2px,p,2px,p,2px,p,2px,p,2px,p,p:g</columnDef> <rowDef auto="true" cell="p" sep="2px"/> <rows> <row> <cell type="label" labelfor="1"/> <cell type="field" id="1" name="name" uitype="text"/> <cell type="label" labelfor="2"/> <cell type="field" id="2" name="type" uitype="combobox"/> </row> </rows> </viewdef>
Go to Data Entry > CollectionObjectGroup
Verify CogType is a picklist consisting of all CogTypes added in the db
Go to Data Entry > CollectionObjectGroupType
Verify type is a picklist consisting of values: Discrete, Consolidated, Drill Core
Verify a COGType and a COG can be saved
Verify that 'Default Collection Object Group Types' pick list is incorrectly defined #5289 is fixed
A little different, but functional. That was the intention of that issue.
- Verify that Cannot create COG Type via UI #5292 is fixed (i.e: A new CollectionObjectGroupType can be created)
- Verify that Creating a COG without a type causes a crashes #5293 is fixed (i.e: There's a save blocker when COGType has not been selected)
Yes, as long as the field is on the form, which is not unlike existing issues elsewhere (e.g. this error happens when you remove AccessionNumber
(or any other required field) from the form and try to save)
It's even reversible. 💯 |
Fixes #5215
Fixes #5289
Fixes #5292
Fixes #5293
NOTE:
COG -> cojo
has been removed andCOG -> childCojos
is renamed toCOG -> children
Checklist
and self-explanatory (or properly documented)
Testing instructions
Test new geo fields
Test COG picklists in Workbench
CogType -> name
and toCogType -> type
CogType -> name
consists of all CogTypes added in the db as table recordsCogType -> type
consists of values: Discrete, Consolidated, Drill CoreTest COG picklists in Data Entry
Here are some viewdefs that can be used to test the picklists in data entry
CollectionObjectGroup
CollectionObjectGroupType
Go to Data Entry > CollectionObjectGroup
Verify CogType is a picklist consisting of all CogTypes added in the db
Go to Data Entry > CollectionObjectGroupType
Verify type is a picklist consisting of values: Discrete, Consolidated, Drill Core
Verify a COGType and a COG can be saved
Verify that 'Default Collection Object Group Types' pick list is incorrectly defined #5289 is fixed
Verify that Cannot create COG Type via UI #5292 is fixed (i.e: A new CollectionObjectGroupType can be created)
Verify that Creating a COG without a type causes a crashes #5293 is fixed (i.e: There's a save blocker when COGType has not been selected)