Open richardolsson opened 2 weeks ago
I'd like to give this a shot :)
Awesome @k-nut! PR #2210 contains (among other things) UI similar to what this would need to do, but for enum fields. The ("native", as opposed to "custom") gender field is basically like a (custom) enum field but with hard-coded values.
Description
Zetkin has native fields on person object (e.g. first name and email), that exist in all organizations, and custom fields, which is a way for an organization to create additional fields on a person object. The "gender" field is a native field in Zetkin. It allows four values,
'm'
(male),'f'
(female),'o'
(other) andnull
(unknown).The import feature in Zetkin allows admin users to import data from a CSV or Excel file, usually exported from some other system. Those systems rarely have the exact same conventions for the gender field, so there needs to be some sort of way for users of the importer to map from values in the file to one of the allowed values in Zetkin.
Similar mapping already exists for several other types of data, such as custom fields of the "enum" type, tags and organizations.
Steps to reproduce
Sample CSV
Expected Behaviour
There should be a "Configure" option under the dropdown, and the configuration should open to the right. The configuration should allow the user to map the values that exist in the column ("woman", "man", "nb" and "unknown") to the allowed values in Zetkin. Compare with how the "tag" filter or "extra enum" filter works.
Actual Behaviour
No configuration on the right hand side.
Screenshots (if you have any)
Proposed solution
Have a look at how the configuration for tags, organizations and enum fields work.