Bug 13471 - When editing a subscription, the "subscription length type" disregards the stored value, also make SLT translateable.
Summary: When editing a subscription, the "subscription length type" disregards the st...
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Serials (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Olli-Antti Kivilahti
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-16 13:00 UTC by Olli-Antti Kivilahti
Modified: 2023-07-28 20:38 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 13471 - When editing a subscription, the "subscription length type" disregards the stored value, also make SLT translateable. (5.63 KB, patch)
2014-12-16 13:04 UTC, Olli-Antti Kivilahti
Details | Diff | Splinter Review
Bug 13471 - When editing a subscription, the "subscription length type" disregards the stored value, also make SLT translateable. (5.77 KB, patch)
2014-12-16 13:19 UTC, Olli-Antti Kivilahti
Details | Diff | Splinter Review
Bug 13471 - When editing a subscription, the "subscription length type" disregards the stored value, also make SLT translateable. (7.33 KB, patch)
2014-12-18 06:32 UTC, Olli-Antti Kivilahti
Details | Diff | Splinter Review
Bug 13471 - When editing a subscription, the "subscription length type" disregards the stored value, also make SLT translateable. (9.03 KB, patch)
2014-12-23 09:30 UTC, Olli-Antti Kivilahti
Details | Diff | Splinter Review
Bug 13471 - When editing a subscription, the "subscription length type" disregards the stored value, also make SLT translateable. (9.11 KB, patch)
2014-12-28 22:04 UTC, Aleisha Amohia
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Olli-Antti Kivilahti 2014-12-16 13:00:10 UTC
This issue causes loss of data when the subscription length type (SLT) is other than issues.

TO REPLICATE:

We make an subscription with SLT of months = 12.
Later make an arbitrary edit to the subscription, and miss out the fact that the SLT selection is set to issues.
Save the changes.
Serial subscription end date is set to 12 issues since the start date, instead of 12 months which it used to be. This causes a myriad of issues :=)

AFTER THIS PATCH:

SLT defaults to the value initially saved instead of always being issues.
Now the selection can be translated!
Comment 1 Olli-Antti Kivilahti 2014-12-16 13:04:51 UTC Comment hidden (obsolete)
Comment 2 Olli-Antti Kivilahti 2014-12-16 13:19:55 UTC Comment hidden (obsolete)
Comment 3 Olli-Antti Kivilahti 2014-12-18 06:32:25 UTC Comment hidden (obsolete)
Comment 4 Olli-Antti Kivilahti 2014-12-23 09:30:17 UTC Comment hidden (obsolete)
Comment 5 Aleisha Amohia 2014-12-28 22:04:03 UTC
Created attachment 34765 [details] [review]
Bug 13471 - When editing a subscription, the "subscription length type" disregards the stored value, also make SLT translateable.

This issue causes loss of data when the subscription length type (SLT) is other than issues.

TO REPLICATE:

We make an subscription with SLT of months = 12.
Later make an arbitrary edit to the subscription, and miss out the fact that the SLT selection is set to issues.
Save the changes.
Serial subscription end date is set to 12 issues since the start date, instead of 12 months which it used to be.
This causes a myriad of issues :=)

AFTER THIS PATCH:

SLT defaults to the value initially saved instead of always being issues.
Now the selection can be translated!

HOTFIX 1: Added <span> elements to showSubscriptionLengthType.inc so the translation tool can catch them.

HOTFIX 2: Fixed serials/showpredictionpattern.pl to use the db columns instead of issues,weeks,months.

HOTFIX 3: Fixed serials/subscription-numberpatterns.pl to use the db columns instead of issues,weeks,months.

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Comment 6 Katrin Fischer 2015-01-04 23:11:11 UTC
Hi Olli-Antti,

the problem in the bug description is a real one, but I am uncomfortable with the number of changes in this patch. The more changes, the more suspicious I get!

I see like 3 different bugs here:

1) Translation problem, introduction of a new include
- I think the include should be in the includes directory, starting with serials-... to match the existing includes.
  Pleaes fix.

2) STL is not saved correctly.
- Problem seems to be fixed by this patch, but I want to test more for side effects of the variable changes after a follow-up.

3) Changes to serials/subscription-numberpatterns.pl/tt
- I don't understand why those have been made - maybe it's too late tonight.
  Please include an explanation and amend test plan.
Comment 7 Katrin Fischer 2015-04-28 11:21:32 UTC
> We make an subscription with SLT of months = 12.
> Later make an arbitrary edit to the subscription, and miss out the fact that
> the SLT selection is set to issues.
> Save the changes.
> Serial subscription end date is set to 12 issues since the start date,
> instead of 12 months which it used to be. This causes a myriad of issues :=)
> 
> AFTER THIS PATCH:
> 
> SLT defaults to the value initially saved instead of always being issues.
> Now the selection can be translated!

This has been fixed by bug 14022 now - as this patch includes some more changes, I am not closing it yet.
Comment 8 Katrin Fischer 2023-07-28 20:38:26 UTC
(In reply to Olli-Antti Kivilahti from comment #0)
> This issue causes loss of data when the subscription length type (SLT) is
> other than issues.
> 
> TO REPLICATE:
> 
> We make an subscription with SLT of months = 12.
> Later make an arbitrary edit to the subscription, and miss out the fact that
> the SLT selection is set to issues.
> Save the changes.
> Serial subscription end date is set to 12 issues since the start date,
> instead of 12 months which it used to be. This causes a myriad of issues :=)
> 
> AFTER THIS PATCH:
> 
> SLT defaults to the value initially saved instead of always being issues.
> Now the selection can be translated!

I just re-tested ths and the subscription length settings remain unchanged when editing a subscription now.