Bug 17297

Summary: Give librarians the ability to add messages to an item
Product: Koha Reporter: Kyle M Hall <kyle>
Component: CatalogingAssignee: Kyle M Hall <kyle>
Status: CLOSED WONTFIX QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: josef.moravec, karamqubsi, m.de.rooy, nick
Version: master   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27374
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 17361    
Bug Blocks:    
Attachments: Bug 17297 - Add npm and webpack config files
Bug 17297 [POC] - Add React based item message editor
Bug 17297 [POC] - Add minified js file
[SIGNED-OFF] Bug 17297 - Add npm and webpack config files
[SIGNED-OFF] Bug 17297 [POC] - Add React based item message editor
[SIGNED-OFF] Bug 17297 [POC] - Add minified js file
Bug 17297 - Add npm and webpack config files
Bug 17297 - Add React based item message editor
Bug 17297 - Add minified js file

Description Kyle M Hall 2016-09-13 17:03:21 UTC
Some librarians would like the ability to leave messages attached to an item ( outside the scope of itemnotes and itemnotes_nonpublic ). This feature would give the librarians the ability to add and remove messages of arbitrary types defined in an authorised value list.
Comment 1 Kyle M Hall 2016-09-13 17:03:50 UTC
*** Bug 13733 has been marked as a duplicate of this bug. ***
Comment 2 Kyle M Hall 2016-09-13 17:08:27 UTC
Created attachment 55544 [details] [review]
Bug 17297 - Add npm and webpack config files
Comment 3 Kyle M Hall 2016-09-13 17:08:34 UTC
Created attachment 55545 [details] [review]
Bug 17297 [POC] - Add React based item message editor
Comment 4 Kyle M Hall 2016-09-13 17:08:36 UTC
Created attachment 55546 [details] [review]
Bug 17297 [POC] - Add minified js file
Comment 5 Kyle M Hall 2016-09-13 17:34:28 UTC
This patch set is a proof of concept for using React for the item messages editor. It has no backend at the moment. It will be trivial to hook this widget into the REST API once the concept is approved.

If you want to try it out:
1) Apply this patch set
2) Browse to moredetail.pl
3) Note each item has the same 5 pre-generated item messages
4) Test Adding and removing item messages

If you want to hack on it:
1) Install npm
2) Apply this patch set
3) Run 'npm -i' to install development dependencies
4) Run 'webpack' to update the compiled moremember.js file to the dev version of React
5) Hack on it, run 'webpack' after making changes ( or look at the --watch option )
6) Run webpack -p --config webpack-production.config.js to minify the
   moremember.js file before submitting an update to it
Comment 6 Josef Moravec 2017-03-07 10:41:56 UTC
Created attachment 60861 [details] [review]
[SIGNED-OFF] Bug 17297 - Add npm and webpack config files

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 7 Josef Moravec 2017-03-07 10:42:06 UTC
Created attachment 60862 [details] [review]
[SIGNED-OFF] Bug 17297 [POC] - Add React based item message editor

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 8 Josef Moravec 2017-03-07 10:42:22 UTC
Created attachment 60863 [details] [review]
[SIGNED-OFF] Bug 17297 [POC] - Add minified js file

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 9 Kyle M Hall 2017-03-08 18:14:03 UTC
Created attachment 60926 [details] [review]
Bug 17297 - Add npm and webpack config files
Comment 10 Kyle M Hall 2017-03-08 18:14:10 UTC
Created attachment 60927 [details] [review]
Bug 17297 - Add React based item message editor

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 11 Kyle M Hall 2017-03-08 18:14:13 UTC
Created attachment 60928 [details] [review]
Bug 17297 - Add minified js file
Comment 12 Josef Moravec 2017-03-09 11:13:35 UTC
Just few things, qa tools complain:
 FAIL	catalogue/moredetail.pl
   FAIL	  forbidden patterns
		forbidden pattern: Data::Dumper::Dumper (line 268)

And the test plan does not mention the need of ITEM_MESSAGE_TYPE authorised values category.

The input field get's smaller when I start to write a message.

Maybe the trash icon would be better for removing messages...

Do you have plan to show some messages summary information on normal detail page?


Failed QA because of the usage of Data::Dumper
Comment 13 Katrin Fischer 2021-01-09 12:05:25 UTC
I think this was probably closed because of the React POC? Because I think the feature itself would still be very useful, I have re-filed a new enh. request: bug 27374
Comment 14 Kyle M Hall 2021-01-11 14:29:23 UTC
(In reply to Katrin Fischer from comment #13)
> I think this was probably closed because of the React POC? Because I think
> the feature itself would still be very useful, I have re-filed a new enh.
> request: bug 27374

Both of those bugs patches are quite old at this point. We needed this feature post-haste and since we are still in the process of settling the react/vue debate, I created a plugin as a stop-gap: https://github.com/bywatersolutions/koha-plugin-item-messages

We should consider this as a possibility for Koha, it is react based but requires no backend transpiling! In theory the same could be done for vue if that's what we go with.