Hi there,
I've spent a while searching for an answer on how I can create a scripted custom field based on another or copy one or add two together and am happy with all of that using scriptrunner
What I need to do is to is to have a scripted custom field where I change the last character for use in another custom field that does a database lookup.
I have a custom field that contains (for example) "12345A" or "123A".
What I want to do is to create another custom field that will replace the last letter in the string with "%" so that I end up with "12345%" or "123%"
Can anybody help me with a script fragment that that might allow me to say the equivalent of def newfield = left(oldfield,len(oldfield)-1 or similar
Thanks
Derek...