Bugzilla – Attachment 68110 Details for
Bug 18002
Aquisitions onboarding tool - to help users set up acquisitions the first time
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18002: Followup - Changes based on test feedback
Bug-18002-Followup---Changes-based-on-test-feedbac.patch (text/plain), 16.28 KB, created by
Charles Farmer
on 2017-10-13 20:45:28 UTC
(
hide
)
Description:
Bug 18002: Followup - Changes based on test feedback
Filename:
MIME Type:
Creator:
Charles Farmer
Created:
2017-10-13 20:45:28 UTC
Size:
16.28 KB
patch
obsolete
>From 7e515d79b93d17aae74d5ce2fbd8b081b44ab60b Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Fri, 18 Aug 2017 11:37:24 +0000 >Subject: [PATCH] Bug 18002: Followup - Changes based on test feedback > >In this patch the following changes have been made based on test >feedback: > >* Added POD to GetHighestBudgetPeriod >* Removed unconditional warns in Budgets.pm >* Fixed typos and uncommented hint and date field >* Changed manual link > >Made the acquisition onboarding tool less visible in the right hand side >of the screen rather than in the middle obscuring the rest of the >acquisition home page > >Implemented conditional so this tool is only displayed when the user >is superlibrarian > >Test plan: >1. Restart memcached: sudo service memcached restart > >2. Drop and recreate the database > >3. Go through the web installer selecting all data values (except the >basic currencies) > >4. After the web installer is finished log into the staff interface >using database admin credentials > >5. Create a patron and assign superlibrarian permissions to them > >6. Log out of staff interface and log back in as the new user you just >created > >7. Go to More->Acquisitions > >8. Notice yellow/orange warning message telling you to create a budget > >9. Apply the patches attached to this bug report > >10. Repeat steps 1,2,3,4,5,6,7 > >11. Notice instead of warning messages a currency creation form appears >on the right hand side of the page along with explanation of what a currency is and why the user is being >asked to fill this form out. Fill out and submit this form. > >12. A budget creation form is displayed along with an explanation of >budgets above it. Fill this form out and submit it. > >13. A fund creation form appears (again with explanation text above it), >fill it out and submit it > >14. The acquisition onboard tool disappears from the right of the screen and a table of >created funds is displayed and should show the fund you just created > >15. On the left of the screen below the text 'Administration' click >on 'Funds' and delete the fund you just created > >16. Click on More->Acquisitions and observe how the funds form is >displayed rather than the currency or budget forms (because we >already have a currency and budget in the database). Fill out the fund form and submit it. > >17. Again you'll notice the fund table is displayed > >18. On the left of the screen click on 'Budget' and delete your >budget > >19. Navigate to More->Acquisitions and observe how this time the >budget form is displayed. Fill out this form and submit it. You >should be redirected to the Budget Information page >(aqbudgetperiods.pl) where you can click Actions->Add fund to add a >fund. > >20. Repeat steps 1,2,3,4,5,6,7 but making sure to install all sample >data in the web installer including the basic currencies > >21. Notice this time because you have installed basic currencies the >first form to appear is the budget creation form > >22. Repeat step 15 and then create a patron that does not have the superlibrarian permissions >and log out and log back in. > >23. Go to the Acquisitions module and notice that the yellow message >telling you that your administrator must define a budget is displayed > >Sponsored by: Catalyst IT > >Signed-off-by: David Bourgault <david.bourgault@inlibro.com> > >Signed-off-by: Charles Farmer <charles.farmer@inLibro.com> >--- > C4/Budgets.pm | 10 +++++- > acqui/acqui-home.pl | 36 ++++++++++++---------- > koha-tmpl/intranet-tmpl/prog/css/staff-global.css | 34 ++++++++++++++++++++ > .../prog/en/includes/onboardinginclude1.inc | 21 +++---------- > .../prog/en/includes/onboardinginclude2.inc | 19 ++---------- > .../prog/en/includes/onboardinginclude3.inc | 21 ++----------- > .../prog/en/modules/acqui/acqui-home.tt | 24 +-------------- > .../prog/en/modules/admin/aqbudgetperiods.tt | 2 +- > 8 files changed, 74 insertions(+), 93 deletions(-) > >diff --git a/C4/Budgets.pm b/C4/Budgets.pm >index 12c0d04..82c3b41 100644 >--- a/C4/Budgets.pm >+++ b/C4/Budgets.pm >@@ -148,9 +148,17 @@ sub GetPeriodsCount { > > # ------------------------------------------------------------------- > >+=head2 GetHighestBudgetPeriod >+ >+ &my $budgetid = C4::Budgets->GetHighestBudgetPeriod(); >+ >+Retrieve the highest budget >+ >+=cut >+ > sub GetHighestBudgetPeriod{ > my $dbh = C4::Context->dbh; >- warn my $data = $dbh->selectrow_array("SELECT MAX(budget_period_id) FROM aqbudgetperiods"); >+ my $data = $dbh->selectrow_array("SELECT MAX(budget_period_id) FROM aqbudgetperiods"); > return $data; > } > # ------------------------------------------------------------------- >diff --git a/acqui/acqui-home.pl b/acqui/acqui-home.pl >index 1e54f9c..a032b6e 100755 >--- a/acqui/acqui-home.pl >+++ b/acqui/acqui-home.pl >@@ -53,6 +53,7 @@ my ( $template, $loggedinuser, $cookie, $userflags ) = get_template_and_user( > > my $status = $query->param('status') || "ASKED"; > my $suggestions_count = CountSuggestion($status); >+my $userid = $query->param('userid'); > > my $budget_arr = GetBudgetHierarchy; > >@@ -124,11 +125,6 @@ $template->param( > suggestions_count => $suggestions_count, > ); > >- >- >- >- >- > my $aqstep; > my $cur = Koha::Acquisition::Currencies->get_active; > >@@ -141,18 +137,24 @@ if ( $cur ) { > my $budget = GetPeriodsCount(); > my $budgetid = C4::Budgets->GetHighestBudgetPeriod(); > if (!@budget_loop){ >-if (!$cur) { >- $aqstep = 1; >- $template->param( step => $aqstep ); >-} elsif ($budget && $budgetid == 1){ >- $aqstep = 3; >- $template->param( step => $aqstep ); >-} elsif ($budgetid > 1) { >- print $query->redirect("/cgi-bin/koha/admin/aqbudgetperiods.pl"); >- exit; >-} else { >- $aqstep = 2; >- $template->param( step => $aqstep ); >+ if (!$cur) { >+ $aqstep = 1; >+ $template->param( step => $aqstep ); >+ } elsif ($budget && $budgetid == 1){ >+ $aqstep = 3; >+ $template->param( step => $aqstep ); >+ } elsif ($budgetid > 1) { >+ print $query->redirect("/cgi-bin/koha/admin/aqbudgetperiods.pl"); >+ exit; >+ } else { >+ $aqstep = 2; >+ $template->param( step => $aqstep ); >+ } > } >+ >+if ( C4::Context->IsSuperLibrarian() ) { >+ my $displayonboard = 1; >+ $template->param( displayonboard => $displayonboard ); > } >+ > output_html_with_http_headers $query, $cookie, $template->output; >diff --git a/koha-tmpl/intranet-tmpl/prog/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/css/staff-global.css >index 9ff102e..fbbfcc0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/css/staff-global.css >+++ b/koha-tmpl/intranet-tmpl/prog/css/staff-global.css >@@ -3034,3 +3034,37 @@ div#aqhelp{ > padding:20px; > width:50%; > } >+ >+#onboardingModal{ >+ z-index:1; >+ background-color:#EDF4F6; >+ padding: .2em 0; >+ width: 32%; >+ float:right; >+ position:relative; >+ top: 10px; >+ padding-left:10px; >+ padding-right:10px; >+ border-radius:10px; >+} >+ >+#acqui-onboard{ >+ text-align: center; >+ padding-bottom:15px; >+} >+ >+#currency_code_onboard{ >+ width:40%; >+} >+ >+#budget_period_description_onboard{ >+ width:55%; >+} >+ >+#budget_name_onboard{ >+ width:55%; >+} >+ >+#budget_code_onboard{ >+ width:55%; >+} >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/onboardinginclude1.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/onboardinginclude1.inc >index 5d92b50..7e69d38 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/onboardinginclude1.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/onboardinginclude1.inc >@@ -1,21 +1,8 @@ >-<style type="text/css"> >- #onboardingModal{ >- z-index:1; >- background-color:#EDF4F6; >- padding:20px; >- width:70%; >- position:absolute; >- left:auto; >- top:auto; >- right:auto; >- bottom:auto; >-} >-</style> >- > <div id="onboardingModal"> >- <h2> Acquisition onboarding wizard</h2> >+ <h1 id="acqui-onboard"> Acquisition onboarding wizard</h1> >+ > <h3> This onboarding wizard will take you through the process of setting up Acquistions </h3> >- <p>Start by completing this form to create a currency which you will be used to create your first budget and fund.<br> >+ <p>Start by completing this form to create a currency which you will use to create your first budget and fund.<br> > A fund is the accounting value you use to create orders</p> > <form action="/cgi-bin/koha/admin/currency.pl" name="Aform" method="post" class="validated"> > <input type="hidden" name="op" value="add_validate" /> >@@ -33,7 +20,7 @@ > <input type="hidden" name="currency_code" id="currency" value="[% currency.currency %]" />[% currency.currency %] > [% ELSE %] > <label for="currency_code" class="required">Currency: </label> >- <input type="text" name="currency_code" id="currency_code" size="50" maxlength="50" required="required" class="required" /> <span class="required">Required</span> >+ <input type="text" name="currency_code" id="currency_code_onboard" size="50" maxlength="50" required="required" class="required" /> <span class="required">Required</span> > [% END %] > </li> > <input type="hidden" name="rate" id="rate" size="10" maxlength="10" value=1 /> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/onboardinginclude2.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/onboardinginclude2.inc >index f2e6c27..608f973 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/onboardinginclude2.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/onboardinginclude2.inc >@@ -1,23 +1,10 @@ >-<style type="text/css"> >- #onboardingModal{ >- z-index:1; >- background-color:#EDF4F6; >- padding:20px; >- width:70%; >- position:absolute; >- left:auto; >- top:auto; >- right:auto; >- bottom:auto; >-} >-</style> > <div id="onboardingModal"> > [% IF displayonboardscreen == "acquisitions" %] >- <h2> Acquisition onboarding wizard</h2> >+ <h1 id="acqui-onboard"> Acquisition onboarding wizard</h1> > <p> Create a budget which is the highest level value in acquisitions accountancy. <br> > After creating this budget you will be prompted to create a fund which is what you will use to set up orders. > </p> >- <b>If you have previously created a budget (which was subsequently deleted) then you will be redirected to the Budget Administration page after creating a budget using this form. On the Budget Administration page click Actions->Add fund to create a fund</b> >+ <b>If you have previously created a budget (which was subsequently deleted) then you will be redirected to the budget administration page after creating a budget using this form. On the budget administration page click Actions->Add fund to create a fund</b> > <h3> Create a budget</h3> > <form action="/cgi-bin/koha/admin/aqbudgetperiods.pl" name="f" method="post"> > <fieldset class="rows"> >@@ -39,7 +26,7 @@ > > <li> > <label class="required" for="budget_period_description">Description: </label> >- <input type="text" id="budget_period_description" name="budget_period_description" size="48" maxlength="80" value="[% budget_period_description %]" /> >+ <input type="text" id="budget_period_description_onboard" name="budget_period_description" size="48" maxlength="80" value="[% budget_period_description %]" /> > </li> > > <li> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/onboardinginclude3.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/onboardinginclude3.inc >index 2e5fe73..c8d43d5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/onboardinginclude3.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/onboardinginclude3.inc >@@ -1,21 +1,6 @@ > [% USE Price %] >- >-<style type="text/css"> >- #onboardingModal{ >- z-index:1; >- background-color:#EDF4F6; >- padding:20px; >- width:70%; >- position:absolute; >- left:auto; >- top:auto; >- right:auto; >- bottom:auto; >-} >-</style> >- > <div id="onboardingModal"> >- <h2> Acquisition onboarding wizard</h2> >+ <h1 id="acqui-onboard"> Acquisition onboarding wizard</h1> > <p> Fill out this form to create a fund which will be assigned to the budget you just created. <br> > A fund is an accounting value you will use to set up orders</p> > <br> >@@ -46,12 +31,12 @@ > </li> > <li> > <label class="required" for="budget_code">Fund code: </label> >- <input type="text" name="budget_code" id="budget_code" value="[% budget_code %]" size="30" /> >+ <input type="text" name="budget_code" id="budget_code_onboard" value="[% budget_code %]" size="30" /> > </li> > > <li> > <label class="required" for="budget_name">Fund name: </label> >- <input type="text" name="budget_name" id="budget_name" value="[% budget_name %]" size="60" /> >+ <input type="text" name="budget_name" id="budget_name_onboard" value="[% budget_name %]" size="60" /> > </li> > > <li> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt >index 90897b7..aee81a7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt >@@ -111,7 +111,7 @@ $(document).ready(function() { > > [% INCLUDE 'acquisitions-toolbar.inc' %] > [% UNLESS ( loop_budget ) %] >- [% IF ( CAN_user_acquisition_period_manage ) %] >+ [% IF ( CAN_user_acquisition_period_manage ) && displayonboard %] > [% displayonboardscreen = "acquisitions" %] > [% IF step == 1 %] > [% INCLUDE onboardinginclude1.inc %] >@@ -254,28 +254,6 @@ $(document).ready(function() { > </table> > </div> > [% END %] >- >- <button type="button" id="show" onclick"unhide(aqhelp)">Show the next steps to set up Acquisitions</button> >- <br><br> >- <div id="aqhelp"> >- <h1> Next steps</h1> >- <h2> 1. Create your first vendor</h2> >- <p> A vendor is the organisation your institution purchases items from i.e. suppliers<br> >- You must create a vendor before you can create any orders</p> >- <b>Click <a href="/cgi-bin/koha/acqui/supplier.pl?op=enter">here</a> to create a vendor.</b> >- <br><br> >- <h2> 2. Create your first basket</h2> >- <p> A basket is the conceptual container that holds orders. Each basket is assigned to a single vendor so you can perform multiple separate orders from a single vendor simultaneously. Because of its reliance on vendor the basket must be created after the vendor</p> >- <b> To create a basket, click the 'New basket' button on the Vendor Information page which is displayed after you create a vendor</b> >- <br><br> >- <h2> 3. Create an order</h2> >- <p> An order is a assignment of items purchased from a single vendor at a single time</p> >- You create an order by clicking "Add to basket" in the Basket page. From here you can choose the item(s) you want to purchase from existing MARC records in your Koha catalogue, subscription, new item record, external source, staged file (bibliographic file in the process of being uploaded), or from popularly held items. >- </p> >- <br><br> >- For further information about creating a vendor, basket and order go to the Koha manual: >- <a href="http://translate.koha-community.org/manual/master/en/html/09_acquisitions.html"> Koha manual Acquisitions section</a> >- </div> > </div> > </div> > <div class="yui-b"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt >index dee17f8..a3afa16 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt >@@ -340,7 +340,7 @@ > <li> > <label class="required" for="from">Start date: </label> > <input type="text" size="10" id="from" name="budget_period_startdate" value="[% budget_period_startdate | $KohaDates %]" class="datepickerfrom" /> >-<!--<div class="hint">[% INCLUDE 'date-format.inc' %]</div>--> >+ <div class="hint">[% INCLUDE 'date-format.inc' %]</div> > </li> > <li> > >-- >2.7.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 18002
:
59910
|
59911
|
59992
|
60676
|
60677
|
60678
|
60679
|
60680
|
60681
|
60682
|
60683
|
60684
|
60685
|
60686
|
60687
|
60688
|
61987
|
61988
|
63150
|
63151
|
63380
|
63456
|
64732
|
64746
|
64765
|
64947
|
66301
|
67649
|
67650
|
67651
|
68108
|
68109
| 68110