[UICR-161] UI error when editing a note on a Course record Created: 23/Jun/22  Updated: 28/Dec/22  Resolved: 06/Oct/22

Status: Closed
Project: ui-courses
Components: None
Affects versions: None
Fix versions: 5.2.0

Type: Bug Priority: P3
Reporter: Molly Driscoll Assignee: Charlotte Whitt
Resolution: Done Votes: 0
Labels: support
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Attachments: PNG File Screenshot 2022-09-06 at 18.24.19.png     PNG File Screenshot 2022-09-06 at 18.25.04.png    
Issue links:
Relates
relates to CIRCSTORE-353 empty request.status causes wacky @fo... Closed
Sprint:
Development Team: Thor
Release: Morning Glory (R2 2022) Bug Fix
Affected Institution:
!!!ALL!!!, MI State University/Library of Michigan
Tester Assignee: Charlotte Whitt
RCA Group: Implementation coding issue

 Description   

Overview: Michigan State has uncovered an issue when editing notes within the Courses app in FOLIO. I was able to recreate this behavior in Lotus Bugfest.

Steps to Reproduce:

  1. Log into https://bugfest-lotus.int.aws.folio.org/cr/courses?sort=name as a user with admin permissions.
  2. Open a course record.
  3. In the Notes section, click 'New".
  4. In Note type, select 'Course Reserves' 
  5. Enter at least a title, then save.
  6. Click on the Edit option beneath the note.
    1. Note: this page still has a courses endpoint in the URL (example: https://bugfest-lotus.int.aws.folio.org/cr/courses/notes/fb9e0eb9-329f-4161-9e31-48b4eb5b8f48/edit
    2. However, this has the 'Display note as pop-up' options, which should only be available in Users notes.
  7. Click 'Cancel'.
  8. Click 'Close without saving'
  9. On the Course screen, click on the note (not the edit option, just the note).
    1. This will open the note in full screen.
    2. Click Actions > Edit.

Expected Results: The edit screen should appear with no pop-up option.
Actual Results: The URL reverts to a /users endpoint (example: https://bugfest-lotus.int.aws.folio.org/users/notes/fb9e0eb9-329f-4161-9e31-48b4eb5b8f48/edit and a UI error appears

Additional Information: Error details:

URL: https://bugfest-lotus.int.aws.folio.org/users/notes/fb9e0eb9-329f-4161-9e31-48b4eb5b8f48/edit

Error: Error: [@formatjs/intl] An `id` must be provided to format a message. You can either:
1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)
or [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR
2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)
to autofix this issue

Stack: 1.Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)
or[@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR
2.Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)
toautofix this issue
at n (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:53785)
at h (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:14735596)
at B (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:14742583)
at s (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:14734360)
at aa (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:14623454)
at Ws (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:14675503)
at Ec (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:14662777)
at Pc (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:14662705)
at Sc (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:14662568)
at mc (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:14659555)

at s (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:14734198)
at li
at ul
at h (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9203468)
at u (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:10706208)
at div
at div
at section
at E (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9019108)
at u (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9029078)
at div
at u (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9033096)
at f (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9023583)
at Wrappedf(withAccordionStatus)
at div
at form
at div
at section
at c (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9343467)
at m (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9381850)
at div
at R (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9361122)
at u (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9368124)
at m (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9381850)
at j (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:14698865)
at x (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:10719098)
at t (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9612418)
at h
at a (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9615879)
at s (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9590060)
at s (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:14734198)
at s (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:10642177)
at i (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9798258)
at y (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9557639)
at m (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:14819383)
at u (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9988006)
at s (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9590060)
at a (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:11763983)
at t (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:14843992)
at d (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9610913)
at t (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:14846009)
at t (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:10296443)
at t (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:10313756)
at HotKeys-t
at a (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9095024)
at t (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:10296443)
at t (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:10313756)
at HotKeys-t
at c (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9092390)
at v (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:11955388)
at t (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9612418)
at h
at a (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9615879)
at s (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9590060)
at a (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9662952)
at ic (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9804258)
at div
at u (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9600676)
at a (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9803781)
at t (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:14843992)
at Cc (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9810085)
at t (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:14846009)
at main
at pd (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9857897)
at a (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9820361)
at div
at ru (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9818496)
at s (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9817271)
at u (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9607520)
at r (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:14846546)
at t (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:14840491)
at l (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:14817433)
at t (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:10296443)
at t (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:10313756)
at HotKeys-t
at t (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9612418)
at h
at a (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9615879)
at s (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9590060)
at a (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9813913)
at injectIntl(a)
at a (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9953174)
at t (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:14745006)
at c (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:14798828)
at Pt (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9656259)
at a (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9662952)
at c (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9958840)
at u (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9607520)
at m (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:14819383)
at a (https://bugfest-lotus.int.aws.folio.org/20220615-145733/bundle.aa1944de93c7d78a7726.js:2:9966021)

URL: Was testing on this course: https://bugfest-lotus.int.aws.folio.org/cr/courses/3d80c287-65fa-49f1-b95d-f6d91ea5d9dd?sort=name
Interested parties: Erin Weller 



 Comments   
Comment by Ann-Marie Breaux (Inactive) [ 24/Jun/22 ]

Hi Charlotte Whitt Here's another courses one with no dev team. Per your request, I won't assign to Thor. Could you review and decide next steps? Thank you!

Comment by Zak Burke [ 01/Jul/22 ]

We are facing a similar bug in ui-requests that we've tracked down to the line

<FormattedMessage id={requestStatusesTranslations[rq.status]} />,

in RequestsRoute. If rq.status is empty or if the assigned status isn't present in that array this effectively results in

<FormattedMessage id={null} />,

which causes the error described here:

[@formatjs/intl] An `id` must be provided to format a message.

Comment by Zak Burke [ 01/Jul/22 ]

Specifically I'd look at

./src/components/Courses.js:165:            <FormattedMessage id={hideOrShowMessageId}>
./src/components/Reserves.js:142:            <FormattedMessage id={hideOrShowMessageId}>

in case hideOrShowMessageId can be null.

Comment by Ann-Marie Breaux (Inactive) [ 04/Jul/22 ]

Hi Charlotte Whitt If your preference is for these Course Reserves bugs not to be handled by Thor, is it OK for me to assign Dev Team = Other? That will at least drop them out of the search results for unassigned bugs. Thank you!

Comment by Anya [ 11/Jul/22 ]

Support: Charlotte Whitt - bringing this to your attention. 

Comment by Zak Burke [ 17/Jul/22 ]

Molly Driscoll, it's worth noting there is a simple workaround, which is to click the note's "Edit" link on the course-details pane; this bug only presents when you click the note's row (to show the note-details full-screen) and then use the "Actions" menu to access "Edit". Previously, this bug reproduced in snapshot if you took the non-workaround approach to editing a course note (i.e. click its row, then "Actions" menu, then "Edit"). Thus, you can now test the fix there too.

Charlotte Whitt, no MG release has been published for ui-courses even though there have been numerous translation updates and at least one bug fix ( UICR-157 Closed ) in addition to this one since v5.1.0 was published. Hence, I set the release to "Morning Glory R2 2022", but if no MG release is planned then please change it to Nolana instead.

Comment by Molly Driscoll [ 18/Jul/22 ]

Zak Burke thanks so much for working on this! I had noted this workaround in the reproduction steps above (see step 6 and sub-bullets), but that workaround was still presenting the pop-up options, which should only be present on a non-user note.

Comment by Charlotte Whitt [ 06/Sep/22 ]

Support SIG: Molly Driscoll - I tested this in FOLIO Snapshot, and maybe we can get this work in for Morning Glory Bugfix work.

To me this looks fine, but I do still see the Display note as a pop-up in the Check out app as an option. And I read your description as this should not be possible. Can you confirm what's expected:

Comment by Molly Driscoll [ 06/Sep/22 ]

Charlotte Whitt thank you for following up! Yes, the error appears to be resolved, but the pop-up selection option should only be present on a note added to the Users app. The expected behavior is reflected in this note, added to a request in the Requests app: https://folio-snapshot.dev.folio.org/requests/notes/8e49dee4-0459-4fde-bd71-ed22eb1f63e0

 

If you edit the note, the pop-up options do not appear. Thanks so much!

Comment by Charlotte Whitt [ 19/Sep/22 ]

Support SIG: Zak Burke will this work still be solved for Morning Glory Bugfix?

Comment by Zak Burke [ 19/Sep/22 ]

Charlotte Whitt, no, the PR was not included in a Morning Glory release. Version 5.1.0 was published for Lotus, and version 5.2.0 appears to be targeted at Nolana since it includes support for an Okapi interface that won't be available until Nolana (see PR 203 and UIPCIR-43 Closed ) and has not been incorporated into the Morning Glory branch platform-complete (presently rc-R2-2022, which I expect to change to R2-2022, so that link may break). 

Mike Taylor, can you clarify the target of the 5.2.0 release, Morning Glory vs Nolana? If Morning Glory, I worry that we are setting ourselves up for a failure similar to FOLIO-3547 Closed , though the situation here is slightly different so this is just speculation. 

Comment by Mike Taylor [ 20/Sep/22 ]

Zak Burke I had not role in deciding what flower release a given ui-courses was intended for. But:

version 5.2.0 appears to be targeted at Nolana since it includes support for an Okapi interface that won't be available until Nolana (see PR 203 and UIPCIR-43)

That seems wrong to me, as the PR you linked only adds support for v10.0 of the item-storage interface, and does not remove support for v9.0 and earlier. Unless I am missing something there is no reason why ui-courses 5.2.0 can't be in MG.
 

Comment by Zak Burke [ 20/Sep/22 ]

Mike Taylor , I don't know how Okapi does version resolution. The problem we had with yarn in FOLIO-3547 Closed is that loose dependencies in some repos could cause newer versions of some modules to be pulled into the build even though we did not want them. Is the same danger present here, i.e. that by advertising "I accept item-storage 7.1 - 10" it'll pull the module providing v10 into the build even though we only want a module providing v9. 

If that's not a concern, then you're right that ui-courses 5.2.0 is acceptable for Morning Glory. 

Comment by Mike Taylor [ 20/Sep/22 ]

I don't know the details of how Okapi does interface-version dependency resolution, but I do know three things. (1) Adam Dickmeiss is super-smart and I trust him to get it right. (2) Okapi has done the right think since we started telling it that ui-courses needed item-storage 7.1 or 8.0 back in January 2020, and it's kept doing it right as we've added 9.0 and more recently 10.0. (3) people need to stop making backwards-incompatible changes in their APIs!

I am confident that ui-courses v5.2.0 will be fine in MG, and am surprised it's not already included.

Comment by Adam Dickmeiss [ 20/Sep/22 ]

It should be OK to add an interface "range" which includes interface versions from a future FOLIO release. The module is released later and it is known that 10 or whatever is ok even for a module developed way earlier. FOLIO-3547 Closed mentioned.. Is that related to OKAPI? If so, I can't see the relation.

Comment by Zak Burke [ 20/Sep/22 ]

Adam Dickmeiss , FOLIO-3547 Closed is not related to Okapi, but it describes a problem where some modules in a build state dependencies like "I'm compatible with v9 or v10" and others state "I'm compatible with v9" and yarn says, "Great, I'll put v10 in in the shared lib directory and make private copies of v9 for everybody who can't handle v10". If other shared libs expect the opposite to happen, i.e. for v9 to be in the shared lib directory and v10 to be used locally, this leads to the conflicts described there, i.e. Lotus libraries leaking into a Kiwi build, or Juniper libraries leaking into an Iris build.

Anyway, as Mike has already pointed out, we've already seen that Okapi does The Right Thing here, and now the only mystery is why ui-courses v5.2.0 isn't being pulled into MG builds as expected. Mike Taylor, are you on top of that? We certainly don't need three people working on that issue, but I want to make sure at least one is  

Comment by Mike Taylor [ 20/Sep/22 ]

Zak Burke I had a feeling it was your Yarn Being Dumb experience that were spooking you here Okapi won't be doing anything like that, I am quite sure.

I have no idea why 5.2.0 isn't in MG. I guess John Malconian would be the person to fix that?

Comment by John Malconian [ 20/Sep/22 ]

Mike Taylor fyi. https://github.com/folio-org/platform-complete/pull/2167

Comment by Mike Taylor [ 20/Sep/22 ]

Thanks, John Malconian!

Comment by Khalilah Gambrell [ 26/Sep/22 ]

Hey Charlotte Whitt. Did this issue make the Morning Glory release?

Comment by Zak Burke [ 06/Oct/22 ]

Khalilah Gambrell, yes, this made it into v5.2.0, which is part of Morning Glory

Comment by Khalilah Gambrell [ 06/Oct/22 ]

Thank you Zak Burke 

Comment by Molly Driscoll [ 28/Dec/22 ]

Charlotte Whitt happy holidays! Just reviewing my notes for courses training and came back to this bug. Should I file a separate bug report to have the pop-up options removed from the notes on the courses record? The issue persists in Nolana. It doesn't appear to be causing errors any longer, but may be misleading to users since it's not functional outside of the Users app. Please let me know how you would like to handle it and I'm happy to follow your guidance.

Generated at Thu Feb 08 22:22:42 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.