repeatableHeteroProperty and doFillItems

7 views
Skip to first unread message

Gavin “halkeye” Mogan

unread,
Feb 11, 2026, 11:35:04 PM (9 hours ago) Feb 11
to Jenkins Developers
Hey everyone

Long time no jenkins
I'm working on upgrading the digitalocean plugin to make it easier to select base images for agents by adding filters. I was thinking of getting fancy by added a repeatableHeteroProperty as filters as you can have 0 or more filters, and have classes for each filter type and how it would affect the api call.

After a lot of re-learning things, this seemed to work pretty well, except for the doFillItems call to populate the select box of images

Originally it was:
public ListBoxModel doFillImageIdItems(@RelativePath("..") @QueryParameter String authTokenCredentialId) throws Exception {

I was hoping to expand it to 
public ListBoxModel doFillImageIdItems(@RelativePath("..") @QueryParameter String authTokenCredentialId, @QueryParameter List<ImageFilter> imageFilters) throws Exception {

But it seems like stapler doesn't like the conversion to list
java.lang.IllegalArgumentException: Unable to convert to interface java.util.List

Is there any way to handle this? I'd settle for a json blob or something i'd have to handle manually. I'm just not sure what my options are.

Thanks,
Gavin
Reply all
Reply to author
Forward
0 new messages