DarkmiraTour / community-event-manager

Web application with a collection of tools helping people organising community events such as multi-days conference with reminders, CRM and such
GNU General Public License v3.0
21 stars 21 forks source link

Renaming sponsorship level delete its position #162

Closed alcalyn closed 5 years ago

alcalyn commented 5 years ago

Current Behavior

When I rename a level, i.e "Level 0" to "Level 0 edited", its position changes. Also, when looking in database, its position is set to null.

How to reproduce scenario

Expected

Actual

Database dump before and after:

root@1e9417d46674:/var/www/symfony# bin/console doctrine:query:sql "SELECT label, position from sponsorship_level"
array(4) {
  [0]=>
  array(2) {
    ["label"]=>
    string(7) "Level 0"
    ["position"]=>
    int(0)
  }
  [1]=>
  array(2) {
    ["label"]=>
    string(7) "Level 1"
    ["position"]=>
    int(1)
  }
  [2]=>
  array(2) {
    ["label"]=>
    string(7) "Level 2"
    ["position"]=>
    int(2)
  }
  [3]=>
  array(2) {
    ["label"]=>
    string(7) "Level 3"
    ["position"]=>
    int(3)
  }
}
root@1e9417d46674:/var/www/symfony# bin/console doctrine:query:sql "SELECT label, position from sponsorship_level"
array(4) {
  [0]=>
  array(2) {
    ["label"]=>
    string(7) "Level 1"
    ["position"]=>
    int(1)
  }
  [1]=>
  array(2) {
    ["label"]=>
    string(7) "Level 2"
    ["position"]=>
    int(2)
  }
  [2]=>
  array(2) {
    ["label"]=>
    string(7) "Level 3"
    ["position"]=>
    int(3)
  }
  [3]=>
  array(2) {
    ["label"]=>
    string(10) "Level 0 OK"
    ["position"]=>
    NULL
  }
}