MCBFF-192: [POC] Fix for Item Check-out issue when TLR exist for Item's Instance#1684
Open
mukhiddin-yusuf wants to merge 3 commits into
Open
MCBFF-192: [POC] Fix for Item Check-out issue when TLR exist for Item's Instance#1684mukhiddin-yusuf wants to merge 3 commits into
mukhiddin-yusuf wants to merge 3 commits into
Conversation
…t fulfillable by item
…t fulfillable by item
|
This file contains hidden or 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
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.



Purpose
Validation of the ECS Page TLR for the shared instance created through Mediated request with secure tenant and requester fails when trying to check-out an item from secure tenant the Item is associated with and when there's other ECS Hold Item Request for the different requester.
Root cause for the issue
it is described in the comment, but in short it is because of the failure to find the associated TLR Page request for the same requester the checkout is being performed by which is happening due to condition comparing the item's
instanceIdand request'sinstanceIdis not working.Here is some of the facts explaining why above mentioned condition is not working:
Primary,IntermediateandSecondarycreated requests store real instance ID ininstanceIdfieldPrimary,IntermediateandSecondaryrequestsitemIdfield stores same value, so no matter if it is Inventory Item's ID or Circulation Item's ID they are sameSecondaryrequest which is for data tenant stores real holding ID inholdingsRecordId,PrimaryandIntermediaterequests storefakeor DCB holding ID inholdingsRecordIdwhich is linked withfake/DCB instanceinstanceIdanditemIdand since check-out by barcode is performed with secure tenant fetching of requests would happen byitemIdas from the previous point we have fetched circulation item, so we are providing DCB 'instanceId', but in all requests we store realinstanceIdPrimary) where we have realinstanceIdand trying to compare it to DCBinstanceIdin conditionApproach
Since we are always fetching the requests by query matching either
itemIdorinstanceIdthe condition makes sense when checkout happens with item owning data tenant and checking against request created in that tenant (Secondaryin this case). In this case,Itemwe are dealing with would be real Inventory item and instance IDs would be same, in other cases we would be dealing withfakeor DCBItem. If this described observation is always true for ECS Requests and unless we do not want to introduce new changes, like some new field pointing to real Instance ID in fake holding or fake instance or change in that manner, then I thought it might be a fix or workaround to add one more check into that failing condition:&& !item.isDcbItem()TODOS and Open Questions
Learning
MCBFF-192