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 value mapping for Boolean attributes #43

Closed
yannick-leu opened this issue Sep 30, 2024 · 0 comments · Fixed by #46, #42, #51 or #52
Closed

Custom value mapping for Boolean attributes #43

yannick-leu opened this issue Sep 30, 2024 · 0 comments · Fixed by #46, #42, #51 or #52
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@yannick-leu
Copy link

yannick-leu commented Sep 30, 2024

Description

For Boolean attributes, implement the option to map specific input values to true/false in the mapping configuration (e.g. that "yes" is mapped to "true"). This kind of custom mapping is already possible for Enum values but not Boolean. The UI should be similar to the custom Enum mapping UI.

In v2.8.0, if a value is imported that doesn't match any of the configured mapping options, it will be treated as if it was mapped to false. Instead, the import should be unsuccessful and result in an error with an appropriate error message. This way, it makes it harder to accidentally import typos and is also consistent with how custom Enum mapping works.

Motivation

Users of Excel Importer might be working with Excel files that contain other Boolean values than true/false, such as yes/no or X/(empty). Instead of having to correct every differing Boolean value in the file, it would be simpler if they could just configure the mapping, like they already do with Enum values.

Proposed Solution (optional)

The custom Boolean mapping could be implemented similar to the current implementation of custom Enum mapping.

@yannick-leu yannick-leu added the enhancement New feature or request label Sep 30, 2024
Jumas added a commit to SchweizerischeBundesbahnen/ch.sbb.polarion.extension.generic that referenced this issue Oct 2, 2024
Jumas added a commit to SchweizerischeBundesbahnen/ch.sbb.polarion.extension.generic that referenced this issue Oct 2, 2024
Jumas added a commit that referenced this issue Oct 3, 2024
@Jumas Jumas linked a pull request Oct 3, 2024 that will close this issue
4 tasks
@Jumas Jumas closed this as completed in #46 Oct 3, 2024
@yannick-leu yannick-leu reopened this Oct 8, 2024
Jumas added a commit that referenced this issue Oct 9, 2024
@Jumas Jumas linked a pull request Oct 9, 2024 that will close this issue
4 tasks
@Jumas Jumas closed this as completed in #51 Oct 11, 2024
Jumas added a commit that referenced this issue Oct 11, 2024
#51)

* fix: unknown values must raise error for boolean fields instead of being treated as 'false'

Refs: #43
@grigoriev grigoriev added this to the v2.8.1 milestone Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment