[Fix]: Data values not formatted when coming from fields plugin custom fields - #655
Conversation
Rom1-B
left a comment
There was a problem hiding this comment.
!45898 also reports comma-decimal numbers from Fields custom fields failing to import, not just dates. GLPI's numeric datatype is 'decimal'/'number', never 'float', so this fallback won't trigger reformatFloat() for them. Follow-up planned?
Actually I did not completely reproduce this one. The numbers are correctly imported in my Glpi when I'm visualizing one at-a-time, so I suspect he didn't use a Decimal field when defining his field. |
… of float numbers
Co-authored-by: Romain B. <8530352+Rom1-B@users.noreply.github.com>
Rom1-B
left a comment
There was a problem hiding this comment.
OK, can you add tests cases?
@Rom1-B I'm not sure this is relevant, the changes are covering a case that is strictly correlated with Fields plugin, as the only search options that arrive in here without checktype are the one coming from custom fields from Fields plugin. |
Co-authored-by: Romain B. <8530352+Rom1-B@users.noreply.github.com>
Checklist before requesting a review
Please delete options that are not relevant.
Description
No unit test were written because they would have involve references to Fields plugin, thus failing in the GitHub environment, as it is not linked to Fields plugin.