[Bug 10409] New: Do not show course entry form if no departments are found
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10409 Bug ID: 10409 Summary: Do not show course entry form if no departments are found Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Hardware: All URL: /cgi-bin/koha/course_reserves/course.pl OS: All Status: NEW Severity: normal Priority: P5 - low Component: Course reserves Assignee: koha-bugs@lists.koha-community.org Reporter: oleonard@myacpl.org The course reserves entry form shows an error message instead of a form field for the department if no departments are defined: "No DEPARTMENT authorised values found! Please create one or more authorised values with the category DEPARTMENT." If you can't fill out the form because there are no departments, there's no reason to display the form. Otherwise people might fill in the rest of the fields and find they can't submit the form. It would be better to show the error message alone on the page and link the user to the authorized values page. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10409 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10409 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 18671 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18671&action=edit Bug 10409 - Do not show course entry form if no departments are found The course reserves entry form should not be shown if there are no DEPARTMENT authorized values, since this prevents the form from being submitted. This patch replaces the form with an error message when no DEPARTMENT authorized values are found. Also corrected: - Corrected grid structure for more standard display - Converted labels with no corresponding inputs to <span class="label"> - Closed unclosed tags - Corrected incorrect capitalization This patch contains whitespace changes, so please ignore whitespace when examining changes. To test, delete any DEPARTMENT authorized values, if present. Create a new course in Course Reserves. You should see a warning that no DEPARTMENT values were found. If you are logged in with the correct permission, the warning should contain a link to the correct authorized value page. If you do no, the warning should refer the problem to an administrator. After creating one or more DEPARTMENT values, the form should display and submit correctly. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10409 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |oleonard@myacpl.org |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10409 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |String patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10409 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #18671|0 |1 is obsolete| | --- Comment #2 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- Created attachment 18734 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18734&action=edit Bug 10409 - Do not show course entry form if no departments are found The course reserves entry form should not be shown if there are no DEPARTMENT authorized values, since this prevents the form from being submitted. This patch replaces the form with an error message when no DEPARTMENT authorized values are found. Also corrected: - Corrected grid structure for more standard display - Converted labels with no corresponding inputs to <span class="label"> - Closed unclosed tags - Corrected incorrect capitalization This patch contains whitespace changes, so please ignore whitespace when examining changes. To test, delete any DEPARTMENT authorized values, if present. Create a new course in Course Reserves. You should see a warning that no DEPARTMENT values were found. If you are logged in with the correct permission, the warning should contain a link to the correct authorized value page. If you do no, the warning should refer the problem to an administrator. After creating one or more DEPARTMENT values, the form should display and submit correctly. Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> After this patch has been applied, I get an error message and no form if I don't have any DEPARTMENTs defined, which makes sense given that the form can't be submitted without a DEPARTMENT. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10409 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Patch doesn't apply CC| |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10409 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10409 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #18734|0 |1 is obsolete| | --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 19278 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19278&action=edit Bug 10409 - Do not show course entry form if no departments are found The course reserves entry form should not be shown if there are no DEPARTMENT authorized values, since this prevents the form from being submitted. This patch replaces the form with an error message when no DEPARTMENT authorized values are found. Also corrected: - Corrected grid structure for more standard display - Converted labels with no corresponding inputs to <span class="label"> - Closed unclosed tags - Corrected incorrect capitalization This patch contains whitespace changes, so please ignore whitespace when examining changes. To test, delete any DEPARTMENT authorized values, if present. Create a new course in Course Reserves. You should see a warning that no DEPARTMENT values were found. If you are logged in with the correct permission, the warning should contain a link to the correct authorized value page. If you do no, the warning should refer the problem to an administrator. After creating one or more DEPARTMENT values, the form should display and submit correctly. Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> After this patch has been applied, I get an error message and no form if I don't have any DEPARTMENTs defined, which makes sense given that the form can't be submitted without a DEPARTMENT. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10409 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10409 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #19278|0 |1 is obsolete| | --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 19298 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19298&action=edit [PASSED QA] Bug 10409 - Do not show course entry form if no departments are found The course reserves entry form should not be shown if there are no DEPARTMENT authorized values, since this prevents the form from being submitted. This patch replaces the form with an error message when no DEPARTMENT authorized values are found. Also corrected: - Corrected grid structure for more standard display - Converted labels with no corresponding inputs to <span class="label"> - Closed unclosed tags - Corrected incorrect capitalization This patch contains whitespace changes, so please ignore whitespace when examining changes. To test, delete any DEPARTMENT authorized values, if present. Create a new course in Course Reserves. You should see a warning that no DEPARTMENT values were found. If you are logged in with the correct permission, the warning should contain a link to the correct authorized value page. If you do no, the warning should refer the problem to an administrator. After creating one or more DEPARTMENT values, the form should display and submit correctly. Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> After this patch has been applied, I get an error message and no form if I don't have any DEPARTMENTs defined, which makes sense given that the form can't be submitted without a DEPARTMENT. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Passes all tests and QA script. You now see a useful error message, when no departments have been defined. Else you are taken to the correct form. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10409 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- There are still some things that are a bit problematic: <legend>[% IF course_id %] Edit [% ELSE %] Create [% END %] course</legend> 'Lazy' constructs like that make it unnecessarily hard to translators, because grammar works different in different languages and having single strings like that in a predefined order is not nice. Even in German it does not really work. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10409 --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 19299 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19299&action=edit Bug 10409: Follow up - improving strings for easier translation Fixing this line: <legend>[% IF course_id %] Edit [% ELSE %] Create [% END %] course</legend> As grammar works different in different languages, having single strings like that in a predefined order makes having a nice translation unnecessarily hard. This will make it a little easier: <legend>[% IF course_id %]Edit course[% ELSE %]Create course[% END %]</legend> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10409 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gmcharlt@gmail.com --- Comment #7 from Galen Charlton <gmcharlt@gmail.com> --- (In reply to Owen Leonard from comment #0)
The course reserves entry form shows an error message instead of a form field for the department if no departments are defined: "No DEPARTMENT authorised values found! Please create one or more authorised values with the category DEPARTMENT."
A question about the premise of this patch, possibly for Kyle: is there a functional reason why setting a department is absolutely required? If so, why is courses.department a nullable column? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10409 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |In Discussion --- Comment #8 from Galen Charlton <gmcharlt@gmail.com> --- Setting to "In discussion" pending a response to the question posed in comment 7. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10409 --- Comment #9 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Galen Charlton from comment #7)
(In reply to Owen Leonard from comment #0)
The course reserves entry form shows an error message instead of a form field for the department if no departments are defined: "No DEPARTMENT authorised values found! Please create one or more authorised values with the category DEPARTMENT."
A question about the premise of this patch, possibly for Kyle: is there a functional reason why setting a department is absolutely required? If so, why is courses.department a nullable column?
There is no functional reason to require the setting of a department. It was merely a requirement of the specification I was following ( where the functionality was based on another implementation of course reserves which made Department a required field ). Making department an optional value would do no harm. Of course, the same could be said for the "Name" field, so it's more of a philosophical question than anything. I guess the question is "In practice, will anyone want to create courses *without* course departments?". So, we can either leave department as a required field, or make it optionally require via a system preference. What are your feelings on those options? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10409 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- When we alrady discuss required fields... I wondered why the course number is required. I think the way course reserves work here, normally they just give the name of the professor or course without a number. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10409 --- Comment #11 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Katrin Fischer from comment #10)
When we alrady discuss required fields... I wondered why the course number is required. I think the way course reserves work here, normally they just give the name of the professor or course without a number.
Katrin, basically the same answer as before. It was in the spec, it doesn't *really* have to be requiired, and we could make it being a requirement optional via a system preference. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10409 --- Comment #12 from Owen Leonard <oleonard@myacpl.org> --- I think if changing the required fields is something that libraries want a new bug should be created. I don't think the discussion should hold up this patch. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10409 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hm, still think it's a bit funny to have unrequired (by the system) fields required. I think the question here is if we push Owen's fix or remove the required attribute from the field? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10409 --- Comment #14 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Katrin Fischer from comment #13)
Hm, still think it's a bit funny to have unrequired (by the system) fields required. I think the question here is if we push Owen's fix or remove the required attribute from the field?
Owen's fix does not change the functionality of the system, whereas removing the required attribute would. I would suggest we push this along, and if you'd like to see the option to make any of the given field values required/optional, we should file a separate bug for that. It really has no bearing on this particular bug. Both pre and post patch behaviors prohibit the creation of a course without a department, and only the presentation has changed. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10409 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #19299|0 |1 is obsolete| | --- Comment #15 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 19683 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19683&action=edit Bug 10409: Follow up - improving strings for easier translation Fixing this line: <legend>[% IF course_id %] Edit [% ELSE %] Create [% END %] course</legend> As grammar works different in different languages, having single strings like that in a predefined order makes having a nice translation unnecessarily hard. This will make it a little easier: <legend>[% IF course_id %]Edit course[% ELSE %]Create course[% END %]</legend> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10409 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10409 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10409 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #16 from Galen Charlton <gmcharlt@gmail.com> --- (In reply to Katrin Fischer from comment #13)
Hm, still think it's a bit funny to have unrequired (by the system) fields required. I think the question here is if we push Owen's fix or remove the required attribute from the field?
I've gone ahead and pushed Owen's patch (thanks, Owen!) and your follow-up (thanks, Katrin!), but from my POV, the question of what fields should be required remains open, so I've opened bug 10603. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org