Skip to content

Create new component table #6395

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

Closed
wants to merge 33 commits into from
Closed

Create new component table #6395

wants to merge 33 commits into from

Conversation

CarolineDenis
Copy link
Contributor

@CarolineDenis CarolineDenis commented Apr 7, 2025

Fixes #6388

Warning

This PR affects database migrations. See migration testing instructions.

Checklist

  • Self-review the PR after opening it to make sure the changes look good and
    self-explanatory (or properly documented)
  • Add relevant issue to release milestone
  • Add relevant documentation (Tester - Dev)
  • Add automated tests
  • Add a reverse migration if a migration is present in the PR

Testing instructions

  • Go to schema config > component
  • Click on type relationship
  • Choose the type to be a pick list
  • Choose collection object type pick list
  • Save
  • Go to schema config
  • Create new view def for component
<viewdef name="Component" class="edu.ku.brc.specify.datamodel.Component" type="form" gettable="edu.ku.brc.af.ui.forms.DataGetterForObj" settable="edu.ku.brc.af.ui.forms.DataSetterForObj">
	<desc>The Component 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="verbatimName" uitype="text"/>
			<cell type="label" labelfor="2"/>
			<cell type="field" id="2" name="type" uitype="combobox"/>
			<cell type="label" labelfor="3"/>
			<cell type="field" id="3" name="name" uitype="querycbx" colspan="7"/>
			<cell type="label" labelfor="4"/>
			<cell type="field" id="4" name="role" uitype="text"/>
		</row>
		<row>
			<cell type="panel" id="leftSideAge" colspan="7" initialize="verticalAlign=start">
				<rows>
					<row>
						<cell type="subview" id="RA" name="relativeAges"/>
					</row>
				</rows>
			</cell>
			<cell type="panel" id="rightSideAge" colspan="5" initialize="verticalAlign=start">
				<rows>
					<row>
						<cell type="subview" id="AA" name="absoluteAges"/>
					</row>
				</rows>
			</cell>
		</row>
		<row>
			<cell type="panel" id="children" colspan="13">
				<rows>
					<row>
						<cell type="label" labelfor="5"/>
						<cell type="subview" id="5" name="children" colspan="7"/>
					</row>
				</rows>
			</cell>
		</row>
	</rows>
</viewdef>
  • Save
  • Go to schema config CO
  • Add a new component subview
		<row>
			<cell type="subview" viewname="component" id="6" name="components" defaulttype="table" colspan="14"/>
		</row>
  • Save

@sharadsw sharadsw self-requested a review April 8, 2025 14:43
Copy link
Contributor

@sharadsw sharadsw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me so far.

Is Component -> cotype and Component -> absolute/relative age supposed to override the values the base CO has for those fields?

@CarolineDenis
Copy link
Contributor Author

@sharadsw
For:

Is Component -> cotype and Component -> absolute/relative age supposed to override the values the base CO has for those fields?

No, it should not. They will co exist.

@CarolineDenis CarolineDenis requested a review from sharadsw April 8, 2025 19:33
@CarolineDenis CarolineDenis added this to the 7.10.3 milestone Apr 9, 2025
@CarolineDenis
Copy link
Contributor Author

CarolineDenis commented Apr 9, 2025

NOTES:
@specify/dev-testing
Should we make children a dependent relationship instead of independent?

@github-project-automation github-project-automation bot moved this from 📋Back Log to ✅Done in General Tester Board Apr 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add a Components module
2 participants