STORY: Duplicate Work

Description

USE CASE #2 UPDATED - 1 Oct 2024

Cataloger needs the ability to create a new work based on the properties of an existing work. For example, this feature may be invoked for translations, which are treated as their own works and not as instances of a single work. Adding this duplication option will save time, so that the cataloger doesn’t have to start from scratch.

With ‘Duplicate Instance’ completed, https://folio-org.atlassian.net/browse/UILD-333, the approach will for ‘Duplicate Work’ will be consistent.

A new Action drop down menu will be displayed in the Work entity when the cataloger has entered Work edit mode.

When ‘Duplicate’ is selected, the application presents the resource description in Work edit mode. Whereas the ‘New Work’ function displays a blank workform, ‘Duplicate’ populates the Work workform with the same component values from the original work.

To differentiate the duplicated work resource description from the original work,

  • the header for the screen is modified to ‘Duplicate work' from 'Edit work’

  • the value for the Main title in the Title information component is pre-pended with ‘(DUPLICATE WORK)’

Once the workform is populated, the cataloger can edit the work as normal, e.g. saving, cancelling, toggling with the instance entity etc.

1. Default state - Work edit mode

GIVEN that a cataloger is in Work edit mode

WHEN the cataloger selects ‘Duplicate’ from the Work Action drop down menu

THEN the Work edit mode is presented

AND the selected work is displayed in the left panel in edit mode

AND the instance workform is displayed in read only mode in the right panel

AND the components of the Work entity are prepopulated from the values of the original Work

AND the header states ‘Duplicate work’

AND the Main Title field in the Title information component displays the value from the original work, pre-pended with ‘(DUPLICATE WORK)’

AND the ‘Cancel,' ‘Save & close,’ and ‘Save & keep editing’ buttons are all enabled by default

AND the ‘Add instance’ button is disabled by default

2. Save & keep editing

GIVEN scenario 1

WHEN the cataloger selects ‘Save & keep editing’

THEN the duplicated work is saved to the back end

AND the cataloger remains in Work edit mode

AND the header changes from ‘Duplicate work’ to ‘Edit work’

AND the ‘Save & close,’ and ‘Save & keep editing’ buttons are disabled still enabled

AND the ‘Cancel,' and ‘Add instance’ buttons are enabled

3. Save & close

GIVEN scenario 1

WHEN the cataloger selects ‘Save & close’

THEN the duplicated work is saved to the back end

AND the screen returns to the search results page

AND the newly added work will display with a refresh of the query

4. Add instance

GIVEN scenario 2

WHEN the cataloger selects ‘Add instance’

THEN the cataloger enters edit Instance mode

AND the (newly) saved Work is displayed in read only mode in the left panel

AND a blank workform is displayed in the right panel

AND the ‘Save & close’ and ‘Save & keep editing’ buttons are disabled

AND the ‘Cancel’ and ‘Edit work’ buttons are enabled

5. Cancel - Unsaved changes prompt

GIVEN scenario 1

AND no changes for the duplicate work have been saved to the back end

WHEN the cataloger selects ‘Cancel’

THEN a prompt is presented to the user asking if the user wants to leave edit mode without saving changes

6. Cancel - ‘Yes’ Leave edit mode without saving changes

GIVEN scenario 5

WHEN the cataloger chooses to exit without making changes ('Yes' - close w/o saving changes)

THEN the warning prompt no longer displays

AND the duplicated work is not saved

AND the cataloger returns to search results screen

AND the work is not discoverable through the Linked data editor

7. Cancel - ‘No’ Do not leave edit mode

GIVEN scenario 5

WHEN the cataloger chooses to stay in edit mode ('No' - do not close edit mode)

THEN the warning prompt no longer displays

AND the cataloger returns to edit mode

AND the ‘Cancel’ and ‘Save & close’ and ‘Save & keep editing’ buttons are all enabled

AND the ‘Add instance’ button is disabled

NOTE: Clicking the 'X' icon is equivalent to the Cancel button. Repeat test use cases for 5, 6, and 7 accordingly.

Environment

None

Potential Workaround

None

Attachments

6
  • 10 Oct 2024, 10:02 AM
  • 10 Oct 2024, 10:02 AM
  • 10 Oct 2024, 10:02 AM
  • 10 Oct 2024, 10:02 AM
  • 10 Oct 2024, 10:02 AM
  • 10 Oct 2024, 10:02 AM

Checklist

hide

Activity

Show:

Doug Loynes October 10, 2024 at 3:40 PM
Edited

- after talking with Yury, the behavior currently in the applciation is consistent with how duplicate instance works. And - for that reason - we’ll keep the behavior as is without change to maintain consistency

Doug Loynes October 10, 2024 at 1:46 PM

- this looks very good, Nikolai. But wondering about test cases 5, 6, and 7. I pulled up a title in Work edit mode, and selected the ‘Duplicate’ option from the Actions drop down. After the duplicated work is presented in the UI, I then selected the ‘Cancel’ button. No changes were made at this point to the duplicated work, and I still expected to see the warning prompt (“[P]rompt . . . asking if the user wants to leave edit mode without saving changes”) to be displayed. Instead, selecting ‘Cancel’ returns the cataloger to the search results.

Yury Barsukou October 10, 2024 at 10:02 AM

Tested on 262 build, ok for me. Cases and evidences added

Doug Loynes October 1, 2024 at 12:31 PM

At 1 Oct 2024 Stand Up, asked about details of use case #2 and whether the ‘Save & close’ and ‘Save & keep editing’ buttons should - in fact - be disabled. Doug looked at default functionality, and both buttons are actually enabled persistently after a save has been made. Use case 2 updated accordingly. FYI -

Done

Details

Assignee

Reporter

Labels

Priority

Story Points

Sprint

Development Team

Citation

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created February 27, 2024 at 8:15 PM
Updated March 4, 2025 at 7:22 PM
Resolved October 10, 2024 at 3:40 PM
TestRail: Cases
TestRail: Runs

Flag notifications