Custom Script MultiObjectVar cannot be filled from URL parameter #4525
Labels
status: accepted
This issue has been accepted for implementation
type: bug
A confirmed report of unexpected behavior in the application
Environment
I'm building a custom script with multiple fields that I want to pre-fill from a a URL (that I will generate from a Custom Link).
It works, except for MultiObjectVar (Multiple Select) variable type.
Steps to Reproduce
Expected Behavior
Field should contain the value of ID in specified in URL parameter test (GET)
Observed Behavior
with step 1 and 2: It doesn't fill any field. MultiObjectVar is blank/null. No error.
With step 3, as a MultiObjectVar should contain a list object, it gives:
class 'ValueError'
invalid literal for int() with base 10: ']'
If I add "default=[1,2]" to step 1 MultiObjectVar, it will fill it with the right values.
"default", for this MultiObjectVar variable, needs a list object. int() will give an error.
If you replace MultiObjectVar with ObjectVar and repeat step 2, it will fill the field with the right value.
Filling fields from GET parameters seems to work for all other field type I tried.
We should be able to pass multiple values using GET requests for such field type.
The text was updated successfully, but these errors were encountered: