Variable %s_original_name% not working properly

Here you can submit bugreports
Post Reply
ThomasM
Site Admin
Posts: 231
Joined: Wed Feb 22, 2017 6:36 am

Variable %s_original_name% not working properly

Post by ThomasM »

Hi,

I doscovered the following:

Whe I try to populate a variable to %s_original_name% the outcome is not correct in cas the name is an UUID:

Original Filename is: 12345678-1234-5678-8765-123456788765.avi
Var Archnumber set to

Code: Select all

%s_original_name%
gives: -123444458764 (obviously wrong)
Var Archnumber set to $

Code: Select all

left("%s_original_name%",36)
gives correct: 12345678-1234-5678-8765-123456788765

Trest-Workflow is attached.

Any ideas?

regards,
tom
Attachments
uuid-test.json
(4.77 KiB) Downloaded 329 times
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: Variable %s_original_name% not working properly

Post by emcodem »

Hey Thomas, so good to hear from you!

Congratulations, you found a Bug :D And a pretty stupid one to be honest. I guess we will take such stuff into consideration for our new and shiny automated testing suite :-)

Keep it coming, Steinar loves bugs hehe
emcodem, wrapping since 2009 you got the rhyme?
admin
Site Admin
Posts: 1687
Joined: Sat Feb 08, 2014 10:39 pm

Re: Variable %s_original_name% not working properly

Post by admin »

Hi ThomasM,

This is not a bug but behavior as expected. What you actually have here is a mathematical expression (stored in a string) and will be treated as such. So you should quote the "%s_original_name%" variable in order to treat it as literal string. Note that this is only needed in the "Populate" and "Conditional" nodes as these are the only ones trying to evaluate the text in the input fields.

Hope this helps.

-steinar
ThomasM
Site Admin
Posts: 231
Joined: Wed Feb 22, 2017 6:36 am

Re: Variable %s_original_name% not working properly

Post by ThomasM »

Moin emcodem,
Hey Steinar,

thanks for your help and for clearing things up.

regards
tom
Post Reply