Enum field option values change from string to integer

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kanoriuta
    Junior Member
    • Jan 2017
    • 11

    Enum field option values change from string to integer

    Hello,

    Administration » Entity Manager » {entityType} » Fields

    then you create new entity field enum and make integer options they are saved as string in json file:
    PHP Code:
    {
    "fields": {
        "status": {
        "type": "enum",
        "options": [
            "1",
            "2",
            "3"
        ],
    } 
    
    If you change their order in backend (drag and drop), field options are also updated in json file from string to integer.
    PHP Code:
    ​​​​​​​{
    "fields": {
        "status": {
        "type": "enum",
        "options": [
            1,
            2,
            3
        ],
    } 
    
    After the order change if you try to edit your {entityType} enum field you would see that in form display it always shows the default value and not the one saved in database.

    ESPO CRM versions which I tried and the issue occurred - 4.4.0 and 4.4.1.
  • yuri
    Member
    • Mar 2014
    • 8440

    #2
    Hi,

    Thank you for reporting. We will fix.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • yuri
      Member
      • Mar 2014
      • 8440

      #3
      Fix: https://github.com/espocrm/espocrm/c...44db65114bf538
      If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

      Comment

      • kanoriuta
        Junior Member
        • Jan 2017
        • 11

        #4
        Very quick response.
        Looks like everything is working correctly right now.

        p.s. one unnecessar line

        Comment

        Working...