From 72c2a3102cdb9184f16c9a712efeb14b0863a3e4 Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Wed, 19 Aug 2020 14:24:26 +0200 Subject: [PATCH] update new type column --- app/models/doi.rb | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/app/models/doi.rb b/app/models/doi.rb index 657d06eac..04fd06a82 100644 --- a/app/models/doi.rb +++ b/app/models/doi.rb @@ -1924,8 +1924,34 @@ def set_defaults def update_agency if agency.blank? || agency.casecmp?("datacite") self.agency = "datacite" - elsif agency.casecmp? ("crossref") + self.type = "DataciteDoi" + elsif agency.casecmp?("crossref") self.agency = "crossref" + self.type = "OtherDoi" + elsif agency.casecmp?("kisti") + self.agency = "kisti" + self.type = "OtherDoi" + elsif agency.casecmp?("medra") + self.agency = "medra" + self.type = "OtherDoi" + elsif agency.casecmp?("istic") + self.agency = "istic" + self.type = "OtherDoi" + elsif agency.casecmp?("jalc") + self.agency = "jalc" + self.type = "OtherDoi" + elsif agency.casecmp?("airiti") + self.agency = "airiti" + self.type = "OtherDoi" + elsif agency.casecmp?("cnki") + self.agency = "cnki" + self.type = "OtherDoi" + elsif agency.casecmp?("op") + self.agency = "op" + self.type = "OtherDoi" + else + self.agency = "datacite" + self.type = "DataciteDoi" end end