Hiya Folks!
I can't for the lift of me get rid of a couple of letters that come from using SEARCH/REPLACE_TO "S]" (they are from the description field) . I know this is a super confusing and strange way to do this. Any help would be amazing. Thank you in advance!
Context:
Searching the Description field for our build link, then using REPLACE_AT since where the link get posted moves a bit.
Next, I am searching for what comes just ask the link 100% of the time. "Server Build -" and also using REPLACE_TO since that one moves a bit due to the data generated.
Then, I use REPLACE on both REPLACE_AT's to join the field (this is done to remove everything after the link)
Finally I am CONCAT the above line with a custom name for the link.
Formula
with buildLink = SEARCH("/.https://buildserver.net/job/./", description,0):
With buildReplace = REPLACE_AT(description,0,buildLink):
with endLink = SEARCH("Server Build -"; description;0):
With endReplace = REPLACE_AT(description,0,endLink, ""):
with bothReplace = REPLACE (buildReplace, endReplace):
IF issuetype:
If(bothReplace,concat("[Build Link |";bothReplace;"]"))
Output (The bold is a URL and there is the "S]" that is still being pulled in from the description)
Build Link S]
Hi JL,
I have to say this is a bit of a confusing way to do this. I would suggest redoing this with concat instead of replace at. The second line replace_at is essentially just inserting text, meaning it should be equivalent to:
CONCAT( buildLink, description )
The next two lines are possibly not doing anything. Search will return a number (undefined if it finds nothing). That number is then inserted into the next line as the 3rd argument for repalce_at, which is the number of characters to replace. if the "Server build -" String is found at character 41, then it inserts an empty string 41 times, which should do nothing.
Then the both replace line should be removing any parts of buildReplace that match EndReplace. Also note endReplace is treated as a regex so any special characters may cause unexpected results.
The last two lines are the most straight forward and should probably remain. If issuetype is a good way of excluding folders, and grouping that shouldn't have values anyways, and the other line basically concats the result of both replace with some formatting if it exists.
Overall I think you can simplify a lot of the top sections by simply using concat to add text. Here is the documentation, which I hope helps point you in the right direction. https://wiki.almworks.com/documentation/structure/latest/data-center-and-server/expr-function-reference-172164198.html#id-.ExprFunctionReferencev8.3-REPLACE_AT
Cheers,
Nick [Tempo/ALM Works]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.