Skip to content

Custom Attachment view definition not being used when present #5078

@grantfitzsimmons

Description

@grantfitzsimmons

Describe the bug
Likely related to or a manifestation of both #3988 and #3328.

To Reproduce
Steps to reproduce the behavior:

  1. Define a custom Attachment view definition
<viewdef name="Attachment (2)" class="edu.ku.brc.specify.datamodel.Attachment" type="form" gettable="edu.ku.brc.af.ui.forms.DataGetterForObj" settable="edu.ku.brc.af.ui.forms.DataSetterForObj">
	<desc>The Attachment Table</desc>
	<enableRules/>
	<columnDef>p,2px,p:g</columnDef>
	<rowDef auto="true" cell="p" sep="2px"/>
	<rows>
		<row/>
	</rows>
	<rows>
		<row>
			<cell type="label" labelfor="origFilename" label="FILENAME"/>
			<cell type="field" id="origFilename" name="attachment.origFilename" initialize="editoncreate=true" uitype="browse" isrequired="true"/>
		</row>
		<row>
			<cell type="label" labelfor="title" label="TITLE"/>
			<cell type="field" id="title" name="attachment.title" uitype="text"/>
		</row>
		<row>
			<cell type="label" labelfor="ispub" label=""/>
			<cell type="field" id="ispub" name="attachment.isPublic" uitype="checkbox" label="Make Public"/>
		</row>
		<!--   <row><cell type="subview" id="metadata" name="attachment.metadata" viewname="AttachmentMetadata" colspan="3"/></row> -->
	</rows>
</viewdef>
  1. Upload a Collection Object Attachment
  2. See that the custom form is not being used (UX testers can verify by going to the meta menu '-> Form Definition' and see that there is no 'Edit Form Definition' button visible). Also notice the Title field is still required.

Expected behavior
Custom attachment forms should be used when they exist.

Screenshots
image

Crash Report
Specify 7 System Information - 2024-07-08T15_34_41.060Z.txt

macOS, Arc, edge (080b32c)

Metadata

Metadata

Assignees

No one assigned

    Labels

    1 - BugIncorrect behavior of the product2 - FormsIssues that are related to the form systemregressionThis is behavior that once worked that has broken. Must be resolved before the next release.

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions