Issue Number | 424 |
---|---|
Summary | [Calendar] Problem linking to a replaced article from an agenda |
Created | 2017-03-16 15:43:19 |
Issue Type | Bug |
Submitted By | Juthe, Robin (NIH/NCI) [E] |
Assigned To | Kline, Bob (NIH/NCI) [C] |
Status | Closed |
Resolved | 2017-06-29 09:32:42 |
Resolution | Fixed |
Path | /home/bkline/backups/jira/oceebms/issue.204868 |
We are now importing many citations before they actually appear in the journal and have a "pretty" copy. Therefore, we may upload the author's manuscript file and subsequently replace the PDF with the journal article when it becomes available. We always prefer to use the journal article, but when we create a link to the article from a meeting agenda, the system sometimes creates a link to the author manuscript version instead.
I have a few theories (the article-PDF link is permanent? the file names of both uploaded files are the same?), but I'd like to discuss what we can do to prevent this from happening in the future. One current work-around is to upload the correct PDF on the upload document page (as we would do with summaries) and create a link to the file name rather than to the citation record.
Can you provide some examples of the problem?
Here's an example on DEV:
The following article (PMID: 26836586) is linked to from the 6/12/17 calendar event "Test article link" that I just created while logged in as Test Board Manager.
I originally uploaded the author manuscript (a preliminary version of the article) to the EBMS and subsequently replaced it with the actual journal article. Both files have the same file name since this is in accordance with our style (author last name journal year PMID). However, the link in the calendar event is still pointing to the author manuscript.
I believe I have this fixed. Test like crazy!
This is not working as expected. For the same article above (PMID:26836586), I first uploaded the author manuscript, then added a link to the article from a meeting agenda, and then went back to the full citation page and replaced the full-text PDF with the journal article. However, on the meeting agenda, the link still pointed to the author manuscript. I expected this link to now point to the updated PDF, since that happens elsewhere in the system - such as on the search results page, for example. I went back to the meeting agenda and removed and replaced the link, at which point it then went to the updated PDF. I didn't expect to have to go back and replace any links to the article though after the PDF had been updated.
I expected this link to now point to the updated PDF, since that happens elsewhere in the system ....
The other parts of the system were implemented directly by our own code, which is what made it possible to control how the links to the full text of the article were built when you brought up the page. The calendar event pages, however, were built using Drupal's built-in tools for creating and editing Drupal nodes. Since our code isn't dynamically building the links tucked away in the rich text, you need to replace those fixed links yourself using the WYSIWYG editor wrapped around the Drupal rich text fields. It's true that the mechanism for doing that was broken, and I've fixed that, but the only options I can think of for doing what you expected are
Rip out the calendar system and build a home-made replacement. Definitely possible. (100 story points).
Implement a plugin that would be similar to the one you use to link to files now, and instead of creating URLs pointing to uploaded files have them point to a new URL which carries the article ID and fetches the PDF for the full text. Might be possible. (40-60 story points).
OK, I'll think we'll see how much of a problem this is (I think it's pretty rare) and then determine whether we should investigate either of those solutions. Thanks! I'll consider this verified on QA then.
There is a third path, which is a much less expensive but also slightly less convenient (from the board manager's point of view) variation on #2 above. That would be for me to implement the new URL which that solution mentions, but you would have to enter the URL yourself. It would only be around 5 story points. You would:
select the text you want to link from in the agenda
click the link icon
select URL as the Link Type
select <other> as the Protocol
enter /fetch-full-text/123456 in the URL field (where 123456 is the EBMS article ID)
click OK
I can knock together the implementation for the URL on DEV if you want to see it in action, and you would be able to test PDF replacement.
Thanks, Bob. This is worth considering, although I think we've all grown so accustomed to linking via the article title (and it's readily available in the meeting agenda for copying/pasting, while the EBMS ID is not) that it would be more of an inconvenience than going back and replacing the links that need updating. But, we'll see how things go. I'm marking this for consideration in the next release.
If we decide to implement something along these lines in a future release, we could use the PMID instead of the EBMS ID if that's more convenient.
Thanks. It's good to know that's an option!
We have not had an occasion to test this one yet on PROD. We'll reopen if it becomes an issue.
Elapsed: 0:00:00.000834