Skip to content

Commit

Permalink
Merge branch 'issue-5294' into issue-5333
Browse files Browse the repository at this point in the history
  • Loading branch information
sharadsw authored Oct 25, 2024
2 parents 279dc34 + 47d59f7 commit fd8683e
Show file tree
Hide file tree
Showing 25 changed files with 499 additions and 114 deletions.
9 changes: 5 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ Steps to reproduce the behavior:
3. Scroll down to '....'
4. See error

*When reporting an issue on the `production` branch or any development version of Specify, please try to recreate the issue on the latest tagged release (`v7`) and indicate if it does not occur there, indicating a regression.*

**Expected behavior**
A clear and concise description of what you expected to happen.

Expand All @@ -26,17 +28,16 @@ If applicable, add screenshots to help explain your problem.

**Crash Report**

If the bug resulted in an error message, please click on "Download Error
Message" and attach it here

Please, also fill out the following information manually:
If the bug resulted in an error message, please click on "Download Error Message" and attach it here. If there is no error, please follow [these instructions](https://discourse.specifysoftware.org/t/download-specify-7-system-information/1614) to download your System Information.

Please fill out the following information manually:
- OS: [e.g. Windows 10]
- Browser: [e.g. Chrome, Safari]
- Specify 7 Version: [e.g. 7.6.1]
- Database Name: [e.g. kufish] (you can see this in the "About Specify 7" dialog)
- Collection name: [e.g. KU Fish Tissue]
- User Name: [e.g. SpAdmin]
- URL: [e.g. https://ku_fish-v7.test.specifysystems.org/specify/workbench/215/]

**Reported By**
Name of your institution
Expand Down
5 changes: 3 additions & 2 deletions specifyweb/businessrules/rules/cogtype_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
from specifyweb.businessrules.orm_signal_handler import orm_signal_handler
from specifyweb.specify.models import Picklist, Picklistitem

SYSTEM_COGTYPES_PICKLIST = "SystemCOGTypes"

@orm_signal_handler('pre_save', 'Collectionobjectgrouptype')
def cogtype_pre_save(cog_type):

# Ensure the cog_type type is validated by being the picklist.
# NOTE: Maybe add constraint on the cog_type name in the future.
default_cog_types_picklist = Picklist.objects.get(
name="Default Collection Object Group Types",
tablename="collectionobjectgrouptype",
name=SYSTEM_COGTYPES_PICKLIST,
collection=cog_type.collection
)
if Picklistitem.objects.filter(picklist=default_cog_types_picklist, value=cog_type.type).count() == 0:
Expand Down
3 changes: 2 additions & 1 deletion specifyweb/businessrules/rules/tree_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,6 @@ def post_tree_rank_deletion_handler(sender, obj):

@orm_signal_handler('pre_save')
def set_is_accepted_if_preferred(sender, obj):
if hasattr(obj, 'isaccepted'):
if hasattr(obj, 'isaccepted') and hasattr(obj, 'accepted_id') :
obj.isaccepted = obj.accepted_id == None

Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ const tableOverwrites: Partial<RR<keyof Tables, TableConfigOverwrite>> = {
StorageTreeDefItem: 'system',
TaxonTreeDef: 'system',
TaxonTreeDefItem: 'system',
TectonicUnitTreeDef: 'system',
TectonicUnitTreeDefItem: 'system',
};

// These field overrides apply to entire front-end
Expand Down Expand Up @@ -153,6 +155,12 @@ const globalFieldOverrides: {
acceptedGeologicTimePeriod: { visibility: 'readOnly' },
fullName: { visibility: 'readOnly' },
},
TectonicUnit: {
parent: { visibility: 'required' },
isAccepted: { visibility: 'readOnly' },
acceptedTectonicUnit: { visibility: 'readOnly' },
fullName: { visibility: 'readOnly' },
},
Storage: {
parent: { visibility: 'required' },
isAccepted: { visibility: 'readOnly' },
Expand Down Expand Up @@ -187,6 +195,12 @@ const globalFieldOverrides: {
GeologicTimePeriodTreeDefItem: {
fullNameSeparator: { whiteSpaceSensitive: true },
},
TectonicUnitTreeDef: {
fullNameDirection: { visibility: 'readOnly' },
},
TectonicUnitTreeDefItem: {
fullNameSeparator: { whiteSpaceSensitive: true },
},
LithoStratTreeDef: {
fullNameDirection: { visibility: 'readOnly' },
},
Expand Down
Loading

0 comments on commit fd8683e

Please sign in to comment.