-
Notifications
You must be signed in to change notification settings - Fork 2
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
TDRD-229 - Add skipValidation flag in addOrUpdateBulkFileMetadata mutation #1017
Conversation
…kip-validation # Conflicts: # src/main/scala/uk/gov/nationalarchives/tdr/api/metadatainputvalidation/MetadataInputTags.scala
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for looking at this. Made some comments around changing the approach and some restructuring of the code to make it more clear, I hope
@@ -33,6 +34,34 @@ class ValidateFileMetadataService( | |||
}) | |||
} | |||
|
|||
def addAdditionalMetadataStatuses(fileMetadataList: Seq[AddOrUpdateFileMetadata]): Future[Seq[FilestatusRow]] = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should move this method to the FileStatusService
class
The helper methods: toPropertyNames
; toAdditionalMetadataFieldGroups
; toValueDependenciesGroups
should be moved to the CustomMetadataPropertiesService
src/main/scala/uk/gov/nationalarchives/tdr/api/service/FileMetadataService.scala
Outdated
Show resolved
Hide resolved
Do not allow a user to skip the validation if the user doesn't have update_metadata access
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Mostly just tidy up comments. Thanks
src/main/scala/uk/gov/nationalarchives/tdr/api/service/CustomMetadataPropertiesService.scala
Show resolved
Hide resolved
src/main/scala/uk/gov/nationalarchives/tdr/api/service/FileStatusService.scala
Outdated
Show resolved
Hide resolved
src/main/scala/uk/gov/nationalarchives/tdr/api/service/ValidateFileMetadataService.scala
Outdated
Show resolved
Hide resolved
src/test/scala/uk/gov/nationalarchives/tdr/api/routes/FileMetadataRouteSpec.scala
Show resolved
Hide resolved
src/main/scala/uk/gov/nationalarchives/tdr/api/service/ValidateFileMetadataService.scala
Outdated
Show resolved
Hide resolved
src/main/scala/uk/gov/nationalarchives/tdr/api/graphql/fields/FileMetadataFields.scala
Show resolved
Hide resolved
...test/scala/uk/gov/nationalarchives/tdr/api/service/CustomMetadataPropertiesServiceSpec.scala
Outdated
Show resolved
Hide resolved
src/test/scala/uk/gov/nationalarchives/tdr/api/service/FileServiceSpec.scala
Show resolved
Hide resolved
src/test/scala/uk/gov/nationalarchives/tdr/api/service/FileStatusServiceSpec.scala
Show resolved
Hide resolved
src/test/scala/uk/gov/nationalarchives/tdr/api/service/ValidateFileMetadataServiceSpec.scala
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks.
Will need to add the new flag in the Draft Metadata validation lambda once this change is in Production.
No description provided.