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

  1. Create new Project with 2 digit Shortcode (i.e. 12) at /burndown/project/add/project
CommentFileSizeAuthor
#5 after.png42.43 KBraveen_thakur51
#5 before.png8.06 KBraveen_thakur51

Issue fork burndown-3355274

Command icon 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

Binoli Lalani created an issue. See original summary.

binoli lalani’s picture

Assigned: binoli lalani » Unassigned
Status: Active » Needs review

Hello,

I fixed error. Please review MR.

Thank you!

nishant’s picture

Hi @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

raveen_thakur51’s picture

StatusFileSize
new8.06 KB
new42.43 KB

@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.

binoli lalani’s picture

Status: Needs review » Reviewed & tested by the community

Hello,

Thank you for testing this issue and confirming that it is fixed with the MR. Moving this to RTBC.

Thank you!

jeremylichtman made their first commit to this issue’s fork.

jeremylichtman’s picture

I have merged the PR, and created 1.0.28.

jeremylichtman’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.