Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • S soutien
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 27
    • Issues 27
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • LQDN Adminsys
  • soutien
  • Issues
  • #108

Closed
Open
Created Nov 10, 2017 by okhin@okhin🚴Contributor10 of 21 tasks completed10/21 tasks

Import data from mysql

We must import old datas from the previous support websites.

  • User are created as is from the user databases first
  • Adresses are the same, they're imported as is. We might end up with a lot of them.
  • Pledges are a bit trickier
    • Status 1, are validated single pledges. We should link them to the SystemPay payment. And to a user if they have an existing email adresses matching one of our user
    • Status 101 gives us the creation_date of a recurring pledge (which is then created in a 'processed' state). They gave us the account_id for the recurring pledge.
    • Status 102 gaves us the number of iteration, as well as expiration_date and the last time the pledge has been updated. If they're not updated for the last 6 months, have them in 'canceled' state.
    • Each pledge in 1 or 101 is associated to a free piplome if some field are provided, use them to create the ClaimedBonus object linked to the Bonus with a 0 threshold and to prepare the piplome, extract the decimals from the data.
  • Counterparts are the worst since there is no bonus system
    • Get all the counterparts existing for a user.
    • Create a ClaimedBonus of the highest threshold for any hoopie asked by a user.
    • Create a ClaimedBonus of the second highest threshold for any pishirt minus any ClaimedBonuses(threshold>0) asked by a user
    • Create a ClaimedBonus of the third highest threshold for any pibag minus any ClaimedBonuses(threshold>0) asked by a user
    • Create a ClaimedBonus of the fourth highest threshold for any printed piplome minus any ClaimedBonuses(threshold>0) asked by a user
  • For each item created, flag them as sent.

We need some management commands for that

  • Empty database is used to clear the database of anything in it

The following ones need some mysql parameters to connect to a database

  • Import donor

  • Import addresses

  • Import pledges

  • Import counterparts

  • Import everything (execute the four previous one in this order)

  • Generate piplome. This command will take any piplome in error, flag them as new, then call the generate function on each non generated piplome.

ALl of the commande should have a progress bar.

Edited Nov 11, 2017 by okhin
Assignee
Assign to
Time tracking