Uploaded image for project: 'mod-inventory-storage'
  1. mod-inventory-storage
  2. MODINVSTOR-724

Populate publication year field based on dateOfPublication field

    XMLWordPrintable

Details

    • Story
    • Status: Closed (View Workflow)
    • P3
    • Resolution: Done
    • None
    • 21.0.0
    • Falcon Sprint 114, Falcon Sprint 115
    • 5
    • Falcon

    Description

      Purpose/Overview:
      In order to eliminate the need for manual entry of same or similar data in multiple places, we need to populate publication year stored publicationPeriod.start  and publicationPeriod.end based on the data provided in the dateOfPublication data.

      Assumptions:

      • The method should not override the data that is already stored in the field in case the user decides to populate it with known data. 
      • The examples below do not attempt to cover all possible values but are based on the data from the libraries that are live with FOLIO and should cover big part of existing cases.  If the value of dateOfPublication cannot be parsed, then publicatinPeriod fields should be left empty.

      Requirements/Scope: 

      1. Examples of instance.publication array that has one dateOfPublication element provided

      dateOfPublication publicationPeriod.start publicationPeriod.end
      1990 1990 empty
      [1990] 1990 empty
      ©1990 1990 empty
      [1999?] 1999 empty
      [19uu] empty empty
      Cop 1990 1990 empty
      hafniae MCMLXXI empty empty
      [2003], ©2001 2003 empty*
      2001, 2003 2001 2003
      2001- 2003 2001 2003
      2003-2001 2003 empty*
      empty empty empty
      everything else empty empty

      *publicationPeriod.end must be after publicationPeriod.start

       

      2. Examples of instance.publication array that has more than one dateOfPublication element provided:

       first dateOfPublication element  last dateOfPublication element publicationPeriod.start publicationPeriod.end
      1990  empty 1990 empty
      [1990]  empty 1990 empty
      ©1990  empty 1990 empty
      [1999?]  empty 1999 empty
      [19uu]  empty empty empty
      Cop 1990  empty 1990 empty
      hafniae MCMLXXI  empty empty empty
      ©2001  [2003] 2001 2003
      ©2001 [2001] 2001 empty
      2001  2003 2001 2003
      2001- 2003  empty 2001 2003
      2003-2001 2003 2003 empty*
      2000-2010 2012-2020 2000 2020
      empty  1999 empty 1999

      *publicationPeriod.end must be after publicationPeriod.start 

      Approach:
      TBD by dev

      Acceptance criteria:

      • Publication year populated according to specs above
      • All other values in dateOfPublication are ignored and Publication year is empty
      • Migration scripts are provided
      • The publication year is populated on create of the instance only if specific values are not already provided

      Out of scope:

      • Data import
      • UI implementation

       

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                bohdan-suprun Bohdan Suprun
                magdaz Magda Zacharska
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases