Skip to content
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

Theses are not being assigned DOIs #2707

Closed
pgwillia opened this issue Jan 13, 2022 · 1 comment
Closed

Theses are not being assigned DOIs #2707

pgwillia opened this issue Jan 13, 2022 · 1 comment
Assignees
Labels

Comments

@pgwillia
Copy link
Member

pgwillia commented Jan 13, 2022

There are three theses so far that have not been assigned a doi:

It looks like Thesis does not have a description when building the metadata hash to create the doi. Instead Thesis has an abstract.

descriptions: [{
description: @item.description
}],

jupiter/db/schema.rb

Lines 411 to 455 in 7e1ce54

create_table "theses", id: :uuid, default: -> { "uuid_generate_v4()" }, force: :cascade do |t|
t.string "visibility"
t.bigint "owner_id", null: false
t.datetime "record_created_at"
t.string "hydra_noid"
t.datetime "date_ingested", null: false
t.string "title", null: false
t.string "fedora3_uuid"
t.string "depositor"
t.string "alternative_title"
t.string "doi"
t.datetime "embargo_end_date"
t.string "visibility_after_embargo"
t.string "fedora3_handle"
t.string "ingest_batch"
t.string "northern_north_america_filename"
t.string "northern_north_america_item_id"
t.text "rights"
t.integer "sort_year"
t.json "embargo_history", array: true
t.json "is_version_of", array: true
t.json "member_of_paths", null: false, array: true
t.text "abstract"
t.string "language"
t.datetime "date_accepted"
t.datetime "date_submitted"
t.string "degree"
t.string "institution"
t.string "dissertant"
t.string "graduation_date"
t.string "thesis_level"
t.string "proquest"
t.string "unicorn"
t.string "specialization"
t.json "departments", array: true
t.json "supervisors", array: true
t.json "committee_members", array: true
t.bigint "logo_id"
t.string "aasm_state"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.json "subject", array: true
t.index ["logo_id"], name: "index_theses_on_logo_id"
t.index ["owner_id"], name: "index_theses_on_owner_id"
end

There are two ways I can think of to fix this

  1. If a description is not present try the abstract
      descriptions: [{
        description: @item.description || @item.abstract
      }],
  1. Decorate the Thesis item and add a method description which returns the abstract

View details in Rollbar: https://rollbar.com/ualbertalib/jupiter/items/1339/


ActiveRecord::RecordNotFound: Couldn't find Item with 'id'=6d93878f-c349-4db9-8224-978eff6b7a71
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activerecord-6.1.4.1/lib/active_record/core.rb", line 338, in find
  File "/var/www/sites/jupiter/app/jobs/doi_create_job.rb", line 6, in perform
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activejob-6.1.4.1/lib/active_job/execution.rb", line 48, in block in perform_now
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb", line 117, in block in run_callbacks
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/i18n-1.8.11/lib/i18n.rb", line 314, in with_locale
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activejob-6.1.4.1/lib/active_job/translation.rb", line 9, in block (2 levels) in <module:Translation>
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb", line 126, in instance_exec
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb", line 126, in block in run_callbacks
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activesupport-6.1.4.1/lib/active_support/core_ext/time/zones.rb", line 66, in use_zone
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activejob-6.1.4.1/lib/active_job/timezones.rb", line 9, in block (2 levels) in <module:Timezones>
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb", line 126, in instance_exec
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb", line 126, in block in run_callbacks
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activejob-6.1.4.1/lib/active_job/instrumentation.rb", line 21, in block in instrument
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activesupport-6.1.4.1/lib/active_support/notifications.rb", line 203, in block in instrument
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activesupport-6.1.4.1/lib/active_support/notifications/instrumenter.rb", line 24, in instrument
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activesupport-6.1.4.1/lib/active_support/notifications.rb", line 203, in instrument
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activejob-6.1.4.1/lib/active_job/instrumentation.rb", line 31, in instrument
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activejob-6.1.4.1/lib/active_job/instrumentation.rb", line 14, in block (2 levels) in <module:Instrumentation>
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb", line 126, in instance_exec
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb", line 126, in block in run_callbacks
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activejob-6.1.4.1/lib/active_job/logging.rb", line 22, in block in tag_logger
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activesupport-6.1.4.1/lib/active_support/tagged_logging.rb", line 99, in block in tagged
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activesupport-6.1.4.1/lib/active_support/tagged_logging.rb", line 37, in tagged
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activesupport-6.1.4.1/lib/active_support/tagged_logging.rb", line 99, in tagged
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activejob-6.1.4.1/lib/active_job/logging.rb", line 22, in tag_logger
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activejob-6.1.4.1/lib/active_job/logging.rb", line 15, in block (2 levels) in <module:Logging>
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb", line 126, in instance_exec
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb", line 126, in block in run_callbacks
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb", line 137, in run_callbacks
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activejob-6.1.4.1/lib/active_job/execution.rb", line 47, in perform_now
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activejob-6.1.4.1/lib/active_job/execution.rb", line 25, in block in execute
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb", line 117, in block in run_callbacks
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activejob-6.1.4.1/lib/active_job/railtie.rb", line 47, in block (4 levels) in <class:Railtie>
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activesupport-6.1.4.1/lib/active_support/execution_wrapper.rb", line 88, in wrap
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activesupport-6.1.4.1/lib/active_support/reloader.rb", line 72, in block in wrap
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activesupport-6.1.4.1/lib/active_support/execution_wrapper.rb", line 84, in wrap
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activesupport-6.1.4.1/lib/active_support/reloader.rb", line 71, in wrap
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activejob-6.1.4.1/lib/active_job/railtie.rb", line 46, in block (3 levels) in <class:Railtie>
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb", line 126, in instance_exec
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb", line 126, in block in run_callbacks
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb", line 137, in run_callbacks
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activejob-6.1.4.1/lib/active_job/execution.rb", line 23, in execute
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/activejob-6.1.4.1/lib/active_job/queue_adapters/sidekiq_adapter.rb", line 42, in perform
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/sidekiq-5.2.9/lib/sidekiq/processor.rb", line 192, in execute_job
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/sidekiq-5.2.9/lib/sidekiq/processor.rb", line 165, in block (2 levels) in process
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/sidekiq-5.2.9/lib/sidekiq/middleware/chain.rb", line 128, in block in invoke
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/rollbar-3.3.0/lib/rollbar/plugins/sidekiq/plugin.rb", line 11, in call
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/sidekiq-5.2.9/lib/sidekiq/middleware/chain.rb", line 130, in block in invoke
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/sidekiq-5.2.9/lib/sidekiq/middleware/chain.rb", line 133, in invoke
  File "/var/www/sites/jupiter/vendor/ruby/2.6.0/gems/sidekiq-5.2.9/lib/sidekiq/processor.rb", l
@pgwillia pgwillia added the bug label Jan 13, 2022
@pgwillia pgwillia changed the title NoMethodError: undefined method `description' for #<Thesis:0x0000000007eb9568> Theses are not being assigned DOIs Jan 13, 2022
@pgwillia pgwillia self-assigned this Jan 19, 2022
@pgwillia
Copy link
Member Author

Was able to assign DOI to Thesis in production
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant