Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/production' into issue-5180
Browse files Browse the repository at this point in the history
  • Loading branch information
CarolineDenis committed Nov 15, 2024
2 parents dd321a9 + ff01376 commit 01a9b4b
Show file tree
Hide file tree
Showing 48 changed files with 2,594 additions and 952 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ jobs:
uses: docker/build-push-action@v6
with:
platforms: ${{ matrix.platform }}
build-args: |
BUILD_VERSION=${{ steps.prep.outputs.version }}
GIT_SHA=${{ github.sha }}
tags: ${{ steps.prep.outputs.tags }}
push: true

Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,6 @@ node_modules
/specifyweb/frontend/js_src/coverage
/local_specifyweb_apache.conf
/specifyweb/frontend/js_src/stats.json
/specifyweb/frontend/js_src/dist
/specifyweb/frontend/js_src/dist
.env
docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { useNavigate } from 'react-router-dom';

import { useAsyncState, usePromise } from '../../hooks/useAsyncState';
import { useCachedState } from '../../hooks/useCachedState';
import { useCollection } from '../../hooks/useCollection';
import { useSerializedCollection } from '../../hooks/useSerializedCollection';
import { attachmentsText } from '../../localization/attachments';
import { commonText } from '../../localization/common';
import { schemaText } from '../../localization/schema';
Expand Down Expand Up @@ -125,7 +125,7 @@ function Attachments({
'scale'
);

const [collection, setCollection, fetchMore] = useCollection(
const [collection, setCollection, fetchMore] = useSerializedCollection(
React.useCallback(
async (offset) =>
fetchCollection(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ exports[`fields are loaded 1`] = `
"[literalField CollectionObject.text2]",
"[literalField CollectionObject.inventoryDate]",
"[literalField CollectionObject.inventoryDatePrecision]",
"[literalField CollectionObject.isMemberOfCOG]",
"[literalField CollectionObject.modifier]",
"[literalField CollectionObject.name]",
"[literalField CollectionObject.notifications]",
Expand Down Expand Up @@ -104,6 +105,111 @@ exports[`fields are loaded 1`] = `
]
`;

exports[`indexed fields are loaded 1`] = `
{
"absoluteAges": "[relationship CollectionObject.absoluteAges]",
"accession": "[relationship CollectionObject.accession]",
"actualTotalCountAmt": "[literalField CollectionObject.actualTotalCountAmt]",
"age": "[literalField CollectionObject.age]",
"agent1": "[relationship CollectionObject.agent1]",
"altCatalogNumber": "[literalField CollectionObject.altCatalogNumber]",
"appraisal": "[relationship CollectionObject.appraisal]",
"availability": "[literalField CollectionObject.availability]",
"catalogNumber": "[literalField CollectionObject.catalogNumber]",
"catalogedDate": "[literalField CollectionObject.catalogedDate]",
"catalogedDatePrecision": "[literalField CollectionObject.catalogedDatePrecision]",
"catalogedDateVerbatim": "[literalField CollectionObject.catalogedDateVerbatim]",
"cataloger": "[relationship CollectionObject.cataloger]",
"cojo": "[relationship CollectionObject.cojo]",
"collectingEvent": "[relationship CollectionObject.collectingEvent]",
"collection": "[relationship CollectionObject.collection]",
"collectionMemberId": "[literalField CollectionObject.collectionMemberId]",
"collectionObjectAttachments": "[relationship CollectionObject.collectionObjectAttachments]",
"collectionObjectAttribute": "[relationship CollectionObject.collectionObjectAttribute]",
"collectionObjectAttrs": "[relationship CollectionObject.collectionObjectAttrs]",
"collectionObjectCitations": "[relationship CollectionObject.collectionObjectCitations]",
"collectionObjectProperties": "[relationship CollectionObject.collectionObjectProperties]",
"collectionObjectType": "[relationship CollectionObject.collectionObjectType]",
"conservDescriptions": "[relationship CollectionObject.conservDescriptions]",
"container": "[relationship CollectionObject.container]",
"containerOwner": "[relationship CollectionObject.containerOwner]",
"countAmt": "[literalField CollectionObject.countAmt]",
"createdByAgent": "[relationship CollectionObject.createdByAgent]",
"currentDetermination": "[relationship CollectionObject.currentDetermination]",
"date1": "[literalField CollectionObject.date1]",
"date1Precision": "[literalField CollectionObject.date1Precision]",
"deaccessioned": "[literalField CollectionObject.deaccessioned]",
"description": "[literalField CollectionObject.description]",
"determinations": "[relationship CollectionObject.determinations]",
"dnaSequences": "[relationship CollectionObject.dnaSequences]",
"embargoAuthority": "[relationship CollectionObject.embargoAuthority]",
"embargoReason": "[literalField CollectionObject.embargoReason]",
"embargoReleaseDate": "[literalField CollectionObject.embargoReleaseDate]",
"embargoReleaseDatePrecision": "[literalField CollectionObject.embargoReleaseDatePrecision]",
"embargoStartDate": "[literalField CollectionObject.embargoStartDate]",
"embargoStartDatePrecision": "[literalField CollectionObject.embargoStartDatePrecision]",
"exsiccataItems": "[relationship CollectionObject.exsiccataItems]",
"fieldNotebookPage": "[relationship CollectionObject.fieldNotebookPage]",
"fieldNumber": "[literalField CollectionObject.fieldNumber]",
"guid": "[literalField CollectionObject.guid]",
"integer1": "[literalField CollectionObject.integer1]",
"integer2": "[literalField CollectionObject.integer2]",
"inventorizedBy": "[relationship CollectionObject.inventorizedBy]",
"inventoryDate": "[literalField CollectionObject.inventoryDate]",
"inventoryDatePrecision": "[literalField CollectionObject.inventoryDatePrecision]",
"isMemberOfCOG": "[literalField CollectionObject.isMemberOfCOG]",
"leftSideRels": "[relationship CollectionObject.leftSideRels]",
"modifiedByAgent": "[relationship CollectionObject.modifiedByAgent]",
"modifier": "[literalField CollectionObject.modifier]",
"name": "[literalField CollectionObject.name]",
"notifications": "[literalField CollectionObject.notifications]",
"number1": "[literalField CollectionObject.number1]",
"number2": "[literalField CollectionObject.number2]",
"numberOfDuplicates": "[literalField CollectionObject.numberOfDuplicates]",
"objectCondition": "[literalField CollectionObject.objectCondition]",
"ocr": "[literalField CollectionObject.ocr]",
"otherIdentifiers": "[relationship CollectionObject.otherIdentifiers]",
"paleoContext": "[relationship CollectionObject.paleoContext]",
"preparations": "[relationship CollectionObject.preparations]",
"projectNumber": "[literalField CollectionObject.projectNumber]",
"projects": "[relationship CollectionObject.projects]",
"relativeAges": "[relationship CollectionObject.relativeAges]",
"remarks": "[literalField CollectionObject.remarks]",
"reservedInteger3": "[literalField CollectionObject.reservedInteger3]",
"reservedInteger4": "[literalField CollectionObject.reservedInteger4]",
"reservedText": "[literalField CollectionObject.reservedText]",
"reservedText2": "[literalField CollectionObject.reservedText2]",
"reservedText3": "[literalField CollectionObject.reservedText3]",
"restrictions": "[literalField CollectionObject.restrictions]",
"rightSideRels": "[relationship CollectionObject.rightSideRels]",
"sgrStatus": "[literalField CollectionObject.sgrStatus]",
"text1": "[literalField CollectionObject.text1]",
"text2": "[literalField CollectionObject.text2]",
"text3": "[literalField CollectionObject.text3]",
"text4": "[literalField CollectionObject.text4]",
"text5": "[literalField CollectionObject.text5]",
"text6": "[literalField CollectionObject.text6]",
"text7": "[literalField CollectionObject.text7]",
"text8": "[literalField CollectionObject.text8]",
"timestampCreated": "[literalField CollectionObject.timestampCreated]",
"timestampModified": "[literalField CollectionObject.timestampModified]",
"totalCountAmt": "[literalField CollectionObject.totalCountAmt]",
"totalValue": "[literalField CollectionObject.totalValue]",
"treatmentEvents": "[relationship CollectionObject.treatmentEvents]",
"uniqueIdentifier": "[literalField CollectionObject.uniqueIdentifier]",
"version": "[literalField CollectionObject.version]",
"visibility": "[literalField CollectionObject.visibility]",
"visibilitySetBy": "[relationship CollectionObject.visibilitySetBy]",
"voucherRelationships": "[relationship CollectionObject.voucherRelationships]",
"yesNo1": "[literalField CollectionObject.yesNo1]",
"yesNo2": "[literalField CollectionObject.yesNo2]",
"yesNo3": "[literalField CollectionObject.yesNo3]",
"yesNo4": "[literalField CollectionObject.yesNo4]",
"yesNo5": "[literalField CollectionObject.yesNo5]",
"yesNo6": "[literalField CollectionObject.yesNo6]",
}
`;

exports[`literal fields are loaded 1`] = `
[
"[literalField CollectionObject.actualTotalCountAmt]",
Expand Down Expand Up @@ -131,6 +237,7 @@ exports[`literal fields are loaded 1`] = `
"[literalField CollectionObject.text2]",
"[literalField CollectionObject.inventoryDate]",
"[literalField CollectionObject.inventoryDatePrecision]",
"[literalField CollectionObject.isMemberOfCOG]",
"[literalField CollectionObject.modifier]",
"[literalField CollectionObject.name]",
"[literalField CollectionObject.notifications]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,11 @@ describe('uniqueness rules', () => {
]);
});

overrideAjax(getResourceApiUrl('Agent', 1), {
id: 1,
resource_uri: getResourceApiUrl('Agent', 1),
});

test('rule with local collection', async () => {
const accessionId = 1;
const accession = new tables.Accession.Resource({
Expand Down
Loading

0 comments on commit 01a9b4b

Please sign in to comment.