Skip to content

Commit

Permalink
Merge 57534c9 into 9dad761
Browse files Browse the repository at this point in the history
  • Loading branch information
pronguen committed Jun 24, 2020
2 parents 9dad761 + 57534c9 commit 254464c
Showing 1 changed file with 11 additions and 43 deletions.
54 changes: 11 additions & 43 deletions doc/circulation/actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@
1. :100: __ADD_REQUEST_4__: item in_transit (IN_TRANSIT_FOR_PICKUP)
1. __ADD_REQUEST_4_1__: request patron = current loan patron → request denied
1. __ADD_REQUEST_4_2__: request patron != current loan patron → (add loan PENDING)
1. :100: __ADD_REQUEST_5__: item in_transit (IN_TRANSIT_TO_HOUSE)
1. __ADD_REQUEST_5_1__: PENDING loan does not exist → (add loan PENDING)
1. PENDING loan exists
1. __ADD_REQUEST_5_2_1__: request patron = current loan patron → request denied
1. __ADD_REQUEST_5_2_2__: request patron != current loan patron → (add loan PENDING)
1. :100: __ADD_REQUEST_5__: item in_transit (IN_TRANSIT_TO_HOUSE) → (add loan IN_TRANSIT_FOR_PICKUP, item is: in_transit) [cancel previous loan]

## Checkout form

Expand All @@ -42,11 +38,7 @@
1. __CHECKOUT_4__: item in_transit (IN_TRANSIT_FOR_PICKUP)
1. __CHECKOUT_4_1__: checkout patron = patron of current loan → (add loan ITEM_ON_LOAN) [automatic receive]
1. __CHECKOUT_4_2__: checkout patron != patron of current loan → checkout denied
1. __CHECKOUT_5__: item in_transit (IN_TRANSIT_TO_HOUSE)
1. __CHECKOUT_5_1__: PENDING loan does not exist → (add loan ITEM_ON_LOAN) [cancel previous loan]
1. PENDING loan exists
1. __CHECKOUT_5_2_1__: checkout patron = patron of first PENDING loan → (add loan ITEM_ON_LOAN) [cancel previous loan]
1. __CHECKOUT_5_2_2__: checkout patron != patron of first PENDING loan → checkout denied
1. __CHECKOUT_5__: item in_transit (IN_TRANSIT_TO_HOUSE) → (add loan ITEM_ON_LOAN, item is: on_loan) [cancel previous loan]

## Checkin form

Expand All @@ -73,16 +65,8 @@
1. :white_check_mark: :white_check_mark: :white_check_mark: __CHECKIN_4_1__: pickup location = transaction library → (delivery_receive current loan, item is: at_desk(ITEM_AT_DESK))
1. __CHECKIN_4_2__: pickup location != transaction library → (no action, item is: in_transit (IN_TRANSIT_FOR_PICKUP)) *Future: would be useful to track that an intermediary checkin has been made*
1. __CHECKIN_5__: item in_transit (IN_TRANSIT_TO_HOUSE)
1. PENDING loan does not exist
1. :white_check_mark: :white_check_mark: :white_check_mark: __CHECKIN_5_1_1__: item location = transaction library → (house_receive current loan, item is: on_shelf)
1. :white_check_mark: __CHECKIN_5_1_2__: item location != transaction library → (no action, item is: in_transit (IN_TRANSIT_TO_HOUSE)) *Future: would be useful to track that an intermediary checkin has been made*
1. PENDING loan exists
1. pickup location of first PENDING loan = transaction library
1. __CHECKIN_5_2_1_1__: pickup location of first PENDING loan = item library → (house_receive current loan, item is: at_desk(ITEM_AT_DESK))[automatic validate first PENDING loan]
1. __CHECKIN_5_2_1_2__: pickup location of first PENDING loan != item library → (cancel current loan, item is: at_desk(ITEM_AT_DESK))[automatic validate first PENDING loan] *It is the case if the first PENDING loan has been deleted or unpriorised since last checkin*
1. pickup location of first PENDING loan != transaction library
1. :white_check_mark: __CHECKIN_5_2_2_1__: pickup location of first PENDING loan = item library → (no action, item is: in_transit (IN_TRANSIT_TO_HOUSE)) *Future: would be useful to track that an intermediary checkin has been made*
1. __CHECKIN_5_2_2_2__: pickup location of first PENDING loan != item library → (checkin current loan, item is: in_transit (IN_TRANSIT_FOR_PICKUP))[automatic cancel current loan, automatic validate first PENDING loan] *It is the case if the first PENDING loan has been deleted or unpriorised since last checkin*
1. :white_check_mark: :white_check_mark: :white_check_mark: __CHECKIN_5_1__: item location = transaction library → (house_receive current loan, item is: on_shelf)
1. :white_check_mark: __CHECKIN_5_2__: item location != transaction library → (no action, item is: in_transit (IN_TRANSIT_TO_HOUSE)) *Future: would be useful to track that an intermediary checkin has been made*

## Manual validate

Expand Down Expand Up @@ -120,14 +104,11 @@
1. __CANCEL_REQUEST_4_1_1__: PENDING loan does not exist → (cancel loan?, item is: in_transit (IN_TRANSIT_TO_HOUSE)) *[FIND A SOLUTION]*
1. __CANCEL_REQUEST_4_1_2__: PENDING loan exists → (cancel loan, item is: in_transit (IN_TRANSIT_FOR_PICKUP))[automatic validate next PENDING loan]
1. __CANCEL_REQUEST_4_2__: loan to cancel != current loan → (cancel loan, item is: in_transit (IN_TRANSIT_FOR_PICKUP))
1. __CANCEL_REQUEST_5__: item in_transit (IN_TRANSIT_TO_HOUSE)
1. :white_check_mark: __CANCEL_REQUEST_5_1__: loan to cancel = current loan → (cancel loan, item is: in_transit (IN_TRANSIT_TO_HOUSE))
1. loan to cancel = 1st pending loan
1. __CANCEL_REQUEST_5_2_1__: pickup location of 2nd pending loan = item library → (cancel loan, item is: in_transit (IN_TRANSIT_TO_HOUSE))
1. __CANCEL_REQUEST_5_2_2__: pickup location of 2nd pending loan != item library → (cancel loan, item is: in_transit (IN_TRANSIT_FOR_PICKUP))[automatic validate 2nd pending loan]
1. __CANCEL_REQUEST_5_3__: loan to cancel != (current loan OR 1rst pending loan) → (cancel loan)
1. __CANCEL_REQUEST_5__: item in_transit (IN_TRANSIT_TO_HOUSE) → (cancel loan) *Note: this action is not possible through UI. A loan is cancelled when there is a checkout or a request, so the item status is set according to the new checkout or request.*

## Update request (ie. update loan)

## Change request pickup location
### Change request pickup location

1. __CHANGE_PICKUP_LOCATION_1__: item on_shelf (no current loan)
1. __CHANGE_PICKUP_LOCATION_1_1__: PENDING loan does not exist → (change not possible)
Expand All @@ -139,12 +120,9 @@
1. __CHANGE_PICKUP_LOCATION_3_1__: loan to change = current loan → (change not possible)
1. __CHANGE_PICKUP_LOCATION_3_2__: loan to change != current loan → (change possible)
1. __CHANGE_PICKUP_LOCATION_4__: item in_transit (IN_TRANSIT_FOR_PICKUP) → (change possible)
1. __CHANGE_PICKUP_LOCATION_5__: item in_transit (IN_TRANSIT_TO_HOUSE)
1. __CHANGE_PICKUP_LOCATION_5_1__: loan to change = current loan → (change not possible)
1. __CHANGE_PICKUP_LOCATION_5_2__: loan to change = 1st pending loan → (change loan, item is: in_transit (IN_TRANSIT_FOR_PICKUP))[automatic cancel current loan, automatic validate 1st pending loan]
1. __CHANGE_PICKUP_LOCATION_5_3__: loan to change != (current loan OR 1rst pending loan) → (change loan)
1. __CHANGE_PICKUP_LOCATION_5__: item in_transit (IN_TRANSIT_TO_HOUSE) → (change not possible)

## Move request to first priority
### Move request to first priority

1. __REQUEST_TO_FIRST_RANK_1__: item on_shelf (no current loan)
1. __REQUEST_TO_FIRST_RANK_1_1__: 1 or 0 PENDING loan exists → (move not possible)
Expand All @@ -158,22 +136,12 @@
1. __REQUEST_TO_FIRST_RANK_4__: item in_transit (IN_TRANSIT_FOR_PICKUP)
1. __REQUEST_TO_FIRST_RANK_4_1__: 1 or 0 PENDING loan exists (additionally to current loan) → (move not possible)
1. __REQUEST_TO_FIRST_RANK_4_2__: More than 1 PENDING loans exist → (move loan to 1st PENDING) *Future option: make possible to move before current loan*
1. __REQUEST_TO_FIRST_RANK_5__: item in_transit (IN_TRANSIT_TO_HOUSE)
1. __REQUEST_TO_FIRST_RANK_5_1__: 1 or 0 PENDING loan exists (additionally to current loan) → (move not possible)
1. More than 1 PENDING loans exist
1. __REQUEST_TO_FIRST_RANK_5_2_1__: pickup location of PENDING loan to move = item library → (move loan to 1st PENDING, item is: in_transit (IN_TRANSIT_TO_HOUSE))
1. __REQUEST_TO_FIRST_RANK_5_2_2__: pickup location of PENDING loan to move != item library → (move loan to 1st PENDING, item is: in_transit (IN_TRANSIT_FOR_PICKUP))[automatic cancel current loan]
1. __REQUEST_TO_FIRST_RANK_5__: item in_transit (IN_TRANSIT_TO_HOUSE) → (move not possible)

# TODO

* evaluate if we need to extend invenio-circulation or do it in RERO ILS
* is item status always determined by loans in state charts or can we set it abitrary
* NPR: important simplifications are possible if an item with pending loan is always IN_TRANSIT_FOR_PICKUP, instead of being sometimes IN_TRANSIT_TO_HOUSE:
* __CHECKIN_5__: point 2 of "Checkin"
* __CANCEL_REQUEST_5__: point 2.2 of "Cancel request"
* __REQUEST_TO_FIRST_RANK_5__: point 2.2 of "Move request to first priority"
* __ADD_REQUEST_5__: point 1 of "Add a request"
* __CHANGE_PICKUP_LOCATION_5__: point 5 of "Change request pickup location"

# NOTES

Expand Down

0 comments on commit 254464c

Please sign in to comment.