Currently, when an ILL request is created a variety of metadata is gathered pertaining to that request. 1) Request specific metadata : This is metadata that relates directly to the request, such as requested date, request status etc. 2) Record specific metadata : This is metadata that relates to the record being requested, with some backends, such as BLDSS, this metadata is supplied by the backend. With other backends, such as FreeForm, this metadata is supplied by the requester. 3) Additional record specific metadata : When a request is placed for a partial work, such as a book chapter, additional metadata is supplied detailing the partial work. This metadata may be supplied by the backend (for example, article request from the BLDSS), or by the requester (for example, a request for a chapter from a book record from the BLDSS). There is a requirement to be able to edit some of this metadata, according to these proposed rules: 1) This is already editable 2 & 3) *May* need to be editable, depending on it's origin. i.e. If the metadata has originated from a "canonical" source, such as BLDSS, it should not be editable. If, however, it has originated from the requester via, for example, the FreeForm backend, it *should* be editable.
Created attachment 75491 [details] [review] Bug 20772: Add 'illrequestattributes.readonly' This patch adds a 'readonly' column to illrequestattributes. On a DB upgrade it also populates all existing rows with 1, indicating 'read only'
Created attachment 75492 [details] [review] Bug 20772: Add 'illrequest.price_paid' This patch adds a 'price_paid' column to 'illrequests'
Created attachment 75493 [details] [review] Bug 20772: DO NOT PUSH - Schema update Schema update for illrequestattributes.readonly Schema update for illrequests.price_paid
Created attachment 75494 [details] [review] Bug 20772: Borrowernumber should be read only On the Manage Request page, borrowernumber should be read only, we do not want users modifying the destination user once a request is placed
Created attachment 75495 [details] [review] Bug 20772: Fix malformed class name Supplier metadata elements have a dynamically formed class name, part of the name is formed from the metadata key, this breaks if the key has a space, so we replace spaces
Created attachment 75496 [details] [review] Bug 20772: Return cost & price_paid in API
Created attachment 75497 [details] [review] Bug 20772: Display and edit of price_paid
Created attachment 75563 [details] [review] Bug 20772: Bug preventing backend JS execution We should be 'PROCESS'ing any backend JS, not 'INCLUDE'ing it
Test plan: - Apply patches - Enable ILL - Ensure you have the FreeForm ILL backend available, a clone of the master branch here is required: https://github.com/PTFS-Europe/FreeForm - Create an request ILL using the FreeForm backend, populate as much metadata as possible, ensuring to also supply some custom fields - Save the request - On the "Manage ILL request" page for the newly created request, select the "Edit request metadata" - On the resulting edit page: => TEST: Ensure all entered metadata is displayed - Add new values, remove values, change values, including custom fields - Click "Update" - On the resulting "Manage ILL request": => TEST: Ensure all metadata fields reflect their changed values - Repeat the editing and updating process until you're happy it works
Created attachment 77230 [details] [review] Bug 20772: Add 'illrequestattributes.readonly'
Created attachment 77231 [details] [review] Bug 20772: Add 'illrequest.price_paid'
Created attachment 77232 [details] [review] Bug 20772: DO NOT PUSH - Schema update
Created attachment 77233 [details] [review] Bug 20772: Borrowernumber should be read only
Created attachment 77234 [details] [review] Bug 20772: Fix malformed class name
Created attachment 77235 [details] [review] Bug 20772: Return cost & price_paid in API
Created attachment 77236 [details] [review] Bug 20772: Display and edit of price_paid
Created attachment 77237 [details] [review] Bug 20772: Bug preventing backend JS execution
Test plan: - Apply patches - Enable ILL - Ensure you have the FreeForm ILL backend available, a clone of the master branch here is required: https://github.com/PTFS-Europe/FreeForm - Create an request ILL using the FreeForm backend, populate as much metadata as possible, ensuring to also supply some custom fields - Save the request - On the "Manage ILL request" page for the newly created request, select the "Edit request metadata" - On the resulting edit page: => TEST: Ensure all entered metadata is displayed - Add new values, remove values, change values, including custom fields - Click "Update" - On the resulting "Manage ILL request": => TEST: Ensure all metadata fields reflect their changed values - Repeat the editing and updating process until you're happy it works Signed-off-by: Barry Cannon <bc@interleaf.ie>
Created attachment 80010 [details] [review] Bug 20772: Add 'illrequestattributes.readonly' This patch adds a 'readonly' column to illrequestattributes. On a DB upgrade it also populates all existing rows with 1, indicating 'read only' Signed-off-by: Barry Cannon <bc@interleaf.ie>
Created attachment 80011 [details] [review] Bug 20772: Add 'illrequest.price_paid' This patch adds a 'price_paid' column to 'illrequests' Signed-off-by: Barry Cannon <bc@interleaf.ie>
Created attachment 80012 [details] [review] Bug 20772: DO NOT PUSH - Schema update Schema update for illrequestattributes.readonly Schema update for illrequests.price_paid Signed-off-by: Barry Cannon <bc@interleaf.ie>
Created attachment 80013 [details] [review] Bug 20772: Borrowernumber should be read only On the Manage Request page, borrowernumber should be read only, we do not want users modifying the destination user once a request is placed Signed-off-by: Barry Cannon <bc@interleaf.ie>
Created attachment 80014 [details] [review] Bug 20772: Fix malformed class name Supplier metadata elements have a dynamically formed class name, part of the name is formed from the metadata key, this breaks if the key has a space, so we replace spaces Signed-off-by: Barry Cannon <bc@interleaf.ie>
Created attachment 80015 [details] [review] Bug 20772: Return cost & price_paid in API Signed-off-by: Barry Cannon <bc@interleaf.ie>
Created attachment 80016 [details] [review] Bug 20772: Display and edit of price_paid Signed-off-by: Barry Cannon <bc@interleaf.ie>
Created attachment 80017 [details] [review] Bug 20772: Bug preventing backend JS execution We should be 'PROCESS'ing any backend JS, not 'INCLUDE'ing it Signed-off-by: Barry Cannon <bc@interleaf.ie>
Some first QA notes: - There are 2 database updates that add new columns. Can you please use AFTER/BEFORE column to make sure the sequence matches what we have in kohastructure.sql? - This here should be simplified to be picked up by translations: [% request.price_paid || "N/A" %]
Created attachment 80027 [details] [review] Bug 20772: Add 'illrequestattributes.readonly' This patch adds a 'readonly' column to illrequestattributes. On a DB upgrade it also populates all existing rows with 1, indicating 'read only' Signed-off-by: Barry Cannon <bc@interleaf.ie>
Created attachment 80028 [details] [review] Bug 20772: Add 'illrequest.price_paid' This patch adds a 'price_paid' column to 'illrequests' Signed-off-by: Barry Cannon <bc@interleaf.ie>
Created attachment 80029 [details] [review] Bug 20772: DO NOT PUSH - Schema update Schema update for illrequestattributes.readonly Schema update for illrequests.price_paid Signed-off-by: Barry Cannon <bc@interleaf.ie>
Created attachment 80030 [details] [review] Bug 20772: Borrowernumber should be read only On the Manage Request page, borrowernumber should be read only, we do not want users modifying the destination user once a request is placed Signed-off-by: Barry Cannon <bc@interleaf.ie>
Created attachment 80031 [details] [review] Bug 20772: Fix malformed class name Supplier metadata elements have a dynamically formed class name, part of the name is formed from the metadata key, this breaks if the key has a space, so we replace spaces Signed-off-by: Barry Cannon <bc@interleaf.ie>
Created attachment 80032 [details] [review] Bug 20772: Return cost & price_paid in API Signed-off-by: Barry Cannon <bc@interleaf.ie>
Created attachment 80033 [details] [review] Bug 20772: Display and edit of price_paid Signed-off-by: Barry Cannon <bc@interleaf.ie>
Created attachment 80034 [details] [review] Bug 20772: Bug preventing backend JS execution We should be 'PROCESS'ing any backend JS, not 'INCLUDE'ing it Signed-off-by: Barry Cannon <bc@interleaf.ie>
Created attachment 80035 [details] [review] Bug 20772: (follow-up) Fix DB updates and templates Carry out changes requested in commenbt #27
Created attachment 80036 [details] [review] Bug 20772: Add 'illrequestattributes.readonly' This patch adds a 'readonly' column to illrequestattributes. On a DB upgrade it also populates all existing rows with 1, indicating 'read only' Signed-off-by: Barry Cannon <bc@interleaf.ie> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 80037 [details] [review] Bug 20772: Add 'illrequest.price_paid' This patch adds a 'price_paid' column to 'illrequests' Signed-off-by: Barry Cannon <bc@interleaf.ie> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 80039 [details] [review] Bug 20772: DO NOT PUSH - Schema update Schema update for illrequestattributes.readonly Schema update for illrequests.price_paid Signed-off-by: Barry Cannon <bc@interleaf.ie> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 80041 [details] [review] Bug 20772: Borrowernumber should be read only On the Manage Request page, borrowernumber should be read only, we do not want users modifying the destination user once a request is placed Signed-off-by: Barry Cannon <bc@interleaf.ie> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 80042 [details] [review] Bug 20772: Fix malformed class name Supplier metadata elements have a dynamically formed class name, part of the name is formed from the metadata key, this breaks if the key has a space, so we replace spaces Signed-off-by: Barry Cannon <bc@interleaf.ie> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 80043 [details] [review] Bug 20772: Return cost & price_paid in API Signed-off-by: Barry Cannon <bc@interleaf.ie> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 80044 [details] [review] Bug 20772: Display and edit of price_paid Signed-off-by: Barry Cannon <bc@interleaf.ie> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 80045 [details] [review] Bug 20772: Bug preventing backend JS execution We should be 'PROCESS'ing any backend JS, not 'INCLUDE'ing it Signed-off-by: Barry Cannon <bc@interleaf.ie> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 80046 [details] [review] Bug 20772: (follow-up) Fix DB updates and templates Carry out changes requested in commenbt #27 Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
There is a known problem with the Type being empty when editing, this will be fixed in another bug report. This is the starting patch for now. We will add dependencies for others as we go. Note to Andrew: Please fix bug title and maybe text to go in the release notes to also mention the new price_paid field.
Created attachment 80051 [details] [review] Bug 20772: (QA follow-up) Add a missing html filter
Created attachment 80232 [details] [review] Bug 20772: (follow-up) Add unit test Add unit test for price_paid
I'm confused by the readonly attribute. How are we going to use it? (there's no reference on this patchset)
Created attachment 80566 [details] [review] Bug 20772: Add 'illrequestattributes.readonly' This patch adds a 'readonly' column to illrequestattributes. On a DB upgrade it also populates all existing rows with 1, indicating 'read only' Signed-off-by: Barry Cannon <bc@interleaf.ie> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 80567 [details] [review] Bug 20772: Add 'illrequest.price_paid' This patch adds a 'price_paid' column to 'illrequests' Signed-off-by: Barry Cannon <bc@interleaf.ie> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 80568 [details] [review] Bug 20772: Borrowernumber should be read only On the Manage Request page, borrowernumber should be read only, we do not want users modifying the destination user once a request is placed Signed-off-by: Barry Cannon <bc@interleaf.ie> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 80569 [details] [review] Bug 20772: Fix malformed class name Supplier metadata elements have a dynamically formed class name, part of the name is formed from the metadata key, this breaks if the key has a space, so we replace spaces Signed-off-by: Barry Cannon <bc@interleaf.ie> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 80570 [details] [review] Bug 20772: Return cost & price_paid in API Signed-off-by: Barry Cannon <bc@interleaf.ie> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 80571 [details] [review] Bug 20772: Display and edit of price_paid Signed-off-by: Barry Cannon <bc@interleaf.ie> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 80572 [details] [review] Bug 20772: Bug preventing backend JS execution We should be 'PROCESS'ing any backend JS, not 'INCLUDE'ing it Signed-off-by: Barry Cannon <bc@interleaf.ie> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 80573 [details] [review] Bug 20772: (follow-up) Fix DB updates and templates Carry out changes requested in commenbt #27 Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 80574 [details] [review] Bug 20772: (QA follow-up) Add a missing html filter Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 80575 [details] [review] Bug 20772: (follow-up) Add unit test Add unit test for price_paid Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 80576 [details] [review] Bug 20772: DBRev 18.06.00.041 Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 80577 [details] [review] Bug 20772: (QA follow-up) 'readonly' is a boolean Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Pushed for 18.11. Thanks all!
(In reply to Tomás Cohen Arazi from comment #49) > I'm confused by the readonly attribute. How are we going to use it? (there's > no reference on this patchset) The backends can use it to determine which fields can be edited and which cannot (is what I understood) :)
Enhancement, will not be backported to 18.05.x series.