Bug 30931 - Handling of items.dateaccessioned in the item editor
Summary: Handling of items.dateaccessioned in the item editor
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement with 1 vote (vote)
Assignee: Alex Buckley
QA Contact: Testopia
URL:
Keywords:
Depends on: 29963
Blocks:
  Show dependency treegraph
 
Reported: 2022-06-09 09:13 UTC by Alex Buckley
Modified: 2023-06-07 08:05 UTC (History)
9 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 30931: Display a hint in item editor that the dateaccessioned will be filled with current date if left blank (3.26 KB, patch)
2022-06-09 09:16 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 30931: Restore original intention of bug 29815 (1.22 KB, patch)
2022-06-09 09:17 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 30931: (alternate) Display a hint in item editor that the dateaccessioned will be filled with current date if left blank (3.56 KB, patch)
2022-06-27 22:56 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 30931: (alternate) Display a hint in item editor that the dateaccessioned will be filled with current date if left blank (4.87 KB, patch)
2023-02-24 04:33 UTC, Alex Buckley
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Buckley 2022-06-09 09:13:00 UTC
This bug report is for the community to decide which of the following is desired for handling of the dateaccessioned field in the item editor:

1. A hint - To tell users if they leave the items.dateaccessioned field (which is typically linked to the 952$d subfield) empty when adding a new item in serials, cataloguing, or acquisitions then Koha will automatically save the current date in that field. 

OR

2. Context-aware behaviour - Koha only pre-fills the item editor dateaccessioned field with the current date when the item is added/new.

Shifting this discussion away from bug 29963 so the community can proceed to upstream the reversion of bug 29815
Comment 1 Alex Buckley 2022-06-09 09:16:18 UTC Comment hidden (obsolete)
Comment 2 Alex Buckley 2022-06-09 09:17:12 UTC
Created attachment 135855 [details] [review]
Bug 30931: Restore original intention of bug 29815

This patch restores the original intended behaviour of bug 29815; To
pre-populate the dateaccessioned field on item creations only.
Comment 3 Alex Buckley 2022-06-09 09:25:23 UTC
I have copied Martin's and my patches from bug 29963 onto this bug report.

This is so, hopefully, the discussions around if a hint or context-aware logic should be implemented for handling the dateaccessioned field in the item editor can happen here. Freeing up bug 29963 to upstream a reversion of bug 29815

I have taken the liberty of adding people involved in bug 29963 to this bug report, please feel free to remove yourself if you wish.
Comment 4 Alex Buckley 2022-06-09 09:40:05 UTC
There are two patches attached, each represents a different approach for handling the dateaccessioned field on the item editor:

* Hint patch: 'Bug 30931: Display a hint in the item editor that the dateaccessioned will be filled with current date if left blank'

* Context-specific patch: 'Bug 30931: Restore original intention of bug 29815' -  This is context-specific logic because it only pre-populates the dateaccessioned field in the item editor page when creating new items.

Please take a look, and note your preferred approach :)
Comment 5 David Nind 2022-06-11 20:28:55 UTC
Hi Alex.

I've posted a message on the koha-US cataloguing special interest group mailing list.

I hope that will help with getting some feedback.

David
Comment 6 Alex Buckley 2022-06-12 21:54:36 UTC
(In reply to David Nind from comment #5)
> Hi Alex.
> 
> I've posted a message on the koha-US cataloguing special interest group
> mailing list.
> 
> I hope that will help with getting some feedback.
> 
> David

Hi David, 

Thank you very much!

Alex
Comment 7 Heather 2022-06-13 16:03:48 UTC
Hi!

Thank you for bringing this bug to the attention of the Koha-US CatSIG!  I don't have a strong opinion on this behavior, but I'll monitor this bug & see if discussion is generated, and be sure that any discussion on the CatSIG email list makes its way into comments here--and if there isn't any discussion and the bug is still under discussion by our next meeting (July 7, 2022), I'll bring it up in the meeting to call additional attention to it & encourage commenting here.

Cheerio!
h2
Comment 8 Alex Buckley 2022-06-16 10:02:50 UTC
(In reply to Heather from comment #7)
> Hi!
> 
> Thank you for bringing this bug to the attention of the Koha-US CatSIG!  I
> don't have a strong opinion on this behavior, but I'll monitor this bug &
> see if discussion is generated, and be sure that any discussion on the
> CatSIG email list makes its way into comments here--and if there isn't any
> discussion and the bug is still under discussion by our next meeting (July
> 7, 2022), I'll bring it up in the meeting to call additional attention to it
> & encourage commenting here.
> 
> Cheerio!
> h2

Thanks very much Heather, much appreciated!
Comment 9 Benjamin Daeuber 2022-06-20 19:37:45 UTC
I might be entirely missing something here, but it appears to be impossible to delete the dateaccessioned field now. Is that the intended behavior? The interface allows me to clear it, but the item record is populated with today's date. I was having this behavior with bug 29963 as well.
Comment 10 Katrin Fischer 2022-06-20 19:56:01 UTC
(In reply to Benjamin Daeuber from comment #9)
> I might be entirely missing something here, but it appears to be impossible
> to delete the dateaccessioned field now. Is that the intended behavior? The
> interface allows me to clear it, but the item record is populated with
> today's date. I was having this behavior with bug 29963 as well.

As I pointed out in comment# this is a separate bug filed earlier and unrelated to these changes: Bug 29958 - Missing dateaccessioned is set to today when storing an item

But please note: Koha _always_ stored today's date for new items on saving, when the field was left empty. The bug is in setting it to today's date when editing items.
Comment 11 Benjamin Daeuber 2022-06-20 20:02:29 UTC
> As I pointed out in comment# this is a separate bug filed earlier and unrelated to these changes: Bug 29958 - Missing dateaccessioned is set to today when storing an item

Right, I recall that now.

That makes this hard to test since my concern is really in batch modification. The wording on the batch modification screen implies that if you modify 2 items, one with a date acquired and one without, they all need to be set to the same date (either today's date if you leave it blank or all the same date if you fill it in). I think that's a quirk of the wording, but it's hard to tell given that behavior.
Comment 12 Katrin Fischer 2022-06-20 20:04:27 UTC
Was just about to add the missing link: bug 29963 comment#28. I am not sure if this bug covers the batch edit as well - Alex might be able to tell.
Comment 13 Alex Buckley 2022-06-27 22:56:17 UTC
Created attachment 136663 [details] [review]
Bug 30931: (alternate) Display a hint in item editor that the dateaccessioned will be filled with current date if left blank

This hint WILL show when:
- Adding a new item
- Receiving a serial issue

This hint WILL NOT show when:
- Batch modifying items
- Editing existing items

Test plan:
1. Apply patch

2. Add an item to a biblio record. Notice there is a hint message for the
952$d (date acquired) subfield.

3. Edit an existing item. Notice there is no hint message displaying for the 952$d
subfield.

4. Batch modify an item by submitting an item barcode into Tools > Batch item modification. Notice no hint message is displayed for the 952$d subfield.

5. Receive a serial (The subscription must be setup to create an item
upon receival to test this).

6. Notice there is a hint message displaying for the 952$d (Date acquired) subfield in both the main issue you are receiving and the supplemental issue form as well

Sponsored-by: Catalyst IT
Comment 14 Alex Buckley 2022-06-27 22:57:15 UTC
(In reply to Katrin Fischer from comment #12)
> Was just about to add the missing link: bug 29963 comment#28. I am not sure
> if this bug covers the batch edit as well - Alex might be able to tell.

Hi Katrin and Benjamin, 

Sincere apologies for my delay in replying!

This bug report should only cover adding new items/serial issues, not batch editing. However, my previous hint patch on this bug report did incorrectly display on the batch edit page. 

I agree with Benjamin that having the hint text 'Today's date will be saved in this field if you leave it blank.' display for 952$d (date accessioned) when batch editing existing items is confusing. 

Therefore, I have modified my patch and attached a new one, so the hint only shows in two situations:
- Receiving serial issues
- Adding new items

The hint no longer displayed when:
- Editing individual existing items
- Batch editing items

Could you please take a look Benjamin?

Thanks,
Alex
Comment 15 Alex Buckley 2022-08-17 03:33:58 UTC
Both patches still apply cleanly to master! 

Heather, were there any thoughts about this bug report in the Koha-US CatSIG meeting on July 7, 2022?

Benjamin, would you mind testing the patches to let us know which behaviour you prefer?
Comment 16 Heather 2022-08-18 14:48:42 UTC
Hi!  Nothing special to report from CatSIGers--it seems pretty straightforward and welcome!
Comment 17 Benjamin Daeuber 2022-08-18 17:41:07 UTC
Tested this on master. Plan:

1. Apply patch

2. Add an item to a biblio record. Notice there is a hint message for the
952$d (date acquired) subfield.

3. Edit an existing item. Notice there is no hint message displaying for the 952$d
subfield.

4. Batch modify an item by submitting an item barcode into Tools > Batch item modification. Notice no hint message is displayed for the 952$d subfield.

Did not test serials, since I don't have anything set up at the moment.

Also confirmed that the date did not add when leaving field blank during item modification and batch item modification.

I don't have much to say on the actual goal of this bug, so I probably shouldn't add a signoff, but I can confirm this is as expected on item edit screens. I can if you need it, however.
Comment 18 Alex Buckley 2022-08-29 06:43:41 UTC
Hi Heather, Benjamin, and Martiin,

Thanks very much for your replies Heather and Benjamin!

Thank you for testing and offering to sign off Benjamin. 

Martin: Do you have a preference on which patch is upstreamed? 
I am happy with either patch :)

Thanks,
Alex
Comment 19 Hammat wele 2022-11-18 17:31:54 UTC
Test Plan:

1. Apply patch

2. Add an item to a biblio record. Notice there is a hint message for Date acquired field.

3. Edit an existing item. Notice there is no hint message displaying for the Date acquired field.

4. Batch modify an item by submitting an item barcode into Tools > Batch item modification. Notice no hint message is displayed for the Date acquired.

5. Receive a Serial edition by changing status of issue to 'Arrived'. Notice there is a hint message for Date acquired field.

6. But When ordering a purchase suggestions (Acquisitions) there is no hint message displaying for the Date acquired field. The hint message should be displayed
Comment 20 Alex Buckley 2023-02-24 04:33:33 UTC
Created attachment 147280 [details] [review]
Bug 30931: (alternate) Display a hint in item editor that the dateaccessioned will be filled with current date if left blank

This hint WILL show when:
- Adding a new item
- Receiving a serial issue
- Ordering from a purchase suggestion (Acquisitions module)
- Ordering from a staged file (Acquisitions module)

This hint WILL NOT show when:
- Batch modifying items
- Editing existing items

Test plan:
1. Apply patch

2. Add an item to a biblio record. Notice there is a hint message for the
952$d (date acquired) subfield.

3. Edit an existing item. Notice there is no hint message displaying for the 952$d
subfield.

4. Batch modify an item by submitting an item barcode into Tools > Batch item modification. Notice no hint message is displayed for the 952$d subfield.

5. Receive a serial (The subscription must be setup to create an item
upon receival to test this).

6. Notice there is a hint message displaying for the 952$d (Date acquired) subfield in both the main issue you are receiving and the supplemental issue form as well

7. In the Acquisitions module place an order from a purchase suggestion.
Confirm the hint message is displayed for the Date acquired field.

8. In the Acquisitions module place an order from a staged file. Confirm
the hint message is displayed for the Date acquired field.

Sponsored-by: Catalyst IT
Comment 21 Alex Buckley 2023-02-24 04:34:46 UTC
(In reply to Hammat wele from comment #19)
> Test Plan:
> 
> 1. Apply patch
> 
> 2. Add an item to a biblio record. Notice there is a hint message for Date
> acquired field.
> 
> 3. Edit an existing item. Notice there is no hint message displaying for the
> Date acquired field.
> 
> 4. Batch modify an item by submitting an item barcode into Tools > Batch
> item modification. Notice no hint message is displayed for the Date acquired.
> 
> 5. Receive a Serial edition by changing status of issue to 'Arrived'. Notice
> there is a hint message for Date acquired field.
> 
> 6. But When ordering a purchase suggestions (Acquisitions) there is no hint
> message displaying for the Date acquired field. The hint message should be
> displayed

Thank you for testing Hammat. 

I have attached an amended patch (the alternate patch), which displays the date accessioned field hint when ordering from a purchase suggestion and from a staged file. 

Could you please re-test?
Comment 22 Laura Escamilla 2023-03-03 18:46:02 UTC
(In reply to Alex Buckley from comment #21)
> (In reply to Hammat wele from comment #19)
> > Test Plan:
> > 
> > 1. Apply patch
> > 
> > 2. Add an item to a biblio record. Notice there is a hint message for Date
> > acquired field.
> > 
> > 3. Edit an existing item. Notice there is no hint message displaying for the
> > Date acquired field.
> > 
> > 4. Batch modify an item by submitting an item barcode into Tools > Batch
> > item modification. Notice no hint message is displayed for the Date acquired.
> > 
> > 5. Receive a Serial edition by changing status of issue to 'Arrived'. Notice
> > there is a hint message for Date acquired field.
> > 
> > 6. But When ordering a purchase suggestions (Acquisitions) there is no hint
> > message displaying for the Date acquired field. The hint message should be
> > displayed
> 
> Thank you for testing Hammat. 
> 
> I have attached an amended patch (the alternate patch), which displays the
> date accessioned field hint when ordering from a purchase suggestion and
> from a staged file. 
> 
> Could you please re-test?

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Comment 23 Marcel de Rooy 2023-04-18 11:57:18 UTC
(In reply to Alex Buckley from comment #0)
> This bug report is for the community to decide which of the following is
> desired for handling of the dateaccessioned field in the item editor:
> 
> 1. A hint - To tell users if they leave the items.dateaccessioned field
> (which is typically linked to the 952$d subfield) empty when adding a new
> item in serials, cataloguing, or acquisitions then Koha will automatically
> save the current date in that field. 
> 
> OR
> 
> 2. Context-aware behaviour - Koha only pre-fills the item editor
> dateaccessioned field with the current date when the item is added/new.
> 
> Shifting this discussion away from bug 29963 so the community can proceed to
> upstream the reversion of bug 29815

As I understand, the first patch is meant to revert 29815 but why doesnt it revert the plugin then?
cataloguing/value_builder/dateaccessioned.pl

Changing status. Please explain.