CDR Tickets

Issue Number 5027
Summary [DIS] Drug Reference Block - Support for Archiving Old Blog Post Links
Created 2021-09-08 16:47:27
Issue Type Improvement
Submitted By Juthe, Robin (NIH/NCI) [E]
Assigned To Kline, Bob (NIH/NCI) [C]
Status Reopened
Resolved
Resolution
Path /home/bkline/backups/jira/ocecdr/issue.298204
Description

We'd like to discuss some potential options for technical support to assist in archiving old links in the DIS (usually to older blog posts). These posts are stored in Drug Reference blocks. Christina will be attending tomorrow's CDR/EBMS meeting so we thought it may be beneficial to talk through this issue a bit at that time. 

For background, my understanding is that there is a manual process to go back into DIS periodically and remove old blog post links. Could there be a programmatic solution to this? i.e., automatically archiving/deleting Drug Reference blocks of a certain type and age? OR a report to assist in curating this information? Let's discuss.

Comment entered 2021-09-08 16:49:18 by Juthe, Robin (NIH/NCI) [E]

, , I added this ticket to kick off some discussion in our meeting tomorrow (time permitting). This would be for the Ohm release most likely so if we don't have time tomorrow, we'll find another meeting in which to discuss this. Thanks, all!

Comment entered 2021-09-08 18:28:22 by Kline, Bob (NIH/NCI) [C]

The first steps toward programmatically removing old blog post links would be

  • add an attribute identifying which are blog post links

  • add an attribute identifying either the date of the post or the date the link was added

  • decide whether we're removing links to old blob posts or old links to blob posts

  • populate the attributes

Comment entered 2021-09-22 13:36:24 by Juthe, Robin (NIH/NCI) [E]

We discussed this some more and I will be adding separate tickets for the following components of this request:

  • generating a spreadsheet of existing Drug Reference blocks with the NCI Type

  • schema change to add a TemporaryLink attribute on the DrugReferenceType element

  • global change to populate the TemporaryLink attribute in selected documents (the spreadsheet will be helpful in identifying the criteria for this)

We'll use this ticket to address the programmatic removal of DrugReference blocks for links flagged as temporary with the new attribute, but this change will be dependent upon the new tickets listed above.

Comment entered 2022-01-21 16:55:16 by Kline, Bob (NIH/NCI) [C]

It's not clear from the comments above whether the "programmatic solution" mentioned above is to be

  1. an admin tool to be invoked on demand

  2. a scheduled job

  3. a report

We've already got a report implemented, and having a report is mentioned above as one of the possible "programmatic solutions" so perhaps there's nothing to do for this ticket. Please advise.

Comment entered 2022-01-21 17:11:43 by Juthe, Robin (NIH/NCI) [E]

We were hoping this could be an automated removal of the links flagged as temporary that reach their expiration date (3 years from the date stored in the CDR). The report is simply to identify which ones are scheduled to be removed in the following month so that we can go in and remove the temporary link element from any that should not be removed. Please let me know the expected LOE though; if this is significant then we may have to work with the report initially and plan the programmatic solution down the road. Thanks.

Comment entered 2022-01-21 17:25:13 by Kline, Bob (NIH/NCI) [C]

"Automated" as in "when I invoke the removal program the software takes care of finding and removing the links"? Or "automated" as in "the software removes the links while I'm sleeping"?

Comment entered 2022-01-21 17:38:00 by Juthe, Robin (NIH/NCI) [E]

Please provide an estimate for the latter. 🙂

Comment entered 2022-01-21 18:03:49 by Kline, Bob (NIH/NCI) [C]

I can get it done while you're sleeping. 🙂

Comment entered 2022-01-21 18:04:58 by Kline, Bob (NIH/NCI) [C]

Or — if you want a serious answer — I can get it done in a day or less.

Comment entered 2022-01-24 08:58:11 by Kline, Bob (NIH/NCI) [C]

I modified the title to reflect the clarified requirements (we're deleting the links, not the blog posts).

Comment entered 2022-01-24 17:44:42 by Kline, Bob (NIH/NCI) [C]

Scheduled job implemented and installed on CDR DEV.

Comment entered 2022-02-01 10:41:06 by Kline, Bob (NIH/NCI) [C]

The scheduled job ran on DEV this morning at 8am, and appeared to do the right thing. Here's the relevant portion of CDR496239 before the job ran:

and here's what it looks like now:

Comment entered 2022-06-10 14:54:16 by Osei-Poku, William (NIH/NCI) [C]

Hi   Could you please manually trigger the expiring links notification email? Thanks!

Comment entered 2022-06-10 15:16:21 by Kline, Bob (NIH/NCI) [C]

Done.

Comment entered 2022-06-10 16:17:15 by Osei-Poku, William (NIH/NCI) [C]

Verified on DEV. Thanks!

Comment entered 2022-07-07 15:39:19 by Osei-Poku, William (NIH/NCI) [C]

Verified on QA. Thanks!

Comment entered 2024-09-20 12:29:19 by Kline, Bob (NIH/NCI) [C]

I just noticed that the scheduled job to prune the expired links is running on DEV but not on the production server, which is running the scheduled job to report which links will be removed, but not doing the actual work to remove those links. I've reopened this ticket so we can get confirmation that both scheduled jobs should be running in production, or if that's not true, capture the decision to change the requirements in this ticket.

Comment entered 2024-10-03 14:01:24 by Juthe, Robin (NIH/NCI) [E]

Thanks, . I can't think of a reason why this shouldn't be running on PROD, so I'm glad you've noticed that so we can get it fixed.

Comment entered 2024-10-04 12:13:01 by Kline, Bob (NIH/NCI) [C]

I have installed the job to run on CDR PROD at 8am on the first of every month. I ran the job manually, but there weren't any documents to process, so either the pruning is being done manually, or the values used by this script aren't being entered (or both).

Attachments
File Name Posted User
image-2022-02-01-10-36-13-255.png 2022-02-01 10:36:13 Kline, Bob (NIH/NCI) [C]
image-2022-02-01-10-40-48-945.png 2022-02-01 10:40:49 Kline, Bob (NIH/NCI) [C]

Elapsed: 0:00:00.001601