[#CRM-5786] Redaction based on regular expressions needs to

advertisement

[CRM-5786]

Redaction based on regular expressions needs to assign distinct redaction codes to distinct matching strings

Created: 06/Feb/10 Updated: 20/Apr/10 Resolved: 20/Apr/10

Status:

Project:

Closed

CiviCRM

Component/s: CiviCase

Affects

Version/s:

3.1

Fix Version/s: 3.2

Type: Bug

Reporter:

Resolution:

Labels:

Remaining

Estimate:

Time Spent:

David Greenberg

Fixed/Completed

None

Not Specified

Priority:

Assignee:

Votes:

Minor

Yashodha Chaku

0

Original

Estimate:

Description

Not Specified

Not Specified

EXAMPLE using sample redaction rules (fixed string replace for Vancouver, and regex replace for dates):

1. Activity description (input):

----------

Vancouver welfare: $500 per month

Other sources:

2001-10-12 : gift of 10,000

2009-10-03: gift of 500

2010-01-13: gift of 100

-------------

2. Redacted output:

------------- city_37028 welfare: $500 per month

Other sources: date_47616 : gift of 10,000 date_47616: gift of 500 date_47616: gift of 100

-------------

All 3 dates are assigned the same code ("47616") - but each distinct match instance should get a

DISTINCT redaction code. (If two of the same dates are present in the input stream, then they

SHOULD get the SAME redaction code.)

NOTE: This came up because Phys Health wants to use a regext rule that redacts any word starting with an upper case letter. Distinct words need to be assigned distinct redact codes. So when testing the fix, test this specific case. EXAMPLE:

Input: the ciient works at St. Vincents hospital on Tuesdays.

Output (assuming regex for words starting w/ upper case letter is configured to assign the prefix

'text_'): the client works at text_09223 text_09412 hospital on text_23565.

Comments

Comment by Dave D

[ 16/Apr/10 ]

This works but string rules no longer seem to work, e.g. just a string match on Vancouver.

Comment by Dave D

[ 16/Apr/10 ]

Do we even need string rules anyway? Any string rule can easily be made a regex, and typically for something like Vancouver you would also want to catch vancouver and even vancouveR so you would use a regex to make sure.

Comment by David Greenberg

[ 17/Apr/10 ]

I'd vote for leaving string rules in for now (and fixing) since it provides a simpler option for some folks / use cases.

Comment by Yashodha Chaku

[ 17/Apr/10 ]

It seems to be working for me for string replacements.

Generated at Tue Feb 09 10:39:55 UTC 2016 using JIRA 6.2#6252sha1:aa343257d4ce030d9cb8c531be520be9fac1c996.

Download