Bug 37273

Summary: Add ID column to Agreements table in the ERM
Product: Koha Reporter: Esther Melander <esther.melander>
Component: ERMAssignee: Eric Garcia <cubingguy714>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: cubingguy714, ddaghita, jonathan.druart, jonathan.field, martin.renvoize, matt.blenkinsop, michaela.sieber, pedro.amorim
Version: unspecifiedKeywords: Academy
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: ERM ID number appended to agreement name
Bug 37273: Added ID column to ERM Agreements and Licenses Tables
Bug 37273: (follow-up) Remove parentheses and # from column

Description Esther Melander 2024-07-08 16:43:59 UTC
Created attachment 168606 [details]
ERM ID number appended to agreement name

When creating an Agreement or License in the ERM, an ID number is added to the agreement or license name. If it is necessary for the ID number to be visible, it should be in a separate column from the name. Having the ID number appended to the name is a little confusing (see example image). Another option is to hide the hide ID number if it is not needed.
Comment 1 Pedro Amorim 2024-07-09 08:47:52 UTC
(In reply to Esther Melander from comment #0)
> Created attachment 168606 [details]
> ERM ID number appended to agreement name
> 
> When creating an Agreement or License in the ERM, an ID number is added to
> the agreement or license name. If it is necessary for the ID number to be
> visible, it should be in a separate column from the name. Having the ID
> number appended to the name is a little confusing (see example image).
> Another option is to hide the hide ID number if it is not needed.

I think this makes sense.
@Joubu do we remember the initial reason why we decided the way it is currently? Trying to understand if there are any blockers for this.
Comment 2 Jonathan Druart 2024-07-09 11:48:52 UTC
I guess I just wanted to avoid a new column in the table. We can have it in a separate column if it is more convenient for people.
However I would not hide it, in case you want to search/order by the IDs.

Not sure to understand why it is considered confusing however.
Comment 3 Esther Melander 2024-07-09 14:56:30 UTC
It's not clear what the number means. Labeling it makes it understood the number is an ID number. I can see some cases where a number like '#1' is part of a title on the titles table, which can be confusing.
Comment 4 Eric Garcia 2024-07-17 16:46:04 UTC
Created attachment 169107 [details] [review]
Bug 37273: Added ID column to ERM Agreements and Licenses Tables

To test
1. Apply patch, yarn build, restart_all
2. System preferences -> ERMModule -> Enable
3. E-resource management -> Agreements -> "+New Agreement"
4. Notice ID is removed from name and put in it's own column
5. Repeat with licenses table
Comment 5 Pedro Amorim 2024-07-19 08:31:50 UTC
Comment on attachment 169107 [details] [review]
Bug 37273: Added ID column to ERM Agreements and Licenses Tables

Review of attachment 169107 [details] [review]:
-----------------------------------------------------------------

::: koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue
@@ +268,3 @@
>                  {
>                      title: __("Name"),
>                      data: "me.name:me.agreement_id",

We can probably also change this to 'me.name' only.

::: koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesList.vue
@@ +161,3 @@
>                  {
>                      title: __("Name"),
>                      data: "me.name:me.license_id",

We can probably also change this to 'me.name' only.
Comment 6 davedaghita 2024-09-26 19:16:07 UTC
The ID# column worked.
Comment 7 Owen Leonard 2024-09-27 16:07:06 UTC
Created attachment 172137 [details] [review]
Bug 37273: (follow-up) Remove parentheses and # from column

The new ID column shows numbers like "(#2)". I think the parentheses and
hash symbol are unnecessary and inconsistent with the way we do it in
other places and should be removed.

To test, apply the patch and rebuild the staff interface CSS: Either run
'yarn build' from the command line or if you're using a sandbox, click
the "Actions" menu for your sandbox and choose "Build CSS and JS."

Follow the previous test plan and confirm that the ID column looks
correct.