Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-70059

Duplicate key value violates unique constraint "mdl_badgback_useext_uix"

    XMLWordPrintable

    Details

    • Affected Branches:
      MOODLE_310_STABLE
    • Fixed Branches:
      MOODLE_310_STABLE
    • Pull from Repository:
    • Pull 3.10 Branch:
      MDL-70059-310
    • Pull Master Branch:
      MDL-70059-master
    • Testing Instructions:
      Hide

      It's covered by PHPUnit tests but if required, the following testing instructions can be used:

      1. Login as admin.
      2. Go to "Site administration / Badges / Manage backpacks"
      3. Create a backpack with the following details:
      4. Save changes.
      5. Create another backpack with the following details:
      6. Save changes
      7. Check no error is displayed.
      Show
      It's covered by PHPUnit tests but if required, the following testing instructions can be used: Login as admin. Go to "Site administration / Badges / Manage backpacks" Create a backpack with the following details: Backpack API -  https://api.eu.badgr.io/v2 Backpack URL -  https://eu.badgr.io API Version - Open Badges v2.0 Include authentication details with the backpack - Disabled Save changes. Create another backpack with the following details: Backpack API -  https://api.ca.badgr.io/v2   Backpack URL -  https://ca.badgr.io   API Version - Open Badges v2.0 Include authentication details with the backpack - Disabled Save changes Check no error is displayed.
    • Sprint:
      Moppies Kanban

      Description

      Steps to reproduce

      1. Login as admin.
      2. Go to "Site administration / Badges / Manage backpacks"
      3. Create a backpack with the following details:
      4. Save changes.
      5. Create another backpack with the following details:
      6. Save changes

      Expected behaviour

      Backpack is saved and no error is displayed.

       

      Current behaviour

      Backpack is saved but the following error is displayed:

      ERROR: duplicate key value violates unique constraint "mdl_badgback_useext_uix"
      DETAIL: Key (userid, externalbackpackid)=(0, 0) already exists.
      INSERT INTO mdl_badge_backpack (email,password,externalbackpackid,userid,backpackuid,autosync) VALUES($1,$2,$3,$4,$5,$6) RETURNING id
      [array (
      'email' => '',
      'password' => '',
      'externalbackpackid' => 0,
      'userid' => 0,
      'backpackuid' => 0,
      'autosync' => 0,
      )]
      
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sarjona Sara Arjona (@sarjona)
              Reporter:
              sarjona Sara Arjona (@sarjona)
              Peer reviewer:
              Carlos Escobedo Carlos Escobedo
              Integrator:
              Andrew Lyons Andrew Lyons
              Tester:
              Janelle Barcega Janelle Barcega
              Participants:
              Component watchers:
              Yuliya Bozhko, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                9/Nov/20

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 hours, 10 minutes
                  4h 10m