Quantcast

[Bug 17944] New: Remove the sql code from onboarding and administrative perl scripts, and remove unnecessary use pragmas from onboarding.pl

classic Classic list List threaded Threaded
62 messages Options
123
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 17944] New: Remove the sql code from onboarding and administrative perl scripts, and remove unnecessary use pragmas from onboarding.pl

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

            Bug ID: 17944
           Summary: Remove the sql code from onboarding and administrative
                    perl scripts, and remove unnecessary use pragmas from
                    onboarding.pl
 Change sponsored?: ---
           Product: Koha
           Version: 17.05
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P5 - low
         Component: Installation and upgrade (web-based installer)
          Assignee: [hidden email]
          Reporter: [hidden email]
        QA Contact: [hidden email]
                CC: [hidden email]
        Depends on: 17855

After the bug 17855 is signed off then writing a patch for this bug can start.

The aim of this bug is to remove all sql code from onboarding.pl,
smart-rules.pl and itemtypes.pl scripts.

Additionally all unnecessary use pragmas in the onboarding.pl script will be
removed.

This will make all three of the aforementioned perl scripts meet the Koha
coding guidelines.


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17855
[Bug 17855] Updated Koha web installer and new onboarding tool feature to guide
users through setting up Koha
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
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
|  
Report Content as Inappropriate

[Bug 17944] Remove the sql code from onboarding and administrative perl scripts, and remove unnecessary use pragmas from onboarding.pl

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

Alex Buckley <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|[hidden email]-commun |[hidden email]
                   |ity.org                     |

--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
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
|  
Report Content as Inappropriate

[Bug 17944] Remove the sql code from onboarding and administrative perl scripts, and remove unnecessary use pragmas from onboarding.pl

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

Alex Buckley <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

--
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
|  
Report Content as Inappropriate

[Bug 17944] Remove the sql code from onboarding and administrative perl scripts, and remove unnecessary use pragmas from onboarding.pl

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

M. Tompsett <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #1 from M. Tompsett <[hidden email]> ---
Start with onboarding in this bug.
Put smart rules and itemtypes in separate bugs.
Smaller bugs get QA'd faster.
Link them in the see alsos.

--
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
|  
Report Content as Inappropriate

[Bug 17944] Remove the sql code from itemtypes.pl administrative perl script

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

Alex Buckley <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Remove the sql code from    |Remove the sql code from
                   |onboarding and              |itemtypes.pl administrative
                   |administrative perl         |perl script
                   |scripts, and remove         |
                   |unnecessary use pragmas     |
                   |from onboarding.pl          |

--
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
|  
Report Content as Inappropriate

[Bug 17944] Remove the sql code from itemtypes.pl administrative perl script

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

--- Comment #2 from Alex Buckley <[hidden email]> ---
Created attachment 59391
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59391&action=edit
Bug 17944 - Moved the sql code from itemtypes.pl into Koha/ItemTypes.pm

--
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
|  
Report Content as Inappropriate

[Bug 17944] Remove the sql code from itemtypes.pl administrative perl script

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

Alex Buckley <[hidden email]> changed:

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

--- Comment #3 from Alex Buckley <[hidden email]> ---
Test plan:
1. View the admin/itemtypes.pl script and confirm that sql code is written in
this file

2. Apply this patch

3. View admin/itemtypes.pl script notice the sql code has been removed and
replaced with the perl module call (on line 142):
 my $total = Koha::ItemTypes->check_items_and_biblioitems($itemtype_code);


4. View Koha/ItemTypes.pm and observe the subroutine
check_items_and_biblioitems
(This subroutine contains the sql code that was in itemtypes.pl)

5. Now to check that the deletion of an item type still works with the sql code
moved out of the itemtypes.pl script, log into the Koha staff interface

6. Visit Administration->Item type. Select the 'Delete' button next to an item
type

7. Select the 'Yes, delete this item type' button

8. Observe the message informing you the item type has been deleted. Thus the
patch works as intended.

Note: as I understand it placing the sql code into a perl module in the Koha
directory is acceptable, because sql code exists in the perl modules in the C4
directory. Please advise me if this isn't the case and I will move this code
again.

--
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
|  
Report Content as Inappropriate

[Bug 17944] Remove the sql code from itemtypes.pl administrative perl script

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

Alex Buckley <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://bugs.koha-community
                   |                            |.org/bugzilla3/show_bug.cgi
                   |                            |?id=17954

--
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
|  
Report Content as Inappropriate

[Bug 17944] Remove the sql code from itemtypes.pl administrative perl script

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

Alex Buckley <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://bugs.koha-community
                   |                            |.org/bugzilla3/show_bug.cgi
                   |                            |?id=17955

--
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
|  
Report Content as Inappropriate

[Bug 17944] Remove the sql code from itemtypes.pl administrative perl script

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

--- Comment #4 from M. Tompsett <[hidden email]> ---
Comment on attachment 59391
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59391
Bug 17944 - Moved the sql code from itemtypes.pl into Koha/ItemTypes.pm

Review of attachment 59391:
 --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=17944&attachment=59391)
-----------------------------------------------------------------

::: Koha/ItemTypes.pm
@@ +53,5 @@
> +        ) AS tmp
> +        WHERE tmp.t=?
> +        ', {}, $itemtype_code );
> +    return $total;
> +}

While not an easy thing, I don't even know how to do it off the top of my head,
consider reworking in DBIx.

Also, wouldn't this partially double count? Don't worry, this is a pre-existing
issue.

--
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
|  
Report Content as Inappropriate

[Bug 17944] Remove the sql code from itemtypes.pl administrative perl script

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

--- Comment #5 from Alex Buckley <[hidden email]> ---
Created attachment 59564
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59564&action=edit
Bug 17944 - Removed the sql code from Itemtypes.pm and replaced it with DBIx
database query in the itemtypes.pl administrative script

Test plan:
1. In the staff interface, stage and manage MARC records for import

2. Try to delete an itemtype. If there are items of that itemtype in the
database then a message telling you the number of items of that itemtype
there are will be displayed.

3. Record that number

4. View the admin/itemtpes.pl script and confirm that there is sql code
written in this file.

5. Apply this patch

6. View the admin/itemtypes.pl script and observe that there is no sql in
this file. There is however DBIx code, for example
$schema->resultset('Item')->search({ 'itype' => $itemtype_code} ); which
is searching for items with the itype value matching $itemtype_code
value.

7. In the staff interface try to delete the same itemtype

8. Record the number of items there are with that itemtype in the
resulting message

9. The numbers recorded in steps 3 and 8 should match showing that the
DBIx code is working as intended

--
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
|  
Report Content as Inappropriate

[Bug 17944] Remove the sql code from itemtypes.pl administrative perl script

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

--- Comment #6 from Alex Buckley <[hidden email]> ---
(in reply to comment 4 by M.tompsett)

I have tried to implement DBIx in the itemtypes.pl script.

To get it working successfully I had to implement two DBIx queries, one to
search the items and another to search the biblioitems for the itemtype being
attempted to be deleted.

Then I add the number of retrieved items together.

I tried to implement the entire original sql query into the equivalent singular
DBIx query however I could not get a successful search of both items and
biblioitems.

--
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
|  
Report Content as Inappropriate

[Bug 17944] Remove the sql code from itemtypes.pl administrative perl script

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

--- Comment #7 from M. Tompsett <[hidden email]> ---
Comment on attachment 59564
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59564
Bug 17944 - Removed the sql code from Itemtypes.pm and replaced it with DBIx
database query in the itemtypes.pl administrative script

Review of attachment 59564:
 --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=17944&attachment=59564)
-----------------------------------------------------------------

::: admin/itemtypes.pl
@@ +145,5 @@
> +    my $itemtotal = $schema->resultset('Item')->search({ 'itype' => $itemtype_code} );
> +    my $bibliototal = $schema->resultset('Biblioitem')->search({ 'itemtype' => $itemtype_code} );
> +
> +    $itemtotal->count;
> +    $bibliototal->count;

Why?

@@ +146,5 @@
> +    my $bibliototal = $schema->resultset('Biblioitem')->search({ 'itemtype' => $itemtype_code} );
> +
> +    $itemtotal->count;
> +    $bibliototal->count;
> +    my $overalltotal = $itemtotal + $bibliototal;

I like the idea, but this segment of code is not quite right.

Why the context line?
why not my $foo = $schema->resulset('Bar')->search({ 'foobar' => $itemtypecode
})->count // 0; with the appropriate variables and tables changed?

--
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
|  
Report Content as Inappropriate

[Bug 17944] Remove the sql code from itemtypes.pl administrative perl script

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

M. Tompsett <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Needs Signoff               |In Discussion

--
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
|  
Report Content as Inappropriate

[Bug 17944] Remove the sql code from itemtypes.pl administrative perl script

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

--- Comment #8 from Alex Buckley <[hidden email]> ---
I'll try implementing that now.

--
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
|  
Report Content as Inappropriate

[Bug 17944] Remove the sql code from itemtypes.pl administrative perl script

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

--- Comment #9 from Alex Buckley <[hidden email]> ---
So before I attach the new commit just to check would you be happy with this?

 my $schema = Koha::Database->new()->schema();
 my $itemtotal = $schema->resultset('Item')->search({ 'itype' =>
$itemtype_code})->count;
 my $bibliototal = $schema->resultset('Biblioitem')->search({ 'itemtype' =>
$itemtype_code})->count;

 my $overalltotal = $itemtotal + $bibliototal;

 if ($overalltotal) {
      push @messages, { type => 'error', code => 'cannot_be_deleted', total =>
$overalltotal };
      $op = 'list';
 } else {
      my $itemtype = Koha::ItemTypes->find($itemtype_code);
      $template->param( itemtype => $itemtype, );
}  

I have tested it and it outputs the correct value

--
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
|  
Report Content as Inappropriate

[Bug 17944] Remove the sql code from itemtypes.pl administrative perl script

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

--- Comment #10 from M. Tompsett <[hidden email]> ---
(In reply to Alex Buckley from comment #9)
> So before I attach the new commit just to check would you be happy with this?

Yes, and it is prettier. Thank you. :)

--
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
|  
Report Content as Inappropriate

[Bug 17944] Remove the sql code from itemtypes.pl administrative perl script

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

--- Comment #11 from Alex Buckley <[hidden email]> ---
Created attachment 59565
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59565&action=edit
Bug 17944 - Tidied the DBIx code in itemtypes.pl

--
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
|  
Report Content as Inappropriate

[Bug 17944] Remove the sql code from itemtypes.pl administrative perl script

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

Alex Buckley <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|In Discussion               |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
|  
Report Content as Inappropriate

[Bug 17944] Remove the sql code from itemtypes.pl administrative perl script

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

Owen Leonard <[hidden email]> changed:

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

--- Comment #12 from Owen Leonard <[hidden email]> ---
Created attachment 59655
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59655&action=edit
[SIGNED-OFF] Bug 17944 - Moved the sql code from itemtypes.pl into
Koha/ItemTypes.pm

Signed-off-by: Owen Leonard <[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
|  
Report Content as Inappropriate

[Bug 17944] Remove the sql code from itemtypes.pl administrative perl script

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

Owen Leonard <[hidden email]> changed:

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

--- Comment #13 from Owen Leonard <[hidden email]> ---
Created attachment 59656
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59656&action=edit
[SIGNED-OFF] Bug 17944 - Removed the sql code from Itemtypes.pm

Removed the sql code from Itemtypes.pm and replaced  it with DBIx
database query in the itemtypes.pl administrative script

Test plan:
1. In the staff interface, stage and manage MARC records for import

2. Try to delete an itemtype. If there are items of that itemtype in the
   database then a message telling you the number of items of that
   itemtype there are will be displayed.

3. Record that number

4. View the admin/itemtpes.pl script and confirm that there is sql code
   written in this file.

5. Apply this patch

6. View the admin/itemtypes.pl script and observe that there is no sql
   in this file. There is however DBIx code, for example
   $schema->resultset('Item')->search({ 'itype' => $itemtype_code} );
   which is searching for items with the itype value matching
   $itemtype_code value.

7. In the staff interface try to delete the same itemtype

8. Record the number of items there are with that itemtype in the
   resulting message

9. The numbers recorded in steps 3 and 8 should match showing that the
   DBIx code is working as intended

Signed-off-by: Owen Leonard <[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
|  
Report Content as Inappropriate

[Bug 17944] Remove the sql code from itemtypes.pl administrative perl script

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

Owen Leonard <[hidden email]> changed:

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

--- Comment #14 from Owen Leonard <[hidden email]> ---
Created attachment 59657
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59657&action=edit
[SIGNED-OFF] Bug 17944 - Tidied the DBIx code in itemtypes.pl

Signed-off-by: Owen Leonard <[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
|  
Report Content as Inappropriate

[Bug 17944] Remove the sql code from itemtypes.pl administrative perl script

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

Owen Leonard <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Needs Signoff               |Signed Off

--
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
|  
Report Content as Inappropriate

[Bug 17944] Remove the sql code from itemtypes.pl administrative perl script

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

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]-c
                   |                            |ommunity.org

--- Comment #15 from Jonathan Druart <[hidden email]> ---
Can I suggest to create a method in Koha::ItemType (something like ->is_used),
which would return Koha::Items->search({ itype => $itemtype_code })->count +
Koha::Biblioitems->search({ itemtype => $itemtype_code })->count

That way we could provide tests for this change.

--
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
|  
Report Content as Inappropriate

[Bug 17944] Remove the sql code from itemtypes.pl administrative perl script

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

--- Comment #16 from Alex Buckley <[hidden email]> ---
Created attachment 59715
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59715&action=edit
Bug 17944 - Moved the DBIx code into the ItemType.pm file

--
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
|  
Report Content as Inappropriate

[Bug 17944] Remove the sql code from itemtypes.pl administrative perl script

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

Alex Buckley <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Signed Off                  |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
|  
Report Content as Inappropriate

[Bug 17944] Remove the sql code from itemtypes.pl administrative perl script

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

--- Comment #17 from M. Tompsett <[hidden email]> ---
Comment on attachment 59715
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59715
Bug 17944 - Moved the DBIx code into the ItemType.pm file

Review of attachment 59715:
 --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=17944&attachment=59715)
-----------------------------------------------------------------

::: admin/itemtypes.pl
@@ +140,4 @@
>  
>   } elsif ( $op eq 'delete_confirm' ) {
>  
> +    my $overalltotal = Koha::ItemType->get_items_and_biblioitems($itemtype_code);

This is what was asked for in comment #15.

@@ +151,4 @@
>  
>  } elsif ( $op eq 'delete_confirmed' ) {
>  
> +    my $itemtype = Koha::ItemType->get_items_and_biblioitems($itemtype_code);

This change confuses me.

--
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
|  
Report Content as Inappropriate

[Bug 17944] Remove the sql code from itemtypes.pl administrative perl script

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

M. Tompsett <[hidden email]> changed:

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

--
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
|  
Report Content as Inappropriate

[Bug 17944] Remove the sql code from itemtypes.pl administrative perl script

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

--- Comment #18 from Alex Buckley <[hidden email]> ---
Created attachment 59716
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59716&action=edit
Bug 17955 - removed incorrect function call

--
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
|  
Report Content as Inappropriate

[Bug 17944] Remove the sql code from itemtypes.pl administrative perl script

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

Alex Buckley <[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/
123
Loading...