oec-scripts icon indicating copy to clipboard operation
oec-scripts copied to clipboard

Use actual re.sub() regex-replace rather than str.replace(), since we…

Open JeffSaxeVA opened this issue 4 years ago • 1 comments

… want to eliminate all varieties of whitespace from the Labels sent to Jira.

I noticed that the code to make a Label out of the alias name was evidently intending to remove all whitespace from the name, since spaces are not permitted in a Label on the Jira side. However, the str.replace() function recognizes only static strings, not character classes or other regex constructs; it was looking for literally backslash-s in the original text, so it would not even remove spaces. Since the "re" module is in the core library in both Python 2.x and 3.x, I propose importing that and using re.sub(). Thanks!

JeffSaxeVA avatar Oct 21 '21 16:10 JeffSaxeVA

Hi @JeffSaxeVA, you can track the progress about the issue from this ticket

ahalac-atlassian avatar Nov 23 '22 13:11 ahalac-atlassian