Bug 12508

Summary: The removal of a contract which is linked to a basket does not display an error
Product: Koha Reporter: Yohann Dufour <yohann.dufour>
Component: AcquisitionsAssignee: Yohann Dufour <yohann.dufour>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: bgkriegel, jseppal, katrin.fischer, tomascohen
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 12487, 12493    
Bug Blocks:    
Attachments: Bug 12508: adding an error message if a contract cannot be removed
Bug 12508: adding an error message if a contract cannot be removed
[PASSED QA] Bug 12508: adding an error message if a contract cannot be removed
Bug 12508: Follow up - corrects capitalization

Description Yohann Dufour 2014-07-01 07:20:48 UTC
When we delete a contract which is linked to a basket, the removal is not done but no errors is displayed.
Comment 1 Yohann Dufour 2014-07-01 08:05:29 UTC Comment hidden (obsolete)
Comment 2 Juhani Seppälä 2014-07-02 06:37:12 UTC
Hi, I tested this first without the patch and confirmed the behaviour (usability issue). Trying to remove a contract pre-patch is pretty confusing, much clearer after this patch - I'm signing off.

On succesful contract removal: would it be against the guidelines to have a success message here (e.g. "contract removed succesfully")? Currently it's a bit vague.
Comment 3 Juhani Seppälä 2014-07-02 06:40:59 UTC Comment hidden (obsolete)
Comment 4 Bernardo Gonzalez Kriegel 2014-07-03 17:01:14 UTC
About to test, already signed. 
Status changed
Comment 5 Katrin Fischer 2014-07-06 16:47:33 UTC
Created attachment 29512 [details] [review]
[PASSED QA] Bug 12508: adding an error message if a contract cannot be removed

If a contract cannot be removed, no errors is displayed. Now, it displays an dialog messag error and the list of contracts.

Test plan:
1) Log on with a superlibrarian permission
2) Go on the page acqui/supplier.pl (Acquisitions > Button "New vendor")
3) Record a vendor with a nonzero "name"
4) Go on the page admin/aqcontract.pl (click on the "Contracts" item in the menu)
5) Click on the button "New" > "Contract" and record a new one
6) Click on "New" > "Basket" and record a basket by selectioning the created contract
7) Click on the contract name, then click on the "Contracts" item in the left menu
8) Try to delete this contract, an error is displayed : "Contract has not been deleted. Maybe a basket linked to this contract exists."
9) Delete the basket linked to the contract
10) Delete the contract, no errors is displayed

Signed-off-by: Juhani Seppälä <jseppal@student.uef.fi>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script an tests.
Also tested adding, editing and deleting unused contracts.
Comment 6 Katrin Fischer 2014-07-06 16:47:37 UTC
Created attachment 29513 [details] [review]
Bug 12508: Follow up - corrects capitalization

Corrects 2 strings:
- 'Delete this contract'
- 'Contract deleted'
Comment 7 Tomás Cohen Arazi 2014-07-10 14:15:37 UTC
Patch pushed to master.

Thanks Yohann!