Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Properties with fixed values cannot be edited via drop down in UI #538

Open
marcgemis opened this issue Dec 10, 2021 · 4 comments
Open
Labels

Comments

@marcgemis
Copy link

A property with fixed values show a drop-down in the edit dialog. A similar property that is part of a feature does not show such a drop-down.

Since the export does not include the custom properties, I add the SQL-insert statements for my setup
INSERT INTO FF4J_FEATURES (FEAT_UID,ENABLE,DESCRIPTION,STRATEGY,EXPRESSION,GROUPNAME`) VALUES ('Sprint 11 Values',1,'Some Values Specific for Sprint 11',NULL,NULL,'Sprint 11');

INSERT INTO FF4J_CUSTOM_PROPERTIES (PROPERTY_ID,CLAZZ,CURRENTVALUE,FIXEDVALUES,DESCRIPTION,FEAT_UID) VALUES ('EmailMode','com.foo.emailservice.ff4j.EmailModeProperty','DIRECT','DIRECT, VIA_TOPIC, NO_EMAIL','The different modes in which the Email-Service can deliver mail','Sprint 11 Values');

INSERT INTO FF4J_PPROPERTIES (PROPERTY_ID,CLAZZ,CURRENTVALUE,FIXEDVALUES,DESCRIPTION) VALUES ('emailmode','com.foo.emailservice.ff4j.EmailModeProperty','VIA_TOPIC','VIA_TOPIC, DIRECT, NO_EMAIL','The different modes in which the Email-Service can deliver mail');
`

The custom property shows up in the feature edit dialog
FF4J-FeaturesEmailMode

editing the property does not show the fixed values, although no changes can be made with other values
editpropertyoffeature

compare this with a similar (standalone) property, where the dialog shows the fixed values
propertywithfixedvalues

This is version 1.8.12

@mrgrew
Copy link
Contributor

mrgrew commented Dec 20, 2021

That smells like an issue I encountered when I had only overridden fromString(String). In that case I resolved my issue by overriding asString() too.

@marcgemis
Copy link
Author

@mrgrew , I added a asString(), but it makes no difference.

@mrgrew
Copy link
Contributor

mrgrew commented Dec 22, 2021

Bummer. In that case sharing the source to com.foo.emailservice.ff4j.EmailModeProperty should prove helpful.

@clun
Copy link
Collaborator

clun commented Dec 19, 2022

Poke, I confirm the user interface does not support fixed Values in feature custom properties whereas the underlying data model support it.

The feature is pretty hard to implement at the moment, will skip it for 1.9

@clun clun added the bug label Dec 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants