CDR Tickets

Issue Number 5235
Summary Spanish Link ID Swap macro not showing up as usual
Created 2023-05-10 14:33:36
Issue Type Bug
Submitted By Osei-Poku, William (NIH/NCI) [C]
Assigned To Kline, Bob (NIH/NCI) [C]
Status Closed
Resolved 2023-06-30 17:51:38
Resolution Won't Fix
Path /home/bkline/backups/jira/ocecdr/issue.345578
Description

The Spanish Link ID Swap macro does appear not to be working as it should on QA. On PROD, it depends on the presence of the TranslationOf element but on QA it seems to dependent of the presence of the SummaryLanguage in order for it show up in the context menu. 

Repro Steps:

  1. On QA, retrieve any summary (CDR0000257989 has TranslationOf added already)

  2. Right-click within the summary. Spanish Link ID Swap will be missing from the context menu.

  3. Remove the TranslationOf element from the summary

  4. Change the SummaryLanguage to Spanish

  5. Right-click within the summary. Spanish Link ID Swap shows up in the context menu

Comment entered 2023-05-10 15:07:36 by Kline, Bob (NIH/NCI) [C]

I performed the first two of your repro steps (except I added the "for editing" part to the first step, since the macro isn't supposed to appear for a read-only document):

  1. On QA, retrieved CDR810430 for editing

  2. Right-clicked on the summary.

The Spanish Link ID Swap macro was not missing from the context menu.

It is true that the software looks at the SummaryLanguage element to find out if the summary is Spanish (which I assume is just as good a method as looking for the TranslationOf element), but I suspect the reason the macro didn't show up for you was that at that point you hadn't checked it out. Since the purpose of the macro is to modify the document, it's not available when the document is not modifiable.

Comment entered 2023-05-10 15:37:48 by Osei-Poku, William (NIH/NCI) [C]

Jira swallowed my comments, so I am re-writing and sending them again. 

>>>

I performed the first two of your repro steps (except I added the "for editing" part to the first step, since the macro isn't supposed to appear for a read-only document):

>>>

I should have been clearer in my repro steps. However, I assumed that the document would be checked out because in subsequent steps, the TranslationOf element needed to be added and you can add a new element unless the document is checked out. But even with a checked-out summary, the language needs to be set to Spanish for the macro to show up. 

>>>>

The Spanish Link ID Swap macro was not missing from the context menu.

>>>>

That is right, but it is because of the Summary Language instead of the TranslationOf element. However, that is not the behavior currently on PROD. 

We also use this macro to swap IDs of comprehensively revised English summaries by add the TranslationOf element and running the macro, after which the element is deleted. We can certain start changing the language instead but that will cause more serious problems if the user fails to change it back. Our preference is to keep the current behavior on PROD but if that is not possible at this time, we will get used to changing the language 😃

Comment entered 2023-05-10 15:48:11 by Osei-Poku, William (NIH/NCI) [C]

Jira swallowed my comments, so I am re-writing and sending them again.

Comment entered 2023-05-10 16:20:22 by Kline, Bob (NIH/NCI) [C]

We can certain start changing the language instead but that will cause more serious problems if the user fails to change it back.

I'm confused. Why would you want to change the SummaryLanguage element in a Spanish summary back to "English"?

Comment entered 2023-05-10 17:00:00 by Osei-Poku, William (NIH/NCI) [C]

As I mentioned in my earlier comment, we are using the ID for English comprehensively revised summaries. That is, apart from using it for the translated summary from Trados.

Comment entered 2023-05-10 18:00:18 by Kline, Bob (NIH/NCI) [C]

Well, I'm not sure how that could be any more confusing. 😛 I have no idea what a comprehensively required summary is. I was just trying to implement the code for what the original ticket (not to mention the name of the macro) said was for Spanish summaries in the most efficient way possible, since that code gets invoked every time you bring up the context menu, but I've given up on understanding this and have reimplemented the code using the less efficient approach. Installed on CDR DEV.

Comment entered 2023-06-28 14:23:59 by Kline, Bob (NIH/NCI) [C]

This needs to move up the tiers so I can get it into the master branch, otherwise it will be blown away as we make other changes to the macros. Please verify so I can install this on the other tiers.

Comment entered 2023-06-30 15:45:04 by Osei-Poku, William (NIH/NCI) [C]

Hi   Can you remind me of what triggers the macro to show up in the context menu. It looks like it is triggered by the TranslationOf element but I thought the ideas was to make the language be the trigger or indicator and that was why I created this ticket OCECDR-5258 to take care of the English ones?

Comment entered 2023-06-30 16:42:02 by Kline, Bob (NIH/NCI) [C]

I think you must have missed my previous comment.

 I've given up on understanding this and have reimplemented the code using the less efficient approach. Installed on CDR DEV.

You never indicated in this ticket that you have backed off from this request, and there are no links between the tickets, so I had no reason to know that you wanted me to back out this change. That would be the right thing to do, but I can't read your mind. 😉

Shall I back out this change and have you close the ticket?

Comment entered 2023-06-30 17:02:31 by Osei-Poku, William (NIH/NCI) [C]

Yes, please backout of the changes. Thanks!

Comment entered 2023-06-30 17:51:38 by Kline, Bob (NIH/NCI) [C]

Change backed out on DEV.

Comment entered 2023-07-05 08:02:46 by Osei-Poku, William (NIH/NCI) [C]

Verified on DEV. Thanks!

Elapsed: 0:00:00.001399