[Bug 19926] New: Add the Koha::Object->unblessed_all_relateds method

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 19926] New: Add the Koha::Object->unblessed_all_relateds method

bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19926

            Bug ID: 19926
           Summary: Add the Koha::Object->unblessed_all_relateds method
 Change sponsored?: ---
           Product: Koha
           Version: unspecified
          Hardware: All
                OS: All
            Status: ASSIGNED
          Severity: enhancement
          Priority: P5 - low
         Component: Architecture, internals, and plumbing
          Assignee: [hidden email]
          Reporter: [hidden email]
        QA Contact: [hidden email]

In order to refactor our legacy code step-by-step, we will need to provide code
with the exact same behaviors and then improve it.

The same idea appears for the TT syntax for notices: we will want to deprecate
the existing syntax in order to support only one syntax. Currently we fetch all
the values from the related tables, without knowing which are actually used.

I am suggestion to introduce a Koha::Object->unblessed_all_relateds method
which will return a hash containing all the fields from the related tables
(with the problems we know: collision in column names).
It is the existing behavior of GetOverduesForPatron and GetPendingIssues for
instance, they are used to send notices and so we have to provide all the data
needed.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19926] Add the Koha::Object->unblessed_all_relateds method

bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19926

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |Needs Signoff

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19926] Add the Koha::Object->unblessed_all_relateds method

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19926

--- Comment #1 from Jonathan Druart <[hidden email]> ---
Created attachment 70327
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=70327&action=edit
Bug 19926: Add the Koha::Object->unblessed_all_relateds method

In order to refactor our legacy code step-by-step, we will need to
provide code with the exact same behaviors and then improve it.

The same idea appears for the TT syntax for notices: we will want to
deprecate the existing syntax in order to support only one syntax.
Currently we fetch all the values from the related tables, without
knowing which are actually used.

I am suggestion to introduce a Koha::Object->unblessed_all_relateds
method which will return a hash containing all the fields from the
related tables (with the problems we know: collision in column names).
It is the existing behavior of GetOverduesForPatron and GetPendingIssues
for instance, they are used to send notices and so we have to provide
all the data needed.

See dependent bugs to understand the context and test this patch.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19926] Add the Koha::Object->unblessed_all_relateds method

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19926

--- Comment #2 from Jonathan Druart <[hidden email]> ---
Created attachment 70328
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=70328&action=edit
Bug 19926: Add tests for Koha::Object->unblessed_all_relateds

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19926] Add the Koha::Object->unblessed_all_relateds method

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19926

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |17553


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17553
[Bug 17553] Move GetOverduesForPatron to Koha::Patron
--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19926] Add the Koha::Object->unblessed_all_relateds method

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19926

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |19935


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19935
[Bug 19935] Move C4::Members::GetPendingIssues to the Koha namespace
--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19926] Add the Koha::Object->unblessed_all_relateds method

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19926

Benjamin Rokseth <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #70327|0                           |1
        is obsolete|                            |

--- Comment #3 from Benjamin Rokseth <[hidden email]> ---
Created attachment 72764
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72764&action=edit
Bug 19926: Add the Koha::Object->unblessed_all_relateds method

In order to refactor our legacy code step-by-step, we will need to
provide code with the exact same behaviors and then improve it.

The same idea appears for the TT syntax for notices: we will want to
deprecate the existing syntax in order to support only one syntax.
Currently we fetch all the values from the related tables, without
knowing which are actually used.

I am suggestion to introduce a Koha::Object->unblessed_all_relateds
method which will return a hash containing all the fields from the
related tables (with the problems we know: collision in column names).
It is the existing behavior of GetOverduesForPatron and GetPendingIssues
for instance, they are used to send notices and so we have to provide
all the data needed.

See dependent bugs to understand the context and test this patch.

Signed-off-by: Benjamin Rokseth <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19926] Add the Koha::Object->unblessed_all_relateds method

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19926

Benjamin Rokseth <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #70328|0                           |1
        is obsolete|                            |

--- Comment #4 from Benjamin Rokseth <[hidden email]> ---
Created attachment 72765
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72765&action=edit
Bug 19926: Add tests for Koha::Object->unblessed_all_relateds

Signed-off-by: Benjamin Rokseth <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19926] Add the Koha::Object->unblessed_all_relateds method

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19926

Benjamin Rokseth <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]
                   |                            |o
             Status|Needs Signoff               |Signed Off

--- Comment #5 from Benjamin Rokseth <[hidden email]> ---
Great work Jo!

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19926] Add the Koha::Object->unblessed_all_relateds method

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19926

Josef Moravec <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]
         QA Contact|[hidden email]-communit |[hidden email]
                   |y.org                       |

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19926] Add the Koha::Object->unblessed_all_relateds method

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19926

Josef Moravec <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Signed Off                  |Passed QA

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19926] Add the Koha::Object->unblessed_all_relateds method

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19926

Josef Moravec <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #72764|0                           |1
        is obsolete|                            |
  Attachment #72765|0                           |1
        is obsolete|                            |

--- Comment #6 from Josef Moravec <[hidden email]> ---
Created attachment 73552
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73552&action=edit
Bug 19926: Add the Koha::Object->unblessed_all_relateds method

In order to refactor our legacy code step-by-step, we will need to
provide code with the exact same behaviors and then improve it.

The same idea appears for the TT syntax for notices: we will want to
deprecate the existing syntax in order to support only one syntax.
Currently we fetch all the values from the related tables, without
knowing which are actually used.

I am suggestion to introduce a Koha::Object->unblessed_all_relateds
method which will return a hash containing all the fields from the
related tables (with the problems we know: collision in column names).
It is the existing behavior of GetOverduesForPatron and GetPendingIssues
for instance, they are used to send notices and so we have to provide
all the data needed.

See dependent bugs to understand the context and test this patch.

Signed-off-by: Benjamin Rokseth <[hidden email]>

Signed-off-by: Josef Moravec <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19926] Add the Koha::Object->unblessed_all_relateds method

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19926

--- Comment #7 from Josef Moravec <[hidden email]> ---
Created attachment 73553
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73553&action=edit
Bug 19926: Add tests for Koha::Object->unblessed_all_relateds

Signed-off-by: Benjamin Rokseth <[hidden email]>

Signed-off-by: Josef Moravec <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19926] Add the Koha::Object->unblessed_all_relateds method

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19926

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Passed QA                   |Pushed to Master

--- Comment #8 from Jonathan Druart <[hidden email]> ---
Pushed to master for 18.05, thanks to everybody involved!

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19926] Add the Koha::Object->unblessed_all_relateds method

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19926

Nick Clemens <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Pushed to Master            |RESOLVED
         Resolution|---                         |FIXED
                 CC|                            |[hidden email]

--- Comment #9 from Nick Clemens <[hidden email]> ---
Enhancement, not backporting to 17.11.x

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/