Skip to content

Commit

Permalink
add deposit rule for 'draft_with_review' status
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel committed May 30, 2024
1 parent b1a22c8 commit e6e9dd9
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions inst/actions/zen4R_deposit_record.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ function(action, entity, config){
update_metadata <- action$getOption("update_metadata")
update_files <- action$getOption("update_files")
communities <- action$getOption("communities")
if(is.na(communities)) communities = list()

#get_zenodo_metadata
get_zenodo_metadata = function(){
Expand Down Expand Up @@ -413,7 +414,7 @@ function(action, entity, config){
}
}
}
print(record_status)
config$logger.info(sprintf("Current record status: %s", record_status))
out <- switch(record_status,
"draft" = {
config$logger.info(sprintf("Deposit draft record with id '%s' - publish = %s", zenodo_metadata$id, tolower(as.character(publish))))
Expand All @@ -422,6 +423,13 @@ function(action, entity, config){
publish = FALSE #management of publication later
)
},
"draft_with_review" = {
config$logger.info(sprintf("Deposit draft record with id '%s' - publish = %s", zenodo_metadata$id, tolower(as.character(publish))))
ZENODO$depositRecord(
zenodo_metadata,
publish = FALSE #management of publication later
)
},
"published" = {
switch(strategy,
"edition" = {
Expand Down Expand Up @@ -537,7 +545,7 @@ function(action, entity, config){
#If ok, we submit it to the community
#If the geoflow user is maintainer of this community, make possible to accept immediatly the record
if(length(communities)>0){
if(out$metadata$status == "published"){
if(out$status == "published"){
config$logger.info("Adding published record to communities")
for(community in communities){
config$logger.info(sprintf("-> Processing community %s", community))
Expand Down

0 comments on commit e6e9dd9

Please sign in to comment.