Summary: | Shortcuts / Links to missing fields in MARC-Editor don't work as expected | ||
---|---|---|---|
Product: | Koha | Reporter: | Jan Kissig <bibliothek> |
Component: | Staff interface | Assignee: | Jan Kissig <bibliothek> |
Status: | CLOSED FIXED | QA Contact: | Katrin Fischer <katrin.fischer> |
Severity: | minor | ||
Priority: | P5 - low | CC: | a.roussos, aleisha, arthur.suzuki, caroline.cyr-la-rose, david, gmcharlt, lucas, martin.renvoize, wainuiwitikapark |
Version: | Main | ||
Hardware: | All | ||
OS: | Linux | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This fixes the standard MARC editor so that the links for any errors go to the correct tab. Currently, the links only work if you are the correct tab.
|
Version(s) released in: |
23.05.00,22.11.03,22.05.10,21.11.18
|
Circulation function: | |||
Attachments: |
Bug 32523 - Shortcuts / Links to missing fields in MARC-Editor don't work as expected
Bug 32523: Links to missing fields in MARC-editor error Bug 32523: Links to missing fields in MARC-editor error Bug 32523: Links to missing fields in MARC editor error Bug 32523: Links to missing fields in MARC editor error Bug 32523: Links to missing fields in MARC editor error Bug 32523: Links to missing fields in MARC editor error |
Description
Jan Kissig
2022-12-23 11:57:44 UTC
Created attachment 144829 [details] [review] Bug 32523 - Shortcuts / Links to missing fields in MARC-Editor don't work as expected Comment on attachment 144829 [details] [review] Bug 32523 - Shortcuts / Links to missing fields in MARC-Editor don't work as expected This bug appears after switching to the new staff interface design (from 22.05 to 22.11). When adding/editing a biblio in staff interface leaving out mandatory fields and click on save, you get an error dialog with shortcuts/links to these missing fields. Clicking on these links should change section tabs and focus the field. This patch fixes that error. Test plan: 1) in staff interface go to /cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode= 2) click Save 3) Error dialog appears, informing about missing input in mandatory fields. 4) Click on tab 0 (section 0) to make sure only marc 0XX fields are visible. 5) In the error dialog click on a "Go to field" which points f.e. to section 9 6) The selected / active tab will switch to section 9 and will not focus on the selected field 7) apply patch 8) repeat step 1) to 6) Hi Jan, I'm thinking this is ready for testing.. if it is could you switch the status to 'Needs signoff' to send up the signal that you're happy it's ready? Hi Jan. Your patch works (yeah!), but I can't seem to sign it off. I get this message: root@kohadevbox:koha(bz32523)$ git bz attach -e 32523 HEAD /usr/bin/git-bz:1908: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal obsoleted = (initial_description == patch.description) Traceback (most recent call last): File "/usr/bin/git-bz", line 2722, in <module> do_attach(*args) File "/usr/bin/git-bz", line 2074, in do_attach attach_commits(bug, commits, edit_comments=global_options.edit) File "/usr/bin/git-bz", line 1988, in attach_commits description, body, obsoletes, statuses, patch_complexities, depends = edit_attachment_comment(bug, commit.subject, body) File "/usr/bin/git-bz", line 1940, in edit_attachment_comment lines = edit_template(template.getvalue()) File "/usr/lib/python2.7/StringIO.py", line 271, in getvalue self.buf += ''.join(self.buflist) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 3: ordinal not in range(128) I can sign off other patches (and my koha-testing-docker (KTD) is all up to date), so I don't think it is my setup (but I could be wrong!). Also, I think you will need to amend your patch for the QA Team to be happy, including: - Formatting title as Bug XXXXX: Title - Including the description and test plan in the patch See the commit message guidelines at https://wiki.koha-community.org/wiki/Commit_messages David I've added a draft release note. Created attachment 144976 [details] [review] Bug 32523: Links to missing fields in MARC-editor error This bug appears after switching to the new staff interface design (from 22.05 to 22.11). When adding/editing a biblio in staff interface leaving out mandatory fields and click on save, you get an error dialog with shortcuts/links to these missing fields. Clicking on these links should change section tabs and focus the field. This patch fixes that error. Test plan: 1) in staff interface go to /cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode= 2) click Save 3) Error dialog appears, informing about missing input in mandatory fields. 4) Click on tab 0 (section 0) to make sure only marc 0XX fields are visible. 5) In the error dialog click on a "Go to field" which points f.e. to section 9 6) The selected / active tab will switch to section 9 and will not focus on the selected field 7) apply patch 8) repeat step 1) to 6) Hi David, thank you for your feedback. I have no clue where the error in root@kohadevbox:koha(bug_32523)$ git bz attach -e 32523 HEAD comes from. I use koha-testing-docker and cloned koha as described: git clone https://git.koha-community.org/Koha-community/Koha.git koha and use it as SYNC_REPO. Created a branch bug_32523 and switched to it, changed the source, committed and checked if it worked after running ktd up Inside the ktd (ktd --shell) I run root@kohadevbox:koha(bug_32523)$ git bz attach -e 32523 HEAD and get the same error as you. Someone a clue? The patch now no longer applies 8-(... Applying: Bug 32523: Links to missing fields in MARC-editor error Using index info to reconstruct a base tree... M koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt Falling back to patching base and 3-way merge... Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt error: Failed to merge in the changes. Patch failed at 0001 Bug 32523: Links to missing fields in MARC-editor error Must have been something with my setup, now applies! Created attachment 145002 [details] [review] Bug 32523: Links to missing fields in MARC-editor error This bug appears after switching to the new staff interface design (from 22.05 to 22.11). When adding/editing a biblio in staff interface leaving out mandatory fields and click on save, you get an error dialog with shortcuts/links to these missing fields. Clicking on these links should change section tabs and focus the field. This patch fixes that error. Test plan: 1) in staff interface go to /cgi-bin/koha/cataloguing/addbiblio.pl? frameworkcode= 2) click Save 3) Error dialog appears, informing about missing input in mandatory fields. 4) Click on tab 0 (section 0) to make sure only marc 0XX fields are visible. 5) In the error dialog click on a "Go to field" which points f.e. to section 9 6) The selected / active tab will switch to section 9 and will not focus on the selected field 7) apply patch 8) repeat step 1) to 6) Signed-off-by: David Nind <david@davidnind.com> Comment on attachment 145002 [details] [review] Bug 32523: Links to missing fields in MARC-editor error I've obsoleted my sign off - something weird going on with unicode errors when trying to sign off - possibly caused by the subject line: Subject: [PATCH] =?UTF-8?q?Bug=C2=A032523:=20Links=20to=20missing=20fields?= =?UTF-8?q?=20in=20MARC-editor=20error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I don't know how to fix... Created attachment 145012 [details] [review] Bug 32523: Links to missing fields in MARC editor error This bug appears after switching to the new staff interface design (from 22.05 to 22.11). When adding/editing a biblio in staff interface leaving out mandatory fields and click on save, you get an error dialog with shortcuts/links to these missing fields. Clicking on these links should change section tabs and focus the field. This patch fixes that error. Test plan: 1) in staff interface go to /cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode= 2) click Save 3) Error dialog appears, informing about missing input in mandatory fields. 4) Click on tab 0 (section 0) to make sure only marc 0XX fields are visible. 5) In the error dialog click on a "Go to field" which points f.e. to section 9 6) The selected / active tab will switch to section 9 and will not focus on the selected field 7) apply patch 8) repeat step 1) to 6) Created attachment 145013 [details] [review] Bug 32523: Links to missing fields in MARC editor error This bug appears after switching to the new staff interface design (from 22.05 to 22.11). When adding/editing a biblio in staff interface leaving out mandatory fields and click on save, you get an error dialog with shortcuts/links to these missing fields. Clicking on these links should change section tabs and focus the field. This patch fixes that error. Test plan: 1) in staff interface go to /cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode= 2) click Save 3) Error dialog appears, informing about missing input in mandatory fields. 4) Click on tab 0 (section 0) to make sure only marc 0XX fields are visible. 5) In the error dialog click on a "Go to field" which points f.e. to section 9 6) The selected / active tab will switch to section 9 and will not focus on the selected field 7) apply patch 8) repeat step 1) to 6) I am sorry for spamming that bug page. @David you were right, the subject was in case the problem. I created the commit message inside visual studio and it seems like this caused the strange formatted subject, which then caused git bz -e to fail. I marked the first attachment as obsolete and was able to submit again, but now with correct subject line. Created attachment 145039 [details] [review] Bug 32523: Links to missing fields in MARC editor error This bug appears after switching to the new staff interface design (from 22.05 to 22.11). When adding/editing a biblio in staff interface leaving out mandatory fields and click on save, you get an error dialog with shortcuts/links to these missing fields. Clicking on these links should change section tabs and focus the field. This patch fixes that error. Test plan: 1) in staff interface go to /cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode= 2) click Save 3) Error dialog appears, informing about missing input in mandatory fields. 4) Click on tab 0 (section 0) to make sure only marc 0XX fields are visible. 5) In the error dialog click on a "Go to field" which points f.e. to section 9 6) The selected / active tab will switch to section 9 and will not focus on the selected field 7) apply patch 8) repeat step 1) to 6) Signed-off-by: David Nind <david@davidnind.com> (In reply to Jan Kissig from comment #14) > I am sorry for spamming that bug page. > > @David you were right, the subject was in case the problem. > I created the commit message inside visual studio and it seems like this > caused the strange formatted subject, which then caused git bz -e to fail. > > I marked the first attachment as obsolete and was able to submit again, but > now with correct subject line. No problem Jan! Glad you were able to figure out how to fix it. Now signed off. David I've changed the assignee to yourself, as well as changing the version to master (needs back porting to 22.11). Good luck with the QA! Created attachment 146151 [details] [review] Bug 32523: Links to missing fields in MARC editor error This bug appears after switching to the new staff interface design (from 22.05 to 22.11). When adding/editing a biblio in staff interface leaving out mandatory fields and click on save, you get an error dialog with shortcuts/links to these missing fields. Clicking on these links should change section tabs and focus the field. This patch fixes that error. Test plan: 1) in staff interface go to /cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode= 2) click Save 3) Error dialog appears, informing about missing input in mandatory fields. 4) Click on tab 0 (section 0) to make sure only marc 0XX fields are visible. 5) In the error dialog click on a "Go to field" which points f.e. to section 9 6) The selected / active tab will switch to section 9 and will not focus on the selected field 7) apply patch 8) repeat step 1) to 6) Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Jan, congrats on your first patch for Koha! Sorry it took a while to get around to this one! Pushed to master for 23.05. Nice work everyone, thanks! Can this fix please be backported to 22.11? Thanks! Nice work, thanks everyone! Pushed to 22.11.x for the next release. Backported to 22.05.x for upcoming 22.05.10 applied to 21.11.x for 21.11.18 Not backported to 21.05.x *** Bug 31880 has been marked as a duplicate of this bug. *** |