Feature #12115

Calculate accumulated dates

Added by Mike Cantelon about 4 years ago. Updated about 3 years ago.

Status:VerifiedStart date:03/29/2018
Priority:MediumDue date:
Assignee:Dan Gillean% Done:


Category:Information objectEstimated time:92.00 hours
Target version:Release 2.5.0
Google Code Legacy ID: Tested version:
Sponsored:Yes Requires documentation:No


This new feature enhancement will enable an archivist to execute a job that will calculate and set the minimum and maximum event dates of a parent description, based on the dates of all descendants of the target description. When working with large collections this will allow the archivist to find the correct start and end date for the collection without having to check the start and end dates for all lower levels of description.

Proposed functionality
  • An archivist with edit permissions on an archival description that has descendants can see a link to "Calculate dates". Hovering over this link, in the right-hand context menu, will include help-text that elaborates: "calculate date ranges from lower levels".
  • When the archivist clicks the "Calculate dates" link, AtoM displays a confirmation page with the following elements:
    • A warning that the selected date range for the specified archival description will be overwritten.
    • A warning that while the date range update is running, the selected description should not be edited. The archivist can check the job page for the status of the update job.
    • If there are multiple date ranges recorded for the selected description, show a list of all date ranges with a radio button to select which date range should be updated.
    • A button to continue with the update of the selected date range.
    • A button to cancel the update.
  • The archivist clicks "Continue" to update the selected date range.
  • AtoM launches a background job to check the dates for all descendants descriptions to calculate the minimum start date and maximum end date of the date type (e.g. creation, accumulation) matching the selected date range.
    • Note: A null value for an end date should be interpreted as an open-ended date range (e.g. "1990 - ") and a null value should be set for the accumulated range as well.
  • The background job updates the selected date range to match the calculated minimum and maximum dates.
  • The free-text "display date" field will be left as is - it will not be updated by the date accumulation script. This allows an archivist to use typographical symbols and other local conventions to indicate approximation/uncertainty as needed.
  • On the descriptions view page, display a "Last run" note near the "Calculate dates" button.
    • If the date calculation script has never been run for the current description show a value of "Never".
    • If the calculation script is running for the current description, show a value of "In progress".
    • If the calculation script has run to completion for the current description, show the date and time (server time) of completion of the most recent run.
  • The "Calculate dates" button will only be shown on the description view page, not on the edit page. This is to avoid conflicts with edits made manually to the description and changes made by the date accumulation job. It will be placed in the right-hand context menu, and will only be visible to authenticated users.
  • If the selected description has multiple date ranges, only the date range selected on the confirmation page will be updated; the archivist can manually remove or update other date ranges if desired, or re-run the process to update a different date range.
  • The date type (e.g. creation, accumulation, etc) for the selected date range will be used exclusively for calculating the minimum and maximum dates. All other date types will be ignored in the calculation.
  • The "Last run" status indicator will show "In progress" indefinitely if the calculation script exits unexpectedly and does not properly update the jobs database. Some examples where this may happen are if the script runs out of memory, or if the database connection is lost. An administrator can reset the “In progress” status by deleting the job from the job management page.
  • The update job will not update dates for parents of the selected description. AtoM does show a warning message (visible to authenticated users only) if the dates for a description are are not consistent with higher levels of description.

Development tasks

  1. Add link to “calculate date ranges from lower levels” on "View Archival Description" page
  2. Add new job launch page linked to from above link
  3. Add new background job to update record start and end dates based on descendant dates
  4. Display "last run" date and time on the "View Archival Description" page

Related issues

Related to Access to Memory (AtoM) - Bug #13407: Archival description "Calculate dates" button causes page... Verified 08/26/2020


#2 Updated by Dan Gillean about 4 years ago

  • Description updated (diff)
  • Sponsored changed from No to Yes
  • Requires documentation set to Yes

#3 Updated by Mike Cantelon about 4 years ago

  • Status changed from New to Code Review
  • Assignee changed from Mike Cantelon to Nick Wilkinson

#4 Updated by Mike Cantelon about 4 years ago

  • Status changed from Code Review to New
  • Assignee changed from Nick Wilkinson to Mike Cantelon

#5 Updated by Mike Cantelon almost 4 years ago

  • Status changed from New to QA/Review
  • Assignee changed from Mike Cantelon to Michelle Curran

#7 Updated by Dan Gillean about 3 years ago

  • Assignee changed from Michelle Curran to Dan Gillean

#8 Updated by Dan Gillean about 3 years ago

  • Status changed from QA/Review to Verified

#9 Updated by Corinne Rogers about 3 years ago

  • Requires documentation changed from Yes to No

#10 Updated by David Juhasz over 1 year ago

  • Related to Bug #13407: Archival description "Calculate dates" button causes page to load very slowly added

Also available in: Atom PDF