-
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 default form definitions for Geo #5367
Conversation
Restructures common.views.xml for the first time in years based on the linting done by Specify 7 Fixes #5311
Solves part of #1254
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.
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
- Create a new
DataObjFormatters
app resource and verify that all table formats and aggregations appear as expected - Build queries and return the (formatted) and (aggregated) results of as many tables as you can, with a focus on new Geo tables. If a table format or aggregation is missing where it should be included, let me know. Some tables (e.g.
*property
,*attribute
,*groupjoin
) do not have a table format or aggregation defined as it is ambiguous as to which fields we should display. - Create a new
TypeSearches
app resource and verify that it is working as expected. Delete this resource after it is populated as you should be using the default. - Open the
CollectionRelType
form and search for a collection. You should be able to type the name of a collection and select it. You will encounterHierarchyException
when loading Collectionreltype #4989, but that is not in the scope of this issue, and you can safely dismiss it. - Create an
ExportFeed
app resource and verify that you can search for a user in the database by name. You should see the name appear correctly and you should be able to search for a user in the query combo box without the 🔍 QB function. - Create a new
WebLinks
app resource and verify that all web links (~5) appear and work as expected. See this guide for setting up a conditional form onAgentIdentifier
to leverage those new web links. - Verify that the
geology.views.xml
can be used as the basis of a new form (create a new form definition and selectGeology
). Let me know what you think. This is subjective to some extent, and I welcome suggested changes (especially via XML snippets).
- Test that these new view definitions (mostly shown in this issue's body) are displayed properly (compare to defaults on
production
):-
CollectionRelType
- Verify that you can create a Collection Relationship without the query builder (ignoring this error)
-
Agent
should default toPerson
instead ofOrganization
finally!-
Agent
conditional: If the agent is not aGroup
, theMembers
subview should not be shown.
-
-
TectonicUnit
-
TectonicUnitTreeDef
-
TectonicUnitTreeDefItem
-
TaxonTreeDef
-
Taxon
-
Taxon
conditional: Verify that when you checkIsHybrid
the fieldsHybridParent1
andHybridParent2
appear. When it is not checked, they should not appear.
-
-
GeographyTreeDef
-
StroageTreeDef
-
LithoStratTreeDef
-
GeologicTimePeriodTreeDef
-
RelativeAge
-
AbsoluteAge
-
PickList
- Set the size limit to
-1
and verify that you can add any number of pick list items (>500– and you can use the workbench to add the first 500)
- Set the size limit to
-
PickListItem
-
SpAppResource
(click pencil next to the title of an app resource)-
SpAppResource
conditional (should showReports
subview button if the resource is a report/label)-
SpReport
form should show ownership, associated query, title, in a read-only view
-
-
-
SpViewSetObj
(click pencil next to the title of a form definition) -
SpQuery
(click pencil next to a query title)- Verify that you can change the ownership of a query
-
RecordSet
(click pencil next to a record set title)- Verify that you can change the ownership of a record set
-
AgentIdentifier
– navigate directly to the form via the data entry menu or by modifying the URL. It should no longer be auto-generated
-
- Double-check that your testing covers all cases reported in Add support for the Geology discipline and default forms #5311, Support choosing the Full Name Direction in Sp7 tree def editing interface #5073, Enable creating Collection Object Relationships in Specify 7 #3120, deaccessionPreparations is a phantom field #2153, When changing a pick list to read only, it requires a size limit of at least two #1515, GUID and Hybrid Parent fields are editable on the Taxon form #584, Change default forms to hide portions of agents form depending on agent type using conditional forms #364, Stop hard-coding labels into default form XML specify6#1210, Front-end limit on pick list items still in place specify6#1213, Data model class for Taxon Attribute is incorrect specify6#1229, The
Accession
table does not have adeaccessions
field. specify6#1232, bug(default-forms): Form is named AgentIdentifiers, but table is named AgentIdentifier #4591, Visual Export Feed QCBX displays all users as <Formatter not defined.> #5020, Paleocontext should have an accepted field for lithostrat of chronostrat #2016, and common/common.views.xml: PHSub Form: Cell is missing proper closing element /> specify6#1223
Issues/Comments
WOW looks soooo much better!
Using db ciscollections_2_15_24
to test.
1.
- Open the
CollectionRelType
form and search for a collection. You should be able to type the name of a collection and select it. You will encounterHierarchyException
when loading Collectionreltype #4989, but that is not in the scope of this issue, and you can safely dismiss it.
&
CollectionRelType
- [ ] Verify that you can create a Collection Relationship without the query builder (ignoring this error)
No results pop up when I type in a name of a collection. I can only select the collection through query builder.
Screen.Recording.2024-11-26.at.11.48.55.AM.mov
2.
- Verify that the
geology.views.xml
can be used as the basis of a new form (create a new form definition and selectGeology
). Let me know what you think. This is subjective to some extent, and I welcome suggested changes (especially via XML snippets).
I think it's a great base to work off of! It's simple and looks nice.
3.
SpAppResource
conditional (should showReports
subview button if the resource is a report/label)
The Reports
subview button shows up for Label resources, but does not for Report resources.
Screen.Recording.2024-11-26.at.12.47.51.PM.mov
4.
SpReport
form should show ownership, associated query, title, in a read-only view
Also is not read-only on my db!
5.
- Verify that you can change the ownership of a query
I can change ownership, but only through query builder. I cannot select users by searching their name in the field.
Screen.Recording.2024-11-26.at.1.00.37.PM.mov
See that I can change the ownership of a record set through searching in the field:
Screen.Recording.2024-11-26.at.1.06.01.PM.mov
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
THIS MUST BE TESTED LOCALLY UNTIL THE TEST PANEL SUPPORTS STATIC FILES
Okay, so this PR is big, but it is almost entirely XML changes. This touches a lot of the default forms, so I have a big ask– please test the following XML resources in Specify. You are likely to find issues that aren't related to this PR which I am happy to resolve, so report them. If it grows outside the scope of this, I'll open another and we'll resolve it in the future.
Remember to delete any custom form definitions / app resources before testing this as those will be used first.
- Create a new
DataObjFormatters
app resource and verify that all table formats and aggregations appear as expected - Build queries and return the (formatted) and (aggregated) results of as many tables as you can, with a focus on new Geo tables. If a table format or aggregation is missing where it should be included, let me know. Some tables (e.g.
*property
,*attribute
,*groupjoin
) do not have a table format or aggregation defined as it is ambiguous as to which fields we should display. - Create a new
TypeSearches
app resource and verify that it is working as expected. Delete this resource after it is populated as you should be using the default. - Open the
CollectionRelType
form and search for a collection. You should be able to type the name of a collection and select it. You will encounterHierarchyException
when loading Collectionreltype #4989, but that is not in the scope of this issue, and you can safely dismiss it. - Create an
ExportFeed
app resource and verify that you can search for a user in the database by name. You should see the name appear correctly and you should be able to search for a user in the query combo box without the 🔍 QB function. - Create a new
WebLinks
app resource and verify that all web links (~5) appear and work as expected. See this guide for setting up a conditional form onAgentIdentifier
to leverage those new web links. - Verify that the
geology.views.xml
can be used as the basis of a new form (create a new form definition and selectGeology
). Let me know what you think. This is subjective to some extent, and I welcome suggested changes (especially via XML snippets).
- Test that these new view definitions (mostly shown in this issue's body) are displayed properly (compare to defaults on
production
):-
CollectionRelType
- Verify that you can create a Collection Relationship without the query builder (ignoring this error)
-
Agent
should default toPerson
instead ofOrganization
finally!-
Agent
conditional: If the agent is not aGroup
, theMembers
subview should not be shown.
-
-
TectonicUnit
-
TectonicUnitTreeDef
-
TectonicUnitTreeDefItem
-
TaxonTreeDef
-
Taxon
-
Taxon
conditional: Verify that when you checkIsHybrid
the fieldsHybridParent1
andHybridParent2
appear. When it is not checked, they should not appear.
-
-
GeographyTreeDef
-
StroageTreeDef
-
LithoStratTreeDef
-
GeologicTimePeriodTreeDef
-
RelativeAge
-
AbsoluteAge
-
PickList
- Set the size limit to
-1
and verify that you can add any number of pick list items (>500– and you can use the workbench to add the first 500)
- Set the size limit to
-
PickListItem
-
SpAppResource
(click pencil next to the title of an app resource)-
SpAppResource
conditional (should showReports
subview button if the resource is a report/label)-
SpReport
form should show ownership, associated query, title, in a read-only view
-
-
-
SpViewSetObj
(click pencil next to the title of a form definition) -
SpQuery
(click pencil next to a query title)- Verify that you can change the ownership of a query
-
RecordSet
(click pencil next to a record set title)- Verify that you can change the ownership of a record set
-
AgentIdentifier
– navigate directly to the form via the data entry menu or by modifying the URL. It should no longer be auto-generated
-
- Double-check that your testing covers all cases reported in Add support for the Geology discipline and default forms #5311, Support choosing the Full Name Direction in Sp7 tree def editing interface #5073, Enable creating Collection Object Relationships in Specify 7 #3120, deaccessionPreparations is a phantom field #2153, When changing a pick list to read only, it requires a size limit of at least two #1515, GUID and Hybrid Parent fields are editable on the Taxon form #584, Change default forms to hide portions of agents form depending on agent type using conditional forms #364, Stop hard-coding labels into default form XML specify6#1210, Front-end limit on pick list items still in place specify6#1213, Data model class for Taxon Attribute is incorrect specify6#1229, The
Accession
table does not have adeaccessions
field. specify6#1232, bug(default-forms): Form is named AgentIdentifiers, but table is named AgentIdentifier #4591, Visual Export Feed QCBX displays all users as <Formatter not defined.> #5020, Paleocontext should have an accepted field for lithostrat of chronostrat #2016, and common/common.views.xml: PHSub Form: Cell is missing proper closing element /> specify6#1223
Tester Comments
TectonicUnit was being rude but I'm pretty sure it's just a database issue that I need to sort on my end. Wasn't able to open it in DataObjFormatters or the Query Builder, and it would give definitions missing errors + couldn't fetch ranks in the form. I can't really pass the first two checks because I can't check that, but I had a few other comments anyway, so I'll retest them both once I've got that figured out. 😅
Reports button missing on the report SpAppResource. It does appear on the label, however.
Had an issue with report runner, so I wasn't able to check if it was read only in the labels/reports form. I was able to access it by modifying the link in Data Entry and it wasn't read only there, though.
For the record sets, having owner in the default form means that when you create a record set from query the user has to manually fill in the owner, which is a little annoying, but I assume it's outside the scope of the PR to have it autofill the current user as the owner. I do wonder who is able to transfer ownership to other people, though. There's no specific permissions in place to bar people from transferring right? It would have to be form-based?
I'm unsure about the hard-coding checks, since here on the Picklist form there's a few that look like they might be (Type, Name, Formatter), but that's just going based on my assumption that the field names are always lowercase.
That's all I found wrong with the last check, these new default forms are great!
@pashiav Thank you for your review!
This is because the database you were testing on has a custom
Fixed in All else is expected/OK |
This applies when a new record set is created
Triggered by d188aca on branch refs/heads/issue-5311
@combs-a Thank you for your review!
Fixed in
Too much hassle for the user– nice catch. I've changed the logic so that the user is set automatically to the current logged-in user when creating a record set: Everyone with edit access to the record set (and query) tables can transfer ownership at this point. The hope is that this is not abused, and it can be disabled by a simple form edit. I'm not completely satisfied with it but I do not want to expand the scope of this PR too much until we find it to be problematic. Let me know if you have any trouble with this!
Removed hard-coded labels here: |
Addressed comments
Fixes #5311, #5073, #3120, #2153, #1515, #584, #364, specify/specify6#1210, specify/specify6#1213, specify/specify6#1229, specify/specify6#1232, #4591, #5020, #2016 and specify/specify6#1223
This PR is intended to update underlying app resources necessary for the
geology
discipline as well as improve other defaults where possible.Geo-focused Improvements
CollectionObject
form for GeologyCommon Views
RelativeAge
Added
AbsoluteAge
formAdded
TectonicUnit
formAdded
TectonicUnitTreeDef
formAdded
TectonicUnitTreeDefItem
formMajor Improvements
Type Searches
Collection
,Institution
, andSpecifyUser
, improving a number of places around the app!Record Sets
Agent
Screen.Recording.2024-11-07.at.9.56.15.AM.mov
Person
is now the default value (huge improvement)Group
will themembers
subview displayTaxon
hybridFieldsConditional.mov
HybridParent
fields only whenIsHybrid
is checkedCollection Relationships
Old form:
New form:
App Resources
AppResource
Reports
jrxml/label
SpReport
form for the first timeSpViewSetObj
Pick List
Old form:
New form:
-1
Tree Definition
Old Tree Definition form:
New Tree Definition form:
Miscellaneous Improvements
countAmt
can no longer be set to a negative number by defaultDataObjFormatters
have finally been reformatted by the built-in Specify 7 systemTesting instructions
THIS MUST BE TESTED LOCALLY UNTIL THE TEST PANEL SUPPORTS STATIC FILES
Okay, so this PR is big, but it is almost entirely XML changes. This touches a lot of the default forms, so I have a big ask– please test the following XML resources in Specify. You are likely to find issues that aren't related to this PR which I am happy to resolve, so report them. If it grows outside the scope of this, I'll open another and we'll resolve it in the future.
Remember to delete any custom form definitions / app resources before testing this as those will be used first.
DataObjFormatters
app resource and verify that all table formats and aggregations appear as expected*property
,*attribute
,*groupjoin
) do not have a table format or aggregation defined as it is ambiguous as to which fields we should display.TypeSearches
app resource and verify that it is working as expected. Delete this resource after it is populated as you should be using the default.CollectionRelType
form and search for a collection. You should be able to type the name of a collection and select it. You will encounterHierarchyException
when loading Collectionreltype #4989, but that is not in the scope of this issue, and you can safely dismiss it.ExportFeed
app resource and verify that you can search for a user in the database by name. You should see the name appear correctly and you should be able to search for a user in the query combo box without the 🔍 QB function.WebLinks
app resource and verify that all web links (~5) appear and work as expected. See this guide for setting up a conditional form onAgentIdentifier
to leverage those new web links.geology.views.xml
can be used as the basis of a new form (create a new form definition and selectGeology
). Let me know what you think. This is subjective to some extent, and I welcome suggested changes (especially via XML snippets).production
):CollectionRelType
Agent
should default toPerson
instead ofOrganization
finally!Agent
conditional: If the agent is not aGroup
, theMembers
subview should not be shown.TectonicUnit
TectonicUnitTreeDef
TectonicUnitTreeDefItem
TaxonTreeDef
Taxon
Taxon
conditional: Verify that when you checkIsHybrid
the fieldsHybridParent1
andHybridParent2
appear. When it is not checked, they should not appear.GeographyTreeDef
StroageTreeDef
LithoStratTreeDef
GeologicTimePeriodTreeDef
RelativeAge
AbsoluteAge
PickList
-1
and verify that you can add any number of pick list items (>500– and you can use the workbench to add the first 500)PickListItem
SpAppResource
(click pencil next to the title of an app resource)SpAppResource
conditional (should showReports
subview button if the resource is a report/label)SpReport
form should show ownership, associated query, title, in a read-only viewSpViewSetObj
(click pencil next to the title of a form definition)SpQuery
(click pencil next to a query title)RecordSet
(click pencil next to a record set title)AgentIdentifier
– navigate directly to the form via the data entry menu or by modifying the URL. It should no longer be auto-generatedAccession
table does not have adeaccessions
field. specify6#1232, bug(default-forms): Form is named AgentIdentifiers, but table is named AgentIdentifier #4591, Visual Export Feed QCBX displays all users as <Formatter not defined.> #5020, Paleocontext should have an accepted field for lithostrat of chronostrat #2016, and common/common.views.xml: PHSub Form: Cell is missing proper closing element /> specify6#1223