Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #12199 (new)

Opened 6 years ago

Last modified 5 years ago

Bug: Script List param defaults

Reported by: wmoore Owned by:
Priority: major Milestone: Unscheduled
Component: Web Version: 4.4.10
Keywords: n.a. Cc: ux@…
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: n.a.

Description

If a List parameter has a list as a default value, this is ignored by the clients and they simply use the first item in the list as a default.

See https://github.com/openmicroscopy/openmicroscopy/issues/2306
for screenshots and example script.

Test script:

import omero
import omero.scripts as scripts

from omero.rtypes import rlong as _
from omero.rtypes import unwrap

c = scripts.client("test", scripts.List(
    "IDs", default=[_(1), _(2)]).ofType(_(0)))

print unwrap(c.getInput("IDs"))

Change History (5)

comment:1 Changed 6 years ago by jamoore

Updated comment points to my test script (above) being invalid. Instead of a scripts.List, this problem involves a scripts.String.

comment:2 Changed 6 years ago by wmoore

Josh - in fact, your script does expose a bug in the clients' UI if the default value is a list, so it is perfectly valid for this ticket. There was no other bug reported by https://github.com/openmicroscopy/openmicroscopy/issues/2306 - Just confusion about how the Data_Type parameter is being populated in the clients.
Since we have no example scripts that use a list as a default value, this is quite low priority (although I guess there's a potential use-case for this).

comment:3 Changed 6 years ago by jamoore

  • Milestone changed from 5.0.2 to 5.0.3
  • Version set to 4.4.10

Thanks for deciphering that. Pushing then.

comment:4 Changed 5 years ago by wmoore

  • Milestone changed from 5.1.2 to Unscheduled
  • Owner changed from wmoore to jamoore

Pushing until this becomes a higher priority.

comment:5 Changed 5 years ago by jamoore

  • Owner jamoore deleted

Fair enough. But I don't know what should be done here, so taking my name off.

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.118949 sec.)

We're Hiring!