cern-sis / issues-inspire

0 stars 0 forks source link

Claiming already claimed papers causes an error #466

Closed michamos closed 2 weeks ago

michamos commented 2 months ago

From a [user ticket](https://cern.service-now.com/nav_to.do?uri=%2Fu_request_fulfillment.do%3Fsys_id%3D54956026c3718210a4b6f12d050131f0%26sysparm_record_target%3Dtask%26sysparm_record_row%3D1%26sysparm_record_rows%3D8%26sysparm_record_list%3Dassignment_group%3Djavascript:Groups.getMySupportGroups()%5Eassigned_toISEMPTY%5Eactive%3Dtrue%5EstateNOT%2BIN4,3,7,6%5Esys_class_name%3Dincident%5EORsys_class_name%3Du_request_fulfillment%5EORsys_class_name%3Dchange_request%5EORsys_class_name%3Dwm_task%5EORsys_class_name%3Dchange_task%5EORsys_class_name%3Dproblem%5Eu_functional_category%3Db95a643e87b82510eb3b33390cbb354b%5EORDERBYDESCsys_created_on%5EORDERBYsys_id)

When claiming a paper from the literature record, we're not correctly handling the case where the paper is already claimed to the author profile. Instead of an error message, we should display a friendly warning: "This paper is already claimed to your profile."

karolina-siemieniuk-morawska commented 1 month ago

Underlying cause: we return a Success message with no ticket in case the claim went through automatically, which the UI is not checking for. UI assumes a ticket must be created, but on the backend the claim goes through automatically, which should be a success not an error.