generated from nationalarchives/django-application-template
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Find 137 migration of do from ds wagtail to ds search #25
Open
Firdaussi
wants to merge
19
commits into
main
Choose a base branch
from
FIND-137-Migration-of-DO-from-ds-wagtail-to-ds-search
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Find 137 migration of do from ds wagtail to ds search #25
Firdaussi
wants to merge
19
commits into
main
from
FIND-137-Migration-of-DO-from-ds-wagtail-to-ds-search
+4,328
−4
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…-DO-from-ds-wagtail-to-ds-search
…ds-search Conflicts: .env.example README.md app/records/views.py test/records/test_views.py
…-DO-from-ds-wagtail-to-ds-search
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request
FIND-137-Migration-of-DO-from-ds-wagtail-to-ds-search
About these changes
These changes implement the delivery options functionality for the details page.
The delivery options are constructed messages based on the current status of the given document. So, for instance, a document might be undergoing treatment and be unavailable, or it might be available as a digital download. The delivery option explains this to the user.
At present, there is no attempt at serious front end design. The text returned is basically just thrown at the screen, but hyperlinks embedded in the delivery options will be valid (by valid, I mean they are valid urls but the destination pages may not have been built yet, so expect 404's).
There are currently 35 delivery options, not all of which are used, and some are rarely used (e.g. mould treatment). In addition to the 35, there are 4 different reader types. By that, we mean if the user is using the TNA public internet (in the canteen or reading rooms for instance), they are regarded as on site, whereas if the user is using the TNA employee intranet, they are classed as staff. Subscription users are a 3rd reader type and this is dependent on decisions that have yet to be made, so is not implemented here (all that is required, though, is a flag to indicate whether a user is a subscriber and the rest of the code will work). Any other user is regarded as off site. The 35 delivery options each have four subdivisions (onsite, offsite, staff, subscription) which alter the delivery option message (for instance, if on site and a document is available, the message will indicate that, but if offsite it may say it is available digitally or you can book a seat at Kew to see the document).
How to check these changes
The DO's work by taking the iaid of the current document and making an api call to a DORIS database. This database isn't needed for the automated tests but will be needed for checking a details page. The setup of access to the database is held in a document called OpenVPN setup.docx which has a link on the Jira ticket.
Once you have the VPN set up, you can visit the details page and try a variety of iaid's to see what results you get:
catalogue/id/
Examples:
catalogue/id/C2849839 (Standard messages)
catalogue/id/C13187129 (Mould treatment)
catalogue/id/C11542222 (On loan)
catalogue/id/C14016305 (AV media/sensitive material)
Note that the status of a document is likely to change and the results above may vary. Compare the results with live discovery, e.g. https://discovery.nationalarchives.gov.uk/details/r/C11542222
To 'trick' the software into thinking you are staff on site, public on site or subscription (not available yet, as mentioned above), set OVERRIDE_READER_TYPE= (0-3) in docker-compose.yml and docker compose down/up.
The values are as follows:
STAFFIN = 0
ONSITEPUBLIC = 1
SUBSCRIPTION = 2
OFFSITE = 3
so, OVERRIDE_READER_TYPE=1 will be 'on site public'.