Support #13586

[SCP ID :##6749##] : Gamification issue - duplicate question for same user

Added by Zahir Abd Latif about 1 year ago. Updated 6 months ago.

Status:Work Completed-End life cycleStart date:August 01, 2023
Priority:NormalDue date:
Assignee:Zahir Abd Latif% Done:

100%

Category:RIBSpent time:-
Target version:-

Description

Hi,
Kindly attend below request:-

We notice some abnormalities to the gamification data captured in the DB. Based on requirement, customer is compulsory to answer 2 questions only. However, based on the data we extracted, there are customer that answer 1, 3 or 4 times as per table below. please help to check.

gami duplicate.xlsx (14.1 KB) Zahir Abd Latif, August 01, 2023 11:48

History

#1 Updated by Siti Balqis Othman about 1 year ago

  • Status changed from New - Begin Life Cycle to Investigation

#2 Updated by Siti Balqis Othman 12 months ago

  • Status changed from Investigation to Development / Work In Progress

#3 Updated by Siti Balqis Othman 12 months ago

  • Status changed from Development / Work In Progress to User Acceptance Test
  • % Done changed from 0 to 100

Finding issue:
1) Duplicate answer records. This issue can happen if the customer gamification flag is empty due to some issue during updating the flag. However, we unable to replicate the issue.
2) Error in inserting answer record in table BNM_USER_ANSWER due to duplicate key.

Caused by: java.sql.BatchUpdateException: Violation of PRIMARY KEY constraint 'PK__BNM_USER__F6F7FDFD5182AA7A'. Cannot insert duplicate key in object 'dbo.BNM_USER_ANSWER'. The duplicate key value is (286228, E1Q02, E1Q02A1, 2).
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeBatch(SQLServerPreparedStatement.java:2065)

Solution:
1) Add checking on existing records. If the record exists, the program will not insert the new record. This is to solve exceptions during inserting the data.
In terms of performance, we implement the get record method using native query.

#4 Updated by Siti Balqis Othman 6 months ago

  • Status changed from User Acceptance Test to Work Completed-End life cycle
  • Assignee changed from Siti Balqis Othman to Zahir Abd Latif

Deploy to production on 12/03/2024

Also available in: Atom PDF