Issue Number | 4772 |
---|---|
Summary | [General] Copying sections of documents without copying attribute values |
Created | 2020-02-03 19:38:57 |
Issue Type | Improvement |
Submitted By | Osei-Poku, William (NIH/NCI) [C] |
Assigned To | Kline, Bob (NIH/NCI) [C] |
Status | Closed |
Resolved | 2020-04-16 15:25:55 |
Resolution | Fixed |
Path | /home/bkline/backups/jira/ocecdr/issue.256114 |
When a section of a CDR document is copied and inserted into another section of the same document, the new section retains all the cdr:id attribute values thus creating duplicate ids which prevent the document from validating. We have to manually remove the duplicate values and save the document before getting a valid document and depending on the size of the section, there could be a lot of values to manually delete. We would want the ability to copy sections of a document without copying the cdr:id attributes to avoid the duplicate errors.
There's a contradiction in the Description for this issue
which makes it unclear whether we are dropping cdr:id
attributes or cdr:ref
attributes. Which is it, please?
I have corrected the cdr:ref to cdr:id. Sorry about the confusion.
I believe (working from memory, so I may be wrong) that we used to have (for protocols?) a more specialized version of this, with context-aware macros for copying the currently selected element into a custom clipboard, and a companion macro for inserting it at the (new) current cursor position. I assume that these macros are gone (because I don't see them) and that you use XMetaL's out-of-the-box copy and paste macros currently, right? I think we have at least three approaches we could use here.
Re-implement that pair of macros for a more generalized purpose, so that the first would be available anywhere, not just for a specific element type.
Implement a macro which would strip cdr:id
attributes from the current content of the system clipboard.
Implement a macro which would strip cdr:id
attributes from the currently selected element (and its
children).
I recommend #3, both because it is the most straightforward to implement, and because it provides the users with more functionality and flexibility, allowing you to use it even for blocks you're not moving. Over to you, ~oseipokuw, for a decision.
I believe (working from memory, so I may be wrong) that we used to have (for protocols?)
~bkline You may be referring to the Macro for retrieving org address - OCECDR-614 which is currently still in the context menu for Org documents but probably needs to be removed as it is of no use now. A similar macro - Retrieve Org Address still works in the Person document.
Yes, Option #3 is fine with me.
New macro installed on DEV on the context menu. As always for a new macro, you have to close and re-open XMetaL in order to be able to use it.
Verified on DEV. Thank you!
Verified on QA. Thanks!
File Name | Posted | User |
---|---|---|
CDR IDs used more than once.PNG | 2020-02-03 19:38:48 | Osei-Poku, William (NIH/NCI) [C] |
Elapsed: 0:00:00.001350