Problem/Motivation
Getting below error while creating new Project entity with 2 digit Shortcode.
Drupal\Core\Database\IntegrityConstraintViolationException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'shortcode' cannot be null: INSERT INTO "burndown_project_field_data" ("id", "vid", "type", "langcode", "status", "user_id", "name", "shortcode", "board_type", "estimate_type", "ticket_id", "created", "changed", "revision_translation_affected", "default_langcode") VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10, :db_insert_placeholder_11, :db_insert_placeholder_12, :db_insert_placeholder_13, :db_insert_placeholder_14); Array ( [:db_insert_placeholder_0] => 3 [:db_insert_placeholder_1] => 3 [:db_insert_placeholder_2] => project [:db_insert_placeholder_3] => en [:db_insert_placeholder_4] => 1 [:db_insert_placeholder_5] => 2 [:db_insert_placeholder_6] => test [:db_insert_placeholder_7] => [:db_insert_placeholder_8] => kanban [:db_insert_placeholder_9] => geometric [:db_insert_placeholder_10] => 0 [:db_insert_placeholder_11] => 1681973355 [:db_insert_placeholder_12] => 1681973355 [:db_insert_placeholder_13] => 1 [:db_insert_placeholder_14] => 1 ) in Drupal\mysql\Driver\Database\mysql\ExceptionHandler->handleExecutionException() (line 50 of /var/www/html/web/core/modules/mysql/src/Driver/Database/mysql/ExceptionHandler.php).
Steps to reproduce
- Create new Project with 2 digit Shortcode (i.e. 12) at /burndown/project/add/project
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | after.png | 42.43 KB | raveen_thakur51 |
| #5 | before.png | 8.06 KB | raveen_thakur51 |
Issue fork burndown-3355274
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
binoli lalani commentedHello,
I fixed error. Please review MR.
Thank you!
Comment #4
nishantHi @Binoli Lalani,
I have checked your MR #3. Before applied there was error with add project,
Once I applied your code, It is working fine
Comment #5
raveen_thakur51 commented@Binoli Lalani,
I have reviewed the MR! and it is working fine for me. I am having Drupal version 9.5.1 & PHP version - 8.1 (Linux Machine).
I am attaching my screenshots (Before & after) for reference. Please review & Thank You.
Comment #6
binoli lalani commentedHello,
Thank you for testing this issue and confirming that it is fixed with the MR. Moving this to RTBC.
Thank you!
Comment #9
jeremylichtman commentedI have merged the PR, and created 1.0.28.
Comment #10
jeremylichtman commented