Skip to content

LIMS-1648: Only display auto proc program attachment files where deleted column is 0#921

Merged
ndg63276 merged 19 commits intopre-release/2025-R2.5from
improvement/LIMS-1648/Only-display-AutoProcProgramAttachement-files-where-deleted-column-is-0
May 6, 2025
Merged

LIMS-1648: Only display auto proc program attachment files where deleted column is 0#921
ndg63276 merged 19 commits intopre-release/2025-R2.5from
improvement/LIMS-1648/Only-display-AutoProcProgramAttachement-files-where-deleted-column-is-0

Conversation

@RichB-DLS
Copy link
Collaborator

@RichB-DLS RichB-DLS commented Mar 26, 2025

Ticket 1648 - Only display AutoProcProgramAttachement files where deleted column is 0

JIRA ticket: TICKET-1648
and by extension TICKET-1685

Summary:

Due to future plans for the removal of files from the fs after a certain period, Synchweb should use the BLSession.purgedProcessedData column to assess whether the files for a session have been removed or remain available to download. If a file has been removed from the FS it should present an iCat Link pointing (for the time being) at the project root in iCat. Note that industry proposals will always show 'Deleted' instead.
This iCat link should be amendable in the config.php file.

The exception are any files registered with APPAttachment.filePath containing the string listed in config.php $visit_persist_storage_dir_segment. These are never deleted and should therefore should display their download button even when the visit/BLSession is registered as "purged". 

Changes:

  • !! CONFIG UPDATE !! Added $visit_persist_storage_dir_segment && $icat_base_url to config.php
  • Added the BLSession.purgedProcessedData value to each DC retrieved from api request.
  • Updated Attachments dialog to reflect the availability of the file, showing either download buttons, iCat Link or "Removed" as required.
  • non-provision of icat_base_url will cause any icatLinks to behave as per industry links, showing "removed" and logging a warning to the console
  • Updated the Attachments dialog heading with the text "Note: Removed Attachments (non-industrial) may be reached via the iCat Link."

To test:

  • Update the values in config.php for $icat_base_url & $visit_persist_storage_dir_segment.

Reference Example:

  • Open Synchweb to a session on a proposal where BLSESSION.purgedProcessedData === "0"
  • Open the Auto or Downstream processing section of a DC & click the "Logs & Files" btn.
  • The "Download" & "View" buttons should be displayed for each item.

Purged Session setup:

  • Open Synchweb to an [industry / non-industry] session where BLSESSION.purgedProcessedData !== "0"
  • Open the Auto or Downstream processing section of a DC & click the "Logs & Files" btn.

Non-industry proposal:

  • The "Download", "View" or "CCP4 upload" buttons should all be replaced with "iCat" btns linking to $icat_base_url/browse/proposal/PROPOSAL_ID in a new tab.
  • Any item containing the persistent storage segment string specified at $visit_persist_storage_dir_segment in config.php should retain its download/view buttons.

industry proposal:

  • The "Download" & "View" buttons should all be replaced with the word "Deleted".
  • Any item containing the persistent storage segment string specified at $visit_persist_storage_dir_segment in config.php should retain its download/view buttons.

Config.php Amendments

iCatURL config (non-industry ONLY):

  • if the $icat_base_url is not set in config.php then nothing should be shown.
  • A warning will also be logged to the console when opening the dialog.

persistent storage (BOTH):

  • if the $visit_persist_storage_dir_segment is not set in config.php and a session has been purged then all attachments will show removed OR icat link

@RichB-DLS RichB-DLS marked this pull request as ready for review April 24, 2025 12:17
@RichB-DLS RichB-DLS requested a review from ndg63276 April 24, 2025 12:17
@ndg63276 ndg63276 changed the title Improvement/lims 1648/only display auto proc program attachement files where deleted column is 0 LIMS-1648: Only display auto proc program attachment files where deleted column is 0 Apr 24, 2025
Copy link
Collaborator

@ndg63276 ndg63276 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple of nitpicks, but otherwise looks good, and it all seems to work well!

@RichB-DLS RichB-DLS self-assigned this Apr 29, 2025
Copy link
Collaborator

@ndg63276 ndg63276 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks Rich!

@ndg63276 ndg63276 changed the base branch from master to pre-release/2025-R2.5 May 6, 2025 09:42
@ndg63276 ndg63276 merged commit 8fa2c48 into pre-release/2025-R2.5 May 6, 2025
2 checks passed
@ndg63276 ndg63276 deleted the improvement/LIMS-1648/Only-display-AutoProcProgramAttachement-files-where-deleted-column-is-0 branch May 6, 2025 09:44
ndg63276 added a commit that referenced this pull request May 27, 2025
* LIMS-1648: Only display auto proc program attachment files where deleted column is 0 (#921)

* LIMS-1400: Remove logon stats page (#916)

* LIMS-1702: Rename Archive button to Download Zip (#930)

* LIMS-1719: Fix data collection comments button (#931)

* LIMS-1694: Allow beamlines to disable user assignment of pucks (#925)

* LIMS-1687: Remove references to GridInfo.pixelsPerMicronX/Y (#926)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants