-
Notifications
You must be signed in to change notification settings - Fork 16
Description
When navigating to a pending Document Request edit and creating an Order from it (see image below), the Order is not aware it is created for a Document Request during its indexing.
This becomes a problem when we want to index information from Document Request onto the Order.
One of those cases was implemented here.
The PR added the field document_request_waiting_time to the Order index, which requires the creation date of the related document request.
The problem happens as follows:
- Document Request X exists with state
PENDINGand has no Order attached to it - Librarian goes into the edit page for Document Request X and presses "create new Order".
- Librarian gets forwarded to the Order creation page.
- Librarian finishes creating Order Y.
- Order Y gets indexed and looks for a related Document Request. No Document Request is found, as the pid of Order Y was not yet added to Document Request X.
- The pid of Order Y gets added to Document Request X.
- Document Request X gets indexed.
This results in a state where Order Y has a related Document Request X, but the index of Order Y does nto reflect it.
In the PR mentioned above this problem was solved by reindexing the related order when a document request is indexed as can be seen here, but this is rather unclean.
