[ERM-390] Manage License term value pick list values (refdata values) Created: 12/Aug/19  Updated: 09/Sep/19  Resolved: 09/Sep/19

Status: Closed
Project: ERM Platform
Components: ui-licenses
Affects versions: None
Fix versions: None

Type: Story Priority: TBD
Reporter: Owen Stephens Assignee: steve.osguthorpe
Resolution: Done Votes: 0
Labels: erm
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Attachments: PNG File Screenshot 2019-08-12 at 08.04.42.png     PNG File Screenshot 2019-08-12 at 08.04.52.png     PNG File Screenshot 2019-08-12 at 08.09.55.png     File delete pick list value.mp4     PNG File screenshot-1.png     PNG File screenshot-2.png     PNG File screenshot-3.png     PNG File screenshot-4.png     PNG File screenshot-5.png     PNG File screenshot-6.png    
Issue links:
Cloners
clones ERM-389 Manage License term value pick lists ... Closed
Defines
defines UXPROD-1521 UI for License term configuration Closed
Sprint: ERM Sprint 70, ERM Sprint 71
Development Team: Bienenvolk

 Description   

Administrators can add license term value pick list values (refdata values) as well as remove them or edit their details.
Only users with access to License settings can view, edit or delete the pick list values in the tenant

Permission to edit these details are separate to those of other ERM permission sets

Workflow / UI Notes

  • Set from within Settings -> Licenses -> Pick list values
  • Display within Settings -> Licenses -> Pick list values
  • User can view, edit or add pick list values (refdata values) for a selected pick list (refdata category)
  • Display option to selelct pick list (refdata category), then display list of values (refdata values) within the pick list
  • Display in the order values were added to the system

Data stored for pick list terms (refdata values):

  • Pick List = Refdata Category to which it belongs (required)
  • Pick List value = Refdata label (set from selection) (required)

Display fields:

  • Value label (actually the term Label NOT the term Value)
  • Last updated
  • Actions (Edit/Delete)

Business rules/constraints
Pick List terms can only be deleted if they are not assigned to any license term configuration

Wireframes
Attached wireframes show UI based on Tenant -> Location setup -> Campuses screens



 Comments   
Comment by steve.osguthorpe [ 12/Aug/19 ]

Mike Taylor has implemented something as part of Reshare.

Comment by steve.osguthorpe [ 12/Aug/19 ]

https://github.com/openlibraryenvironment/ui-directory/blob/master/src/settings/StatusSettings.js

Comment by md331 (Inactive) [ 12/Aug/19 ]

steve.osguthorpe based on Mike Taylor's code there, it almost looks like the endpoint for PUTting an updated Yes record would be something like .../refdata/YesNoOther rather than .../refdata/YesNoOther/Yes. The latter is used throughout Folio and honestly kind of what I expected so I'm trying to make sure that I'm reading things correctly.

Similarly, there's no DELETE endpoint, just the usage of the _delete-flag pattern. Can you confirm that no DELETE endpoint actually exists?

Comment by Mike Taylor [ 13/Aug/19 ]

Hi, md331. It took a bit of back and forth with steve.osguthorpe to figure out the details of how the Refdata API works, but once I had it straight I wrote it up at https://github.com/openlibraryenvironment/ui-directory/blob/master/doc/refdata-api.md

I updated the <ControlledVocab> component in `stripes-smart-components` so it can work with Refdata-style services as well as regular RMB-based ones. It should Just Work for you. See https://github.com/folio-org/stripes-smart-components/commit/5a95ebb6d69b92ae4946181ad57cc4b9e497e92c

Comment by steve.osguthorpe [ 14/Aug/19 ]

md331 Your assumptions are correct with the endpoints. We see this as putting an updated Category. The values list works in the same way as other lists we have in our modules with the "_delete" yes. Although it's actually a put to erm/refdataValues/$

{category ID}

{ "values": [

{ ... }

] }

Comment by md331 (Inactive) [ 14/Aug/19 ]

Claudia Malzer

  • Looks like you'll eventually be setting records the way Mike does here so that ControlledVocab knows where to look for the entries.
  • We can definitely write the rowFilter cleaner than the way the Location Settings were written. Maybe a renderRowFilter function that returns a Select?
  • The Select should just use dataOptions rather than the procedural way they generated the <option> tags. And just include a placeHolder prop so that the first dataOption isn't selected automatically.
  • I'm not certain whether the rowFilterFunction is actually necessary. The purpose of it is so that if you have a gigantic list of entries that are fetched by the baseUrl you provide, those entries will be filtered to only match the ones selected via your rowFilter. However, you're using the rowFilter to control the baseUrl, so only the relevant entries are being fetched. Thus, I think that the filter will match every entry you fetch (if it's defined correctly). So it's not really needed in the current setup.
Comment by Claudia Malzer [ 15/Aug/19 ]

Thank you md331

  • I'm pretty sure I tried records="values" before, but probably something else was wrong so it didn't work. Now it does
  • not sure what you mean with cleaner , but I wrote a function
  • I use now dataOptions in the Select, but what I tried with the placeholder didn't work, the first array entry was always selected. so I still use an empty option
  • I removed the rowFilterFunction
Comment by Gill Osguthorpe [ 27/Aug/19 ]

QA: Tested in Chrome using the diku_admin account.

Critical issue

Pick List terms can only be deleted if they are not assigned to any license term configuration

When attempting to delete a Value which has been used on a license, the following error message is displayed.

Note that selecting "OK" closes the window and everything seems to work ok (see the video).

delete pick list value.mp4

Non-critical issues (will be reported as bugs and linked to this issue)

Display in the order values were added to the system

Not implemented. When a new value is added it is displayed in the preview list in alphabetical order. See screen snip:

UX:
1. New button should be blue, not white.
2. Note that this is a more general problem with other settings as well. The Cancel button does not display at various screen widths. It is cut off on the right hand side. See screen snip:

3. Note that this is an issue with other settings as well (e.g. Users > Patron Groups) The content of the error modal:

... should use the layout of the Error modal pattern:

  • The title should include the error icon:
  • Two horizontal rules should display
  • The "Okay" button should display bottom right.

Not tested

  • "Only users with access to License settings can view, edit or delete the pick list values in the tenant".
Comment by md331 (Inactive) [ 27/Aug/19 ]

Gill Osguthorpe Claudia Malzer, the UX issues will need to be handled in Stripes itself. We're using the ControlledVocab and EditableList components which control the rendering of those problem areas.

Order of display requires the created/updated metadata that pretty much all of our records lack. There's issues out on adding it to Licenses and Agreements ( ERM-53 Closed and ERM-54 Closed ) but that metadata needs to be added to more places as well (such as pick lists, pick list values, terms, etc).

Comment by Gill Osguthorpe [ 27/Aug/19 ]

Thanks md331. I'll be creating separate tickets for the non-critical issues. Just the Error to fix and then it can pass QA.

Comment by Claudia Malzer [ 28/Aug/19 ]

Gill Osguthorpe This error comes from the backend I don't know if and how I can suppress it under certain conditions
steve.osguthorpe, Ian Ibbotson (Use this one), md331 any hints or comments on that?

Comment by Claudia Malzer [ 28/Aug/19 ]

Critical issue:
i changed the error handling for refdataValues in ControlledVocab in stripes-smart-components
as Mark adviced and that helped

Generated at Fri Feb 09 00:20:04 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.