You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
User story
As a developer (ay6), I would like sprint client response to be handled in Limber to show correct and useful feedback for label printing using squix printers.
print_to_sprint method of PrintJob class does not handle the response code and body and returns success even if there are errors. The view always shows info about sending of print requests to the printer as success even though requests do not reach the printer or labels are not printed.
Who are the primary contacts for this story
kt17
ay6
as28
Who is the nominated tester for UAT
TBD
Acceptance criteria
To be considered successful the solution must allow:
response object returned by SPrintClient.send_print_request call is checked, for status and message body.
On failure, useful feedback is added for the view using errors.add and false is returned for PrintJobsController
Preferably, print job id in response from sprint is used for finding out the actual status of printing.
Dependencies
This story is blocked by the following dependencies:
#<issue_no.>
sanger/#<issue_no.>
References
This story has a non-blocking relationship with:
Both response.code and response.body must be checked
Example response, when template coordinates are floats instead of integers (sprint does not allow floats for x and y):
code: 200
body: {"errors":[{"message":"Variable 'printRequest' has an invalid value: Expected type 'Int' but was 'Double'.","locations":[{"line":1,"column":16}],"extensions":{"classification":"ValidationError"}}]}
Example response, template is broken and sprint cannot deserialize it.
code: 500
body: {"timestamp": "2023-08-02T14:46:30.160+00:00","status": 500,"error": "Internal Server Error","path": "/graphql"}
If sprint cannot log in to printer, the details are available in response body.
The following are required to be tested in UAT for this story.
For happy path,
SQPU-175923-K plate is a LBB Lib PCR-XP Norm plate used for HiC. Plate barcodes should be successfully printing for this plate.
Barcodes of the pool tubes associated with this plate should also be printing successfully.
SQPU-163898-N plate is a LBSN-96 Lysate plate used for Bioscan. Plate barcodes should be successfully printing for this plate.
This plate has additional plate information. Make sure they are correctly printed.
For unhappy path,
SPrint doesn't allow floats as x and y coordinates for the label template. Try changing config/sprint/label_templates/plate_96.yml.erb values to floats, and deploy from branch. Try to print out the plate barcodes of SQPU-175923-K. It should return an error response and the page should display it correctly. Please have a look at the tests written to assert this functionality.
Any other errors should be logged in the page with the error code.
Attached below is an image of a set of barcodes I have taken for a previous label printing test.
(The top row of this image displays a list of tube barcodes. The bottom row is a set of barcodes for a Lysate plate)
Note
Norm plate does not have additional information (e.g. PARTNER ID LABEL) as Lysate plates.
User story
As a developer (ay6), I would like sprint client response to be handled in Limber to show correct and useful feedback for label printing using squix printers.
print_to_sprint method of PrintJob class does not handle the response code and body and returns success even if there are errors. The view always shows info about sending of print requests to the printer as success even though requests do not reach the printer or labels are not printed.
Who are the primary contacts for this story
kt17
ay6
as28
Who is the nominated tester for UAT
TBD
Acceptance criteria
To be considered successful the solution must allow:
Dependencies
This story is blocked by the following dependencies:
References
This story has a non-blocking relationship with:
Additional context
If sprint cannot log in to printer, the details are available in response body.
See https://github.com/sanger/sprint/blob/master/how_to_add_printers.md for info about security and configuration.
A successful response has a 200 code and a job id in response body.
The text was updated successfully, but these errors were encountered: