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

Find 137 migration of do from ds wagtail to ds search #25

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

Firdaussi
Copy link

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'.

@Firdaussi Firdaussi requested a review from TNA-Allan February 24, 2025 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant