Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
jambun committed Jun 21, 2024
1 parent a55689e commit a16ef24
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ records as Accessions.
----
Developed by Hudson Molonglo for the National Library of Australia.

© 2022 Hudson Molonglo Pty Ltd.
© 2022-2024 Hudson Molonglo Pty Ltd.

----

## Compatibility

This plugin was developed against ArchivesSpace v3.2. Although it has not
This plugin was developed against ArchivesSpace v3.3.1. Although it has not
been tested against other versions, it will probably work as expected on all
2.x and 3.x versions.

Expand All @@ -34,9 +34,10 @@ dropdown in the application toolbar (top right of page). You should see a
`RefTracker Offers` option.


## Import Offers
## Import Offers as Accessions

1. Click on `Plug-ins` > `RefTracker Offers`
2. Offers with a status of `Closed successful` are shown, most recently closed first
3. Click the checkboxes next to the offers you would like to import
2. Offers with identifiers that are not already in AS are shown in reverse Offer Number order
3. Offers can also be found individually by Offer Number
3. Click the checkboxes next to the Offers you would like to import
4. Click the `Import` button
18 changes: 12 additions & 6 deletions backend/model/reftracker_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,16 @@ def self.get_question(question_no)
def self.manuscript_offers(page = 1, offer_number)
offers = []
if offer_number
resp = ASUtils.json_parse(self.get('getQuestion', {:parameters => {:key => 'question_no', :value => offer_number, :format => 'json'}.to_json}))
# resp = ASUtils.json_parse(self.get('getQuestion', {:parameters => {:key => 'question_no', :value => offer_number, :format => 'json'}.to_json}))

if resp.is_a? Array
raise ReftrackerAPIException.new("No offer for number #{offer_number}")
end
# if resp.is_a? Array
# raise ReftrackerAPIException.new("No offer for number #{offer_number}")
# end

# offers << resp

offers << resp
# fake it
offers << ASUtils.json_parse(File.read('/Users/james/projects/nla/data/reftracker_offer_NLAacq87747.json'))
else
columns = [
'question_no',
Expand Down Expand Up @@ -76,7 +79,10 @@ def self.manuscript_offers(page = 1, offer_number)
:pagesize => 200,
}

offers = ASUtils.json_parse(self.get('search', {:parameters => search_params.to_json}))
# offers = ASUtils.json_parse(self.get('search', {:parameters => search_params.to_json}))

# fake it
offers = ASUtils.json_parse(File.read('/Users/james/projects/nla/data/reftracker_offers_sorted.json'))
end

# here's how accession.identifier looks in the db :(
Expand Down

0 comments on commit a16ef24

Please sign in to comment.