- Added logic to set a default output type for each entry in a
ResearchOutputTableanswer. - Added
guidanceTextandsampleTextfields toaddQuestionCustomizationand addedjson,questionText,requirementText,guidanceText,sampleText,useSampleTextAsDefaultandrequiredtoaddCustomQuestionInput[#130] - Added
questionCustomizationByVersionedQuestionresolver [#130] - Added
findByCustomizationAndVersionedQuestionmethod toQuestionCustomizationmodel [#130] - Added some opensearch variables for running it locally in docker-compose.yaml [#118]
- Added opensearch to the docker compose file
- Added OpenSearch integration for full-text search of re3data repositories
- Added
open-search-init.shscript to initialize OpenSearch indices with proper mappings for repository data - Added
re3data-os-populate.tsmigration script for syncing re3data repository metadata to OpenSearch with blue-green deployment strategy - Added
re3dataIdfield torepositoriestable to track re3data repository identifiers - Added
re3byURIsquery to fetch re3data repositories by their URIs - Added
re3SubjectListquery to return distinct subject area keywords from re3data repositories with optional counts - Added
re3RepositoryTypesListquery to return distinct repository types from re3data with optional counts - Added new repository service methods for searching and filtering re3data repositories
- Added
sectionCustomizationByVersionedSectionschema and resolver, and addedfindByCustomizationAndVersionedSectionmethod to theSectionCustomizationmodel. - Added
SectionCustomizationandQuestionCustomizationschemas and resolvers - Added a new
authenticatedResolverwrapper function to help handle common authorization checks on a resolver - Added
TemplateCustomizationOverviewto theTemplateCustomizationmodel which returns high level overview info about the base funder template and the customizations - Added
CustomQuestion,CustomSection,sectionCustomizationandquestionCustomizationmodels - Added data migration script to create seed customization records for sections and questions
- Added new field,
sourceVersionedTemplateIdfield totemplatestable so we can track the source when cloned from aversionedTemplatesrecord [#1006] - Added
customizableTemplatesquery andCustomizableTemplateSearchResultto theversionedTemplateschema and resolver - Added
TemplateCustomizationmodel resolver and schema - Added
templateCustomizationServicewhich handles updating the status oftemplateCustomizationswhen the customized template is archived or republished - Added
findActiveByTemplateIdquery toVersionedTemplatemodel - Added
VersionedTemplateSearchResulttoVersionedTemplatemodel - Added
renovate.jsonconfig file - Added
.nvmrcfile - Added
processResulthandler to the Plan model to help generate DMP ids when they are missing - Added
saveMaDMPVersionfunction to thesrc/services/planService. This service handles sending the SQS messages to the AWS SQS Queue to trigger thegenerateMaDMPRecordLambda Function. - Added SQS Queue URL env variable to config files (also added to the ECS container definitions)
- Added
@dmptool/utilspackage - Added data-migration script to create new
planGuidanceJOIN table [#29] - Added a new method
searchManagedWithPublishedGuidancetoAffiliationmodel for managed Affiliations that have published guidance associated with them [#29] - Added
managedAffiliationsWithGuidancequery resolver toAffiliationresolvers [#29] - Added
guidanceSourcesForPlans,addPlanGuidanceandremovePlanGuidancetoguidanceresolvers [#29] - Added a new
PlanGuidancemodel and schema to accommodate the newplanGuidancetable [#29] - Added
acronymstoAffiliationSearchschema so that client can get shortened names of affiliations [#29] - Added new methods to
guidanceServices:groupGuidanceByTag,getGuidanceSourcesForPlan,getSectionTags,getSectionTagIds,getSectionTagsMap,addPlanGuidanceAffiliationandgetAffiliationsWithGuidanceForTemplate[#29] - Added override for the
fast-xml-parserdependency - Added
ownerAffiliationchained resolvers toversionedQuestion[#18] - added
@as-integrations/express5for Apollo-Express integration - added data-migration to fix question JSON so that
"selected": 0is now"selected": false(and1->true).
- Update buildspec to use
--omit=devinstead of--productiononnpmcommands - Updated
re3data-os-populate.tsbecausefetchWithTimeoutkept erroring out when we populate the OpenSearch data. We needed to add acatchandretriesbecause a single failed attempt would kill the entire sync. [#118] - Moved the data migration script that populates the researchOutputTypes db table to
local-onlydirectory, because it was not getting populated because SUPER ADMIN user did not yet exist [#118] - Updated SSO test controllers with additional debug
- Updated
buildspec.yaml, 'Dockerfile's to work with new combined Apollo+Shibboleth container - Updated
src/mocks.tsby removing dependency oncasual - Updated
repositoriesquery to use combined search strategy across custom and re3data sources with OpenSearch-backed pagination - Updated
Repositorymodel to support searchCombined functionality that integrates custom and re3data repositories - Updated
repositoryServiceto orchestrate queries from both custom and re3data sources with pagination support - Updated
openSearchServiceto provide re3data repository search, filtering, and retrieval capabilities - Updated
addCustomSectionto includename,introduction,requirementsandguidanceto the input schema - Updated buildspec and Dockerfile for AWS to ignore audit scan on devDependencies and to ensure we do not build an image that contains them
- Updated the
TemplateCustomizationOverviewchecks forhasGuidanceTextandhasSampleTextflags to use thecustomSectionandcustomQuestion. - Updated the
publishmethod inTemplateCustomizationso it would allow me to publish a customization whenisDirtywas true and the template had been published before. Also removed check forcurrentinVersionedTemplateCustomizations.createso that it could get past theVersion already existserror when trying to publish a template customization a second time [#428] - Updated the
updatefunction inVersionedTemplateCustomization.ts model because it was failing since what is returned by theupdatefunction inMySQLModelis aResultSetHeaderand not an instance ofVersionedTemplateCustomization`, so it was failing [#428] - Updated
TemplateCustomizationOverviewto include thesectionCustomizationIdandquestionCustomizationIdfor funder sections and questions that have been customized. - Updated
TemplateCustomizationOverviewto accurately populate thehasGuidanceTextandhasSampleTextflags forcustomSectionandcustomQuestiontypes - Removed the template owner and user affiliation id filters from
getAffiliationsWithGuidanceForTemplateso that the search returns ALL affiliations with guidance for the associated section tags [#29] - Updated
buildspec.yamlto runtrivyscans, unit tests andnpm audit - Unpegged dependencies in
package.json - Started updating files to use JSDoc format
- Updated
answer,funding,member,planandprojectresolvers to use the newsaveMaDMPVersionfunction to update maDMP records. - Updated
superAdminresolver and replaced existing functions with one that allows us to force the recreation of a maDMP record for a specified plan id. - Upgraded to Apollo Server
5.4and updates all@aws-sdkpackages - Updated the
Planmodel'screatefunction to auto-populate theplanGuidancetable when a plan is created [#29] - Updated related works endpoints to support related works project overview page.
- Updated
findBestPracticeByTagIdsandfindByAffiliationAndTagIdsinVersionedGuidanceto remove the use ofVersionedGuidanceTagstable, since there is not table with that name [#18] - Regenerated
src/typesusing newgraphql-codegenversion - Updated
tokenServiceto useuuidinstead ofuuidv4package - Updated all calls to
logger.[level](null, 'message')tologger.[level]({}, 'message')because new version of Pino doesn't allow null - Changed min node/npm versions in
package.json(node22.15, npm11.3) - Updated CodeBuild env to use node
22 - Upgraded
graphqlto v16.12.0 - Bumped
tsconfigtoes2023 - Upgraded to
@keyv/rediswhich required some changes to thesrc/config/cacheConfigandsrc/datasources/cache.tsfiles - Updates to appease newer version of eslint
- Removed the
unique_vTemplateCustsrestriction fromversionedTemplateCustomizationstable, because it was not allowing the publishing of a templateCustomization more than twice, because the combination oftemplateCustomizationIdandactivehad to be unique [#428] - Removed
src/datasources/dynamodata source. Writes to Dynamo are now being handled by thegenerateMaDMPRecordLambda Function. - Removed
src/models/PlanVersion - Removed the old
commonStandardService. This functionality now lives in the@dmptool/utilspackage - Removed most functions from
src/datasources/dmphubAPIdata source that were atempting to modify dynamo records via the old DMP Hub API - Removed DMP endpoints from
dmphubAPIdatasource - Removed override for
fast-xml-parserdependency - Removed override for
qsdependency - Removed duplicative properties like
public id: number;from classes inmodels/RelatedWork. They are inherited fromMySQLModel. - removed Apollo config option to deal with flaw in Apollo4
status400ForVariableCoercionErrors - Removed deprecated
@types/bcryptanduuidv4packages - Removed
ioredispackage
- Had issue running
nuke-db.shandprocess.sh, so I turned off SSL by using--ssl=offinstead - Fixed
fetchTemplateDataquery inTemplateCustomizationmodel becausequestionCustomizationHasSampleTextwas incorrectly returning true [#130] - In
preparePaginationOptionsfunction, wrapped each cursorField withCOALESCEto handleNULLvalues in SQLCONCAT, otherwise if any cursorField is NULL, it would just return a null value due to the wayCONCATworks [#107] - Fixed breaking cloning of template. The
addTemplatewas updated to accept acopyFromVersionedTemplateIdso that we copy from versioned template, section and questions, when it's not a template from the user's org. Otherwise we check forcopyFromTemplateIdto copy/clone from templates, sections and questions, and if neither are present, we continue to create a new record fortemplatestable [#1006] - Fixed issue with templates not cloning with sections and questions by updating the
addTemplatemutation to clone from non-versioned template, section and question [#1006]
- Updated License resolver to remove pagination from
licensesquery. It now returns all licenses. - Updated tests and isValid functions on
Question,VersionedQuestionandAnswerto work with new version of@dmptool/typesv2.0 - Related works stored procedures so that they can insert existing related works and ground truth data.
- Added unit tests for the license resolver
- Added endpoint for returning summary stats for related works associated with a plan.
- Added ability to manually add a related work via a DOI.
- Added
findByURIsmethods to bothRepositoryandMetadataStandardsmodels [#572] - Added
repositoriesByURIsandmetadataStandardsByURIsresolvers to return matching repos to provided URIs [#572] - Added
hasAssociatedPlansmethod to VersionedTemplate model to check if any plans are associated with a template - Added
deactivateByTemplateIdmethod to VersionedTemplate model to deactivate all versionedTemplates for a given template - Added unit tests for
hasAssociatedPlansanddeactivateByTemplateIdmethods in VersionedTemplate model - Added unit tests for
archiveTemplateresolver in template resolver - Added
overridessection topackage.jsonforqssincesupertestis still using old version - Added
slugto tags array returned inPlanSectionOverview - Added new
ssoPassthruControllerandssoCallbackControllerstub controllers - Added a
findByEmailDomainendpoint to theAffiliationmodel
- Fixed issue with package-lock which was using local
../dmptool/typesinstead of@dmptool/types - Upgrade
expressdue to vulnerability inqs - Fixed data-migration script:
2025-12-01-1512-add-recommended-licenses.sql[#552] - Updated
RepositoryTypeenum to cover all the ones in our db [#552] - Update Repository model to get all unique repositoryTypes from db and return that info [#552]
- Updated repository resolver to return
subject areas[#552] - Fixed auth0/node-jws vulnerability [#552]
- Fixed relatedWorksTables.spec.ts tests.
- Fixed a small data-migration issue related to using the wrong createdById
- Updated
auth0/node-jws Improperly Verifies HMAC Signaturedue to vulnerability
============================================================================ prior to 2025-12-05
- Added local data migrations to set default member role and set the createdById for seed users
- Added a
allProjectsresolver to return all projects relevant to the Admin - Added a new
test-no-dbscript topackage.jsonto run all tests but the ones that need a running docker env - Added a data migration SQL file to drop all existing tables and recreate with
utf8mb4_0900_ai_cicollation and use ofINT UNSIGNEDfor ids - Added a data migration SQL file to create the stored procedures needed by the related works matching process
- Added seed SQL files for use in local dev environments
- Added models, resolvers, mutators for Guidance, GuidanceGroup, VersionedGuidance and versionedGuidanceGroup [#12]
- Added
AffiliationDepartmentsmodel - Added
TemplateLinksandVersionedTemplateLinksmodels - Added
slugto theTagschema
- Updated
archiveTemplateresolver to check for associated plans before deleting: if plans exist, unpublishes the template by clearinglatestPublishVersionandlatestPublishDate, settingisDirtyto true, and deactivating all related versionedTemplates; if no plans exist, deletes the template as before - Added
descriptioncolumn toguidanceGroupsandversionedGuidanceGroupsdb tables [#528] - Added
descriptiontoGuidanceGroupmodel - Fixed issue in
VersionedGuidancemodel'screatemethod to ignoretagId[#528] - Added
userchained resolver toguidanceresolver [#528] - Added
descriptiontoguidanceGroupresolver, and added bothuserandversionedGuidanceGroupchained resolvers [#528] - Updated
guidanceServiceto get current tags for the guidance to add them to versionedGuidanceTags table [#528] - Fixed an issue with the the
addProjectresolver not returning errors - Updated
planServiceto save roles for the default plan member - Updated ORCID datasource so that the API and Auth URLs are independent: Removed
ORCID_BASE_URLand replaced withORCID_API_BASE_URL,ORCID_AUTH_BASE_URL - Updated the README to reflect recent changes
- Updated dependencies:
@aws-sdk/client-dynamodb,@graphql-tools/merge,ts-jestand@eslint/js - Updated the
myProjectsresolver to only return the projects the user owns or collaborates on - Updated husky precommit hook to run
npm run test-no-db - Updated the
data-migrations/process.shscript so that you can pass alocalargument which will run all migrations in thelocal-onlysubdirectory - Bumped the node version in the Dockerfiles to 22.x
- Renamed local DB in
docker-compose.yamlfromdmsptodmptool - Updated
affiliationEmailDomainsto use theaffiliations.urias the FKey - Updated
data-migrations.process.shscript to useutf8mb4_0900_ai_cicollation when creating the database - Replace
findByURLwithfindByAffiliationAndURLinAffiliationLinksmodel - Updated
Projectsmodel so that the search includes bothDRAFTandCOMPLETEplans by default. Migrated data wasn't showing up because it wasCOMPLETE - Fixed some typos in
AffiliationLinksmodel and updated to useaffiliationIdas a URI - Updated
Tagmodel to include newslugfield - Updated
Usermodel to include the newoldPasswordHashfield
- Removed old
OutputandOutputTypemodels and references to them inRepository,MetadataStandard,ProjectandPlanmodels - Removed references to
outputsfrom schemas and reslvers - Removed the
@types/eslint__jsdependency because@eslint/jestincludes its own types now
- Removed the setting of
dmsprtoken in therefreshTokenControllerbecause it was overriding the expiration of that refreshToken to be the same as the defaultauthToken
============================================================================ prior to 2025-10-21
- Added migration for the
guidance-related tables [#483] - Added planFeedbackStatus resolver and tests (status of NONE, REQUESTED, COMPLETE)
- Added related works resolvers and tests.
- Added data migration to ensure collaborator tables allow for NULL in
userIdfield - Added tables to support template customizations
- Added stub models for each new template customization table with comments on what needs to be done
- Added dependabot config
- Added new
parameterStoredatasource to fetch values from AWS Systems Manager Parameter Store - Add new ENV variables
ORCID_CLIENT_ID,ORCID_CLIENT_SECRET,ORCID_BASE_URL,ORCID_AUTH_PATHandORCID_READ_ONLY_SCOPE. - Added
src/config/ocidConfigto provide access to the above ENV variables and also defaults for some of them - Added new
src/datasources/orcidto support interactions with the ORCID API - Added
findPotentialCollaboratorByORCIDandfindPotentialCollaboratorsByTermto theProjectCollaboratormodel: - Added a
findByOrcidfunction to theUsermodel - Added relatedWorks, workVersions, and works tables to database and two stored procedures that will be used to update the related works.
- Added tmp dir for jest caching (ignored by git)
- Added Trivy scan and
npm run buildto precommit hooks - Added some logic to the
prepareObjectForLogsfunction to redact sensitive info - Added
redactto the pino logger to prevent sensitive information from being logged - Added ability for
VersionedSectionssearchfunction to return onlybestPracticesections, only sections withoutbestPracticeor all sections[#436] - Added resolver to handle resending of invite for project collaborators [#433]
- Added bash to AWS Dockerfile for session manager
- Added
CONTRIBUTING.mdandCODE_OF_CONDUCT.mdfiles - Added a data migration script to update
visibilitytolatestPublishVisibilityintemplatestable. [#405] - Added code to update
latestPublishVisibilitywhenever atemplateis published [#405] - Added model/resolver for
PlanProgressand nestedprogressinPlanresolver [#720] - Added checks in
ProjectMemberandPlanMemberto prevent the deletion of a member if they are the last one [#358] - Added a fallback to set a
defaultrole if none was provided while adding a newProjectMember[#358] - Added
findDMPIdsForEmailhelper method toTokenServiceso that the JWT will now contain a list of DMP ids and the user's access level - Added
hasPermissionOnPlanto theplanServicethat checks the info contained within the token to determine access instead of making DB calls - Added
ProjectFilterOptionsas a possible input for themyProjectsresolver - Added
PlanFeedbackandPlanFeedbackCommentsmodels [#243] - Added
projectCollaboratorCommentsAddedtoemailServiceso that we can emailproject collaboratorswhen new comments added [#243] - Added comment mutations to
answersresolver and createdfeedbackresolver [#243] - data migration to change collation to
utf8mb4on all tables - added
publishedSectionresolver tosrc/resolvers/versionedSection.ts - added
publishedQuestionresolver tosrc/resolvers/versionedQuestion.ts
- Updated the
js-yamldependency - Updated
popularFundersresolver to return only 5 popular funders [#500] - Upgrade
nodemailerfrom6.10.1to7.0.10to address security vulnerability - Updated
ORCID_REGEXinhelper.tsso that urls can be submitted without a thewww.Also, addedstripORCIDIdentifierBaseURLto just strip out all protocols and domains to extract the OrcidID [#251] - Updated
OrcidAPIto handle404errors so that we return null rather than throwing an error [#251] - Updated
addProjectMemberInputschema to includeaffiliationNamesince we are using a TypeAhead field and sometimes we only get theaffiliationName[#251] - Updated
addProjectMemberresolver to use eitheraffiliationIdoraffiliationNameto process affiliation info [#251] - Updated related works resolvers to return aggregated counts for the UI, and modifications to some fields in database for UI.
- Updated the
findCollaboratorresolver to allow for searching by ORCID or by a search term. - Updated cursor pagination logic to accept sort information
- Update
user.registermodel function to auto-accept all open template and project collaboration invites - Upgraded @dmptool/types to v1.2.3 in package.json and rebuilt package-lock
- Updated
answerandaddAnswerCommentpermissions to include a collaborator who hasCOMMENTprivileges [#243] - Update
removeAnswerCommentandremoveFeedbackCommentto allow deletion by creator, plan creator, or OWN-level collaborator [#243] - Created
commentPermissions.tsservice to determine if a comment can be deleted [#243] - Updated
docker-compose.yamlto use thedmptool-networkwhich will be shared with other repos - Updated
answer,fundings,membersandplansresolver to use newhasPermissionOnPlanfunction - Update the
tokenServiceto adddmpIdsarray that stores the DMPs the user has access to - Updated the
ProjectSearchResult.searchquery to provide plan counts by status and filter by status options - updated all existing data migrations and scripts to use
utf8mb4instead ofutf8mb3 - updated
PlanSectionProgressto use better terminology. ChangedsectionIdtoversionedSectionId(what it really was) andsectionTtitletotitle - changed
sectionsresolver toversionedSectionson thesrc/resolvers/plan.tsfile and changed the reference forPlanSearchResult.sectionstoversionedSections
- Fixed migration error for versionedGuidance where can't be too strict since NULLs set for deleted parent Guidance. Related to [#12]
- Fixed breaking build by removing
NODE_ENV=productionbeforenpm ciwhich was skipping devDependencies, but needed for the build process. addSectionmutation resolver was not savingtags. Added code to add tags for new section [#445]- Fixed issue where updating an answer, funding or members was not triggering the creation of a new PlanVersion
- Fixed bug with maintaining the latest PlanVersion (common standard JSON) when a plan is updated
- Fixed issue where the title of the DMP in the common standard JSON is using the template title instead of plan title
- Updated
PlanSectionProgressmodel so it correctly shows how many answers have been filled. [#719] - Fixed an issue where signup failed because context had been reset to different object
- Fixed an issue causing the DMP version to not include sections/questions in the narrative if they had not been answered
- Fixed an issue with the null/undefined check on model queries that use 'searchTerm'
- When generating a new
versionedTemplate, we need to deactivate the old ones in the db [#363] - Bug with
FunderPopularityResultin the GraphQL schema that was makingapiTargetnon-nullable - added a data migration script to repair bad option based question JSON
- Removed
dmproadmap_templatefrom the common standard. That information is now stored indmproadmap_narrative - Removed
dmpIdsarray from the JWT payload. - Removed
hasPermissionOnPlanfunction fromplanServicesince JWT no longer hasdmpIdsarray
- Addressed
fast-redactvulnerability by updating thepinoversion to9.12.0, which removes fast-redact
- Added
findFilledAnswersByQuestionIdswhich takes plan and question ids and only returns filled answers for those questions. - Added data migration to clean up old question JSON so it conforms with new @dmptool/types schemas
- Added data migration to drop the old
questionTypestable - Added
updatePlanFundingto allow the update of multipleplanFundingrecords [#305] - Added 'apiTarget' to the PopularFunders objects and query for use in the frontend
- Added
updatePlanTitleresolver - Added a
titlefield to theplanstable and then updated Plan model and schema to use it - Added a
normaliseDateTimefunction inutils/helper.ts - Added
projectMembers.isPrimaryContactfield to DB andProjectMembermodel and GraphQL schema - Added
setCurrentUserAsProjectOwnerandensureDefaultProjectContactfunctions to theprojectServiceand updated theprojectresolver to call them. - Added the new
ensureDefaultPlanContactfunction to theplanServicemodule and updated theplanresolver to use it - Added a
sendEmailNotificationargument to thecreatefunction ofProjectCollaborator(defaults to true) so that we can bypass sending an email when setting the project creator as the default contact. - Added
PlanMember.findPrimaryContactfunction - Added
return formatISO9075(new Date(parent.blah));to all resolvers so that dates are always in the correct format - Added
invitedByto theProjectCollaboratorresolver - Added SQL script to convert
affiliations.typesto upper case to work with theAffiliationTypeenum - Added a
validateConnectionfunction to the mysql datasource - Added time constraints to the
Affiliation.top20function so that it is inclusive of the current day - Added
sqlStatementto the log output whenMySQLModel.queryfails - Added
getEmailmethod to theUsermodel to retrieve the email address for a user. - Added a new resolver for
answerByVersionedQuestionIdso that we can get the question-specific answer to populate the question in the Question detail page. - Added a new MySQL container to host the test DB to the docker compose stack
- Added JSON column
questionTypetoquestionsandversionedQuestionstables - Added JSON column
jsonto theanswerstable - Added the new @dmptool/types package
- Added
reorderDisplayOrderherlper function to help maintain thedisplayOrderfield on a set of objects - Added
updateDisplayOrdersto both thesectionServiceandquestionService - Added
updateSectionsDisplayOrderandupdateQuestionsDisplayOrderschema and resolvers - Added data migrations for new
versionedSectionTagstable and seed script - Added
maxDisplayOrderqueries to Section model - Added
aws-process.shto allow migrations to be run in the AWS environment - Added
init-tablesandinit-seeddata migration files - Added
queryWithPaginationfunction toMySQLModel. - Added
VersionedSectionSearchResultto optimize the query for displaying an org's published sections and the bestPractice sections - Added
popularFundersquery to theaffiliationsresolver - Added
accessLevelto projectCollaborator and removeduserId - Added new resolvers related to
projectCollaborators. Also, when project is created, automatically add user asprojectCollaboratorwithaccess level=OWN - Added dynamoDb to the docker-compose file and setup dev to use the local instance
- Added tests for
planresolver and added tests forcontributorresolver's queries - Added mocks for most of the MySQL tables and the Dynamo table
- Added a new
dynamodatasource (to replace the DMPHub API one ... much faster to access the table directly) - Added
getAwardsmethod toDMPHubAPI. - Added
searchExternalProjectsquery andprojectImportmutation. - Added
TemplateSearchResult,VersionedTemplateSearchResultandProjectSearchResultto optimize querying - Added
sectionstoPlanschema and to plan resolver - Added the
relatedWorksdata migration - Added model and resolvers for
RelatedWork - Added model and resolvers mutations for
PlanContributorandPlanFunder - Added the
Answer,AnswerCommentmodel and supporting resolvers - Added the
PlanVersiontable and model - Added a
commonStandardServiceand aplanService - Added the
apiTargetto theaffiliationstable - Added
Plan,PlanFunder,PlanContributor,ProjectCollaborator,DMPandRelatedIdentifiermodels - Added data-migration script to add additional columns to the
planstable - Added data-migration to add
isPrimaryContactflag to theplanContributorstable - Added new seed data-migration for
plans,planContributors,planFunders - Added "mocks" for use in tests for
Affiliation,Collaborator(Template/Project),Contributor(Project/Plan),ContributorRole,Funder(Project/Plan),Plan - Added a
findByIdfunction to theVersionedTemplatemodel - Added a default ORCID base URL and regex to
Usermodel - Added
getMockDOIandgetMockDMPIdhelper functions for tests - Added an
IsNullOrUndefinedandvalueIsEmpty(null, undefined or an empty string) helper functions - Added
config/dmpHubConfig.tsfor DMPHub specific configuration - Added
projectPlansjoin table which acts as a bridge between theprojectstable in the MySQL database and theplansstored in the DMPHub DynamoDB table - Added model mocks for Affiliation and Collaborator
- Added resolver integration tests for affilian and collaborator resolvers
- Added
useSampleTextAsDefaultcolumn to questions table and addadminsto Template schema and chained it in the resolver - Added
requestIdto the Apollo context - Added
questionOptionsschema, resolver andQuestionOptionmodel, which will be used foroptionquestion types - Added a new query to get all versionedTemplates, called
myVersionedTemplates, under user's affiliation, and added a new method in the model calledfindByAffiliationId - Updated
templatesresolver to handle updates tosectionsandquestionswhen copying atemplate - Added "remove" method to SectionTag model. Updated "updateSection" method in Section resolvers to remove sectionTags when user is updating their Section. Added "getTagsToRemove" method to the Section resolver. Added associated unit tests.
- Added "lastPublishedDate" field to templates table, and changed "currentVersion" field to "lastPublishedVersion"
- Added support for creating "other" affiliations
- Added update and updatePassword to User
- Added resolvers for User
- Added userService to handle random password generation, anonymization and merging
- Added recordLogIn and update functions to User model
- Added data-fns package to help with Date validation and formatting
- Added Language model, resolver and type. Added LanguageId to User and Template
- Built Question resolvers and models(#13)
- Fixed some bugs to allow frontend to access token change(Frontend #116)
- Added data migrations for QuestionType, Question, QuestionCondition, VersionedQuestion and VersionedQuestionCondition
- Added missing VersionedQuestionCondition schema file
- Added schemas for Question, QuestionType, QuestionCondition and VersionedQuestion
- Added resolvers and models for Section, Tag and VersionedSection
- Added acceptedTerms to User schema and to user sql table
- Added schema for Section and Tag
- Initial schema, model, mocks and resolver for Templates
- Initial schema, model, mocks and resolver for Collaborators
- added templateService to assist with actions that work on a Template and all of it's child objects
- Added stub emailService as a placeholder for now. We will build that out once the AWS infrastructire is in place
- Added new
src/__mocks__/contextto mock the Apollo Server context object - Added
insert,updatedeletefunctions to theMySqlModelabstract class - Missing data-migration for the dataMigrations table
- Script to nuke the DB so it can be easily rebuilt from scratch
- Added husky precommit tasks
- Added data migrations for Section and Tag
- Added Redis to the docker-compose file
- Added Cache data source (and tests)
- Added CSRF middleware
- Added signoutController and refreshTokenController
- Added tests for all Controllers
- Added supertest to support integration tests
- Added integration tests for token management (signin, signup, signout, refresh)
- Data migrations for affiliations table
- Added Project, ProjectContributor, ProjectFunder schemas and supporting tables
- Added Plan, PlanContributor, PlanCollaborator, PlanFunder, PlanFeedback, PlanFeedbackComment, Answer and AnswerComment schemas and supporting tables
- Added models and resolvers for MetadataStandard, Repository, ResearchDomain, and License
- Added models and resolvers for ProjectContributor, ProjectFunder, ProjectOutput and Project
- Updated to work with the new @dmptool/types v1.2.0
- Updated all resolvers to call
normaliseDateTimefor the date fields - Replace old
ProjectMember.findPrimaryByPlanIdfunction withProjectMember.findPrimaryContact - Updated the
projectresolver and schema so thatsearchExternalProjectshas its owninputtype definition - Exposed the DynamoDB port in the local
docker-compose.yamlso that AWS CLI commands can be run against it - Discovered some intermittent issues with the new MySQL connection pool. Changed
keepAliveInitialDelayto zero and also added aninitPromiseto the class so that we can effectively wait for the connection pool to finish initializing before attaching it to the Apollo server context - Updated the
index.tsto use the newinitPromiseand also added some missingprocess.exitstatements - Found that
Collaboratorclasses were not awaiting the call tosuperin theirisValidfunctions - Fixed an issue where
isValidwas being called too soon in theCollaboratorclasses - Fixed an issue with
PlanMemberclasses'findByProjectMemberIdfunction so that it returns an empty array instead of null - Fixed some typos in
MemberRoleSQL queries - Fixed a bug where
Plan.isPublishedwas not returning the correct result - Fixed a bug where
Plan.visibilitywas not being defaulted toPRIVATE - Fixed a bug on
Projectmodel that was not allowing SuperAdmins or Admins to fetch a Project - Fixed a bug where
ProjectSearchwas still trying to fetch the user's email from the old table - Fixed a bug that was preventing
ResearchDomain.createfrom working becauseparentResearchDomainis an unknown field - Fixed a bug on
VersionedSectionso thatfindBySectionIdandfindByTemplateIdreturn an empty array instead of null when no results are found - Fixed a bug on the
affiliationresolver that was incorrectly checking the record's provenance - Fixed some bugs in the permissions checks for
collaborator,member,funding,projectandplan - Fixed an issue with the
planFunderschema that was referencingprojectinstead ofplan - Fixed some auth check bugs in
templateService - Fixed bug with
Affiliation.top20query which was still referencing the oldprojectFunderstable - Updated package.json and tsconfig.json with options for sourcemaps which is supposed to help making debugging/breakpoints in IDEs more reliable.
- Updated most tests since they mostly require tokens which require email which is now async because it comes from the UserEmail model.
- Updated resolvers, models and controllers to use correct methods for using email from the UserEmail model (or use convenience method
getEmailon the User model). - Updated table
user.failed_sign_in_attempsto be spelled correctly asfailed_sign_in_attempts - Updated
sectionsandquestionsqueries to order bydisplayOrder[#324] - Refactor the way we initialize the pino Logger and pass it around. Also removed the old
formatLogMessagefunction and replaced withprepareObjectForLogs - Consolidated handling of the Cache, so that we always pass the
adapter - Updated
mysqlConfigto use the new test DB when running intestmode - Refactored
mysqldatasource to properly use a connection pool. Updated theindex.tsto initialize the connection pool and then pass it, the dmpHubAPI, cache and logger around properly. - Updated
data-migrationsscripts to work with new test MySQL DB in the docker compose stack - Updated the
Questionschema to allowquestionJSON: Stringto be used in GraphQL query - Updated
Questionmodel to accessquestionJSONinput, parse the JSON using the Zod schemas provided by@dmptool/types, and populate thequestionTypewith the parsed JSON. - Updated cursor pagination to always return
nullfornextCursorif we are at the end of the results - Rename all occurrences of
ContributortoMemberandFundertoFundingto match newer terminology - Updated
addSectionresolver to properly copy questions and tags when creating a new section by copying one - Replaced all instances of
TemplateVisibility.PRIVATEwithTemplateVisibility.ORGANIZATION[#159] - Renamed the
outputTypestable toprojectOutputTypes - Updated
buildspecto allow for a "MODE" env variable to be set so that we can run migrations, tests and the build separately - Updated
publishedTemplates,users,myTemplates,topLevelResearchDomains,repositories,myProjects,metadataStandards,licenses,affiliationsqueries to use the newpaginationService - Updated
publishedTemplates,users,myTemplates,topLevelResearchDomains,repositories,myProjects,metadataStandards,licenses,affiliationsqueries to use the newpaginationService - Updated
publishedSectionsresolver to return the newVersionedSectionSearchResultarray - Format ORCID identifiers consistently, in the
ContributorandUsermodels, theprojectImportresolver andorcidscalar. - Changed a number of GraphQL definitions to PascalCase.
- Fixed projectCollaborators table which had an FKey on the plans table instead of the projects table
- Updated the
dmpHubAPIdatasource to support CRUD operations - Updated the
Planresolver and model to support mutations - Updated the
Affiliationschema and model to include the newapiTargetproperty. - Renamed old
planCollaboratorstable toprojectCollaborators - Renamed old
PlanCollaboratorresolved functions so that they point toProjectCollaboratorsince we decided to capture that at the project level - Updated
ProjectServicepermission check so that it looks at the ProjectCollaborators as well - Updated
QuestionConditionmodel to return the object with functions - Updated
ContributorRolemodel so that it has functions to associate them withPlanContributorrecords. - Moved config for
dmpHubAPIfrom the datasource into aconfig/dmphubConfig.tsfile - Removed old unused
Affiliationmethods fromdmpHubAPIand addedgetDMPandvalidate(for use in the near future when syncing changes within our system and the DMPHub) - Updated structure of
cacheConfig.tsto match other configs - Moved config for
MysSQLDataSourcefrom the datasource into its config file - Moved
SigTermhandler tests formysqlinto a separate test file. They were failing for some reason when run together - Refactored
context.tsand tests to use newdmpHubAPIdatasource - Refactored old "mocks" to extract duplicative code into the
MySQLMock.ts - Update existing resolver tests to use new mocks
- Made sure all config entries were covered in the
__tests__/setup.ts - Updated the
emailServiceto supportprojectCollaboratorsinstead ofplanCollaborators - Updated
questionandsectionresolvers to updateisDirtyin associatedtemplatewhen mutations were made. That way a user canSave Draftin theEdit Templatepage. - Updated models and resolvers to handle errors in a consistent way
- Refactored the way Sections handle the association with Tag to follow pattern used elsewhere
- Updated
formatLogMessageto accept the Apollo context instead of the logger so that it can being to record therequestId,jtianduserId(when available) - Updated
questionTypestable to remove 'Rich Text Editor' and to addusageDescription. Also, updated Question model'screatemethod to allow for entries with duplicatequestionText - Updated User update method to prevent password manipulation
- Updated User registration so that the terms and conditions must have been accepted
- Updated User schema, model and data migrations with new properties
- Change default JWT TTL to 30 minutes
- Added user id to the JTI to help ensure uniqueness
- Update sign out controller to always clear the cookies and return 200 regardless of the state of the tokens
- Updated
src/context.tsto use abuildContextwrapper function that can be called when building the context for Apollo Server and oursigninandsignupendpoints. - Updated use of
toUTCString()totoISOString() - Updated
tokenServiceto properly catch and throw errors - Updated
graphQLErrorswith more error types - Added MariaDB to docker-compose
- data-migrations/README.md with instructions on running migrations in the Docker container
- tokenService now supports refresh tokens, CSRF tokens and signout
- updated express middelware to fetch the access token and refresh tokens from the cookies instead of the headers
- removed old oauth-server package which had security vulnerabilities
- moved authMiddleware function from the router.ts into its own class in src/middelware
- updated Affiliation Schema, Resolver, Models to use new affiliations tables in the database
- updated all of the cache key structures to wrap them in
{}due to the way Redis handles keys in cluster mode - updated emailService to use nodemailer and to support emailConfirmation templateCollaboration and planCollaboration email messages
- added bestPractice flag to the Section
- Removed self referential foreign key constraints from the
userstable (makes it impossible to delete user records) - Removed
NOT NULLconstraint from theusers.affiliationIdfield (makes it hard to create an initial user record) - Dropped the
versionedQuestions.questionTypeIdfield and foreign key constraints (missed this one when those changes were made) - Removed test MySQL from the docker-compose.yaml
- Removed test DB values from
.env.example - Removed logic that used the test MySQL DB in the
data-migrations/nuke-db.shanddata-migrations/process.shscripts - Dropped the
emailfrom theuserstable - Dropped FKeys on
usersandaffiliations - Dropped
questionTypesandquestionOptionstables - Dropped the
questionTypeIdfield from thequestionsandversionedQuestionstables - Dropped the
answerTextfield fromanswers - Removed the old
QuestionTypeandQuestionOptionsschema and resolvers - Removed the
getQuestionOptionsToRemovefromquestionService. - Dropped all previous
data-migrationfiles in favor of the newinit-tablesandinit-seedfiles - Removed duplicate section check from
Section.createthat was just going off of the "name" - Dropped the
PlanVersiontable - Removed
prepareAPITargetfunction. - Removed
idfromProjectmodel's constructor (already handled in baseMySQLModel) - Removed old
dmphubAPIdatasource and renameddmptoolAPItodmpHubAPI - Old DMPHubAPI datasource and renamed DMPToolAPI to DMPHubAPI since that one had all of the new auth logic
- Added
publishedQuestionsto theversionedQuestionresolver to return all published questions with boolean for answered or not. - Fixed a bug where clients calling
createTemplateVersionin thetemplateresolver would get an error when trying to publish because adding data toversionedQuestionsrequired thatquestionTypeIdnot be null. I added a data-migration script to allow null because I believe we store the question type in thejsonfield now and do not requirequestionTypeId[#328] - Update profile was not working due to missing
createdByIdandmodifiedByIdvalues in db. Added data migration script to populate those fields [#278] - Fixed myTemplates query so that
TemplateSearchResultreturns theownerDisplayNamespecified in schema. - Fixed an issue where adding
templateCollaboratorswas failing due to the fact that theuserIdfield was required. - Was getting
undefinedbestPractice inupdateTemplatewhen none was passed in because of the logic on how it was set. Added a check for whetherbestPracticeis defined before setting value. Also, added an update tocreateTemplateVersion, so that errors from thegenerateTemplateVersionwill be caught and passed back in graphql response. Previously, when trying to save a DRAFT of a template, the mutation wouldn't return an error to the client, even though theSave draftdid not successfully complete. [#265] - Removed
Copy offrom in front of copiedSectionandTemplatenames [#261] - Fixed an issue where adding
templateCollaboratorswas failing due to the fact that theuserIdfield was required. - Fixed an issue where adding
projectCollaboratorswas failing due to the fact that theuserIdfield was required. This should not be required to add a new collaborator [#260] - When calling
updatePlanContributors, the resolver should set isPrimaryContact tofalsefor all contributors other than the one marked as isPrimary. - Fixed an issue where Jest tests failed on Linux due to case-sensitive file paths. The tests passed on macOS because its file system is case-insensitive by default.
- Fixed bugs related to addPlanContributor and updatePlanContributor since these were not working without missing contributorRoles
- Converted DateTimeISO to String in schemas so that dates could be inserted into mariaDB database, and updated MySqlModel and associated unit test
Initial Apollo Server build
- Added unit tests for User model and contributorRole resolver, and added @types/pino
- Added editor config
- initial Apollo server config
- Initial Schema for ContributorRole
- Initial Schema for DMSP
- Resolvers for ContributorRole
- Initial resolver to fetch a single DMSP from the DMPHub API
- Initial DMPHub API data source
- Initial MySQL data source
- Custom GraphQL scalars for ROR, ORCID and DMSP IDs
- Mechanism for Apollo to use mocks when a resolver has not yet been implemented
- Mocks for User
- Data migration mechanism
./data-migrations/process.sh - Documentation!
- Local Docker Compose config
- Pino logger with ECS formatter
- Plugin to log request/response lifecycle events
- Add Logger to the context and then used it in the resolvers
- Schema, Mocks, Models and Resolvers for Affiliations and tests for the Models and Resolvers
- Added new DataSource for the DmptoolApi with endpoints for Affiliations and a new mock for this data source for use in tests
- Made some updates to auth code based on testing out recent changes with frontend [#34]