Suppress hidden datasetContactEmail field when using CVoc#12420
Open
qqmyers wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it: #10503 added the raw values of CVoc managed fields as hidden DOM elements to allow CVoc scripts to use those values in constructing the display. This is needed for some use cases (see #10503 and related issue), harmless in most, but a problem for one use case - the datasetContactEmail field. Because it (and only it right now as far as I can see) is give the
#EMAILformat, the display value is set to''(actually to the value of thedataset.email.hiddenMessagestring which is'') when the field is not managed by CVoc. When it is managed (i.e. to allow an ORCID or ROR entry for the contact), #10503 added the real value (i.e. the private email) as a hidden field, which means it is accessible via the page source. This PR suppresses adding a hidden field if the format is#EMAIL.Which issue(s) this PR closes:
Special notes for your reviewer: One could argue that the :ExcludeEmailFromExport setting should govern the display for this field instead of the one-off #EMAIL format, but that's a bigger change.
Suggestions on how to test this: Configure CVoc on the contact field with the email as a managed field and check the page source to see if the email is a hidden field or not.
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
Is there a release notes update needed for this change?: probably not?
Additional documentation: