Support » Plugin: SportsPress - Sports Club & League Manager » CSV import creates duplicated matches instead of replacing it

  • Resolved kaichi

    (@kaichi)


    CSV import creates duplicated matches instead of replacing them.

    Is possible to replace them somehow when they are imported?

    I suggest to add an option to ask the user if he needs to replace or add the matches imported.

    Thank you!

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Contributor Savvas

    (@savvasha)

    Hi @kaichi ,

    A more advanced export-import feature will be available probably in the next version of SportsPress. You can try this feature (please make a backup first!!!) from here: https://github.com/ThemeBoy/SportsPress/pull/401

    With this you can export your events, alter any info you want and then import them back to auto-update the existing events without creating any duplicates. The same with players, teams etc.

    Thanks,
    Savvas

    Thread Starter kaichi

    (@kaichi)

    @savvasha thanks, indeed imports are quite important and that creates always duplicates is quite annoying.
    I will try the feature that you suggested.

    Plugin Contributor Roch

    (@rochesterj)

    Awesome! Please let us know how it works for you.

    Thanks!

    Thread Starter kaichi

    (@kaichi)

    I noticed that with this version of the plugin was added ID of the match that I think could be the solution, since we overwrite the same ID. However the match is not created.

    This is what I did:
    1. I downloaded this version of the plugin.
    2. I installed and activated it.
    3. I exported the Fixtures sample file (is not updated with the plugin fields)
    4. I imported the Fixtures sample file with additional data that was missing

    Note: In the ID field I tried to insert an integer: “1” and a unique number: “202101” and nothing.

    Results:
    The system creates teams and soccer fields, if they don’t exist. But the match is not created.

    Plugin Contributor Roch

    (@rochesterj)

    Hi there!

    Thanks for your reply.

    Did you use the correct event ID to be udpated? You can find them in the wp-admin, in the URL bar for the edit screen of a specific event:
    https://prnt.sc/14xdk1q

    Random IDs won’t work indeed, if you provide an ID that doesn’t exist the system assumes it was an error and it won’t create the event.

    Thanks!

    Thread Starter kaichi

    (@kaichi)

    Hi @rochesterj
    Thanks for the reply, Yes indeed was a random ID, but for those new item? Is not possible to create new events with this method then..

    Plugin Contributor Roch

    (@rochesterj)

    Hi!

    For new items you need to leave them blank, I’m assuming. Or maybe it’s a different importer?

    I haven’t used this branch so far, so I’m not sure. I’ll test it later tomorrow.

    Thanks!

    Plugin Contributor Savvas

    (@savvasha)

    Hi guys! Sorry for not responding earlier…

    @kaichi if you want to create new events, then you should leave the ID field empty. If you add an existing ID then the event will be updated.

    Thanks,
    Savvas

    Thread Starter kaichi

    (@kaichi)

    Hello guys,
    Actually I tried again to import the events but nothing.. it says 0 matches imported and indeed are not imported.

    Maybe I missed some steps. What are the steps that you did?

    Thank you!

    Thread Starter kaichi

    (@kaichi)

    Hello guys,
    I found another issue:
    With this version of the plugin, is true that the match is not duplicated, but it is duplicated the box score, causing the display of duplicated score in the table result.
    ie: if you import 3 times the same match (2:9). The score table will be: 2:0 2:0 2:0

    ie: if you import 4 times the same match (2:9). The score table will be: 2:0 2:0 2:0 2:0

    It is not even possible to delete those duplications from the match editor.

    Please any advice?

    • This reply was modified 3 months, 1 week ago by kaichi.
    Plugin Contributor Savvas

    (@savvasha)

    Hi @kaichi ,

    Can you share some screenshots for the issue you are describing?

    Thanks,
    Savvas

    Thread Starter kaichi

    (@kaichi)

    Hello,
    Unfortunately I had to remove everything and disable the plugin, due to the issues. However I show you where is the issue in the backend:
    https://we.tl/t-VwGBKFsSNX

    And this is the issue in frontend:
    https://we.tl/t-rraeWAGisi

    Anyway, it’s very weird, I’m the only one with this issue?

    Plugin Contributor Savvas

    (@savvasha)

    Hi @kaichi ,

    This is very strange. I just follow the same procedure as you and everything worked as it should. The results were updated, no duplicate values.
    https://snipboard.io/N1voH6.jpg
    https://snipboard.io/uA0bhQ.jpg

    This is the csv I used:

    ID,Date,Time,Ground,Clubs,Results,Outcome,Players
    46,2020/09/25,20:00:00,Kensington,Kangaroos,1|1|2,loss,"Blake Bannan"
    ,,,,,,,"Hugo Stones"
    ,,,,,,,"Tristian Holme"
    ,,,,,,,"Mason Ewing"
    ,,,,Bluebirds,1|2|3,win,"Mario Bellucci"
    ,,,,,,,"Aiden Leggatt"
    ,,,,,,,"Seth Clemens"
    ,,,,,,,"Mitchell Childe"

    Thanks,
    Savvas

Viewing 13 replies - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.