Skip to content
GitLab
    • Explore Projects Groups Topics Snippets
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • fusiondirectory-plugins fusiondirectory-plugins
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 65
    • Issues 65
    • List
    • Boards
    • Service Desk
    • Milestones
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • fusiondirectoryfusiondirectory
  • fusiondirectory-pluginsfusiondirectory-plugins
  • Issues
  • #4658
Something went wrong while setting issue due date.
Closed
Open
Issue created 9 years ago by ptempier@ptempierReporter
  • New related issue

  • New related issue

csv import with empty field

Closed

csv import with empty field

Hello

When importing a csv all thr fields have to be filled else if there s an empty one the remaining fields will be offset by -1 If the first line is empty you can t even map it to a field a template has to exist to be able to import the csv

(from redmine: issue id 4658, created on 2016-03-31, closed on 2016-04-20)

  • Changesets:
    • Revision 86633ee2 by Côme Chilliet on 2016-04-05T04:17:27.000Z:
Fixes #4658 Fixed error message when CSV import fails
  • Revision d50c7904 by Côme Chilliet on 2016-04-05T04:17:54.000Z:
Fixes #4658 Fixed error message when CSV import fails
  • Custom Fields:
    • Bug in version: 1.0.10

    Tasks

    0

    No tasks are currently assigned. Use tasks to break down this issue into smaller parts.

    Linked items
    0

    Link issues together to show that they're related. Learn more.

    Activity


    • Côme Chilliet
      Côme Chilliet @cchilliet · 9 years ago
      Reporter

      pascal tempier wrote:

      When importing a csv all the fields have to be filled else if there s an empty one the remaining fields will be offset by -1

      Indeed, this should now be fixed (but you can’t map this column to a mandatory field if there are empty cells in it).

      If the first line is empty you can t even map it to a field

      I guess you mean if there are empty values in the first line, in this case you should be able to map it by using the column number thanks to the fix.

      a template has to exist to be able to import the csv

      Yes, that’s how import works.

      (from redmine: written on 2016-04-01)

    • ptempier
      ptempier @ptempier · 9 years ago
      Author Reporter

      Ok that looks fixed, in as in, i can now select an empty column.

      It s not fixed as in, i can t import my test csv to confirm. It says the login is empty Could we get at which line of the import is failling?

      csv here under, using the user template in http://demo-fixes.fusiondirectory.org/fusiondirectory/ :

      "mon prénom","bbb",,"test service 2","test user2" "mon prén","bbbaaa",,, dubois,jean-jaques,9876,"test serv3","test user3" "aaa","pas de nom",987,zzzz,xxxx monom,"monprénom pas de tel",,whoowoo,badabada olla,llalala,1121212121212,blabla,dorémifasol

      (from redmine: written on 2016-04-04)

    • Côme Chilliet
      Côme Chilliet @cchilliet · 9 years ago
      Reporter

      pascal tempier wrote:

      Ok that looks fixed, in as in, i can now select an empty column.

      It s not fixed as in, i can t import my test csv to confirm. It says the login is empty Could we get at which line of the import is failling?

      Pushed a fix, now errors are grouped within a single error dialog which says at which line the error appeared.

      csv here under, using the user template in http://demo-fixes.fusiondirectory.org/fusiondirectory/ : Sorry, demo-fixes is reseted daily I can’t see the template used. What did you use in login field and are you sure non of your csv lines produced an empty login?

      "mon prénom","bbb",,"test service 2","test user2" "mon prén","bbbaaa",,, dubois,jean-jaques,9876,"test serv3","test user3" "aaa","pas de nom",987,zzzz,xxxx monom,"monprénom pas de tel",,whoowoo,badabada olla,llalala,1121212121212,blabla,dorémifasol

      (from redmine: written on 2016-04-05)

    • ptempier
      ptempier @ptempier · 9 years ago
      Author Reporter

      login : %a|l|p|s[1,1]|givenName%%a|l|p|sn% pass : %r[12]|% country : france displayname : %givenName% %au|sn%

      nom, prénom, description, téléphone : %askme%

      Unix tab home folder : /home/%a|l|p|s[1,1]|givenName%%a|l|p|sn%

      (from redmine: written on 2016-04-05)

    • Côme Chilliet
      Côme Chilliet @cchilliet · 9 years ago
      Reporter

      pascal tempier wrote:

      login : @%a|l|p|s[1,1]|givenName%%a|l|p|sn%@ pass : @%r[12]|%@ country : france displayname : @%givenName% %au|sn%@

      nom, prénom, description, téléphone : @%askme%@

      Unix tab home folder : @/home/%a|l|p|s[1,1]|givenName%%a|l|p|sn%@

      You misread the documentation, if you want to apply several modifiers, you don’t separate them with «|». There is a single | which separates the attribute name from the modifiers. So you need to set:

      login : @%alps[1,1]|givenName%%alp|sn%@ Unix tab home folder : @/home/%alps[1,1]|givenName%%alp|sn%@

      Also, I’m pretty sure you want @s[0,1]@ to have the first letter and not the second one. Actually @s[1]@ also takes the first letter. I’m adding an example with 0 to the documentation to make this clearer.

      (from redmine: written on 2016-04-06)

    • ptempier
      ptempier @ptempier · 9 years ago
      Author Reporter

      ok , that's fixed, thanks. thx for the corrections about the doc, i did missread both things

      (from redmine: written on 2016-04-20)

    • Jonathan Swaelens
      Jonathan Swaelens @jswaelens · 9 years ago
      Developer

      Close issue

      (from redmine: written on 2016-04-20)

    • Jonathan Swaelens closed 7 years ago

      closed

    • bmortier added Fixed label 6 years ago

      added Fixed label

    Please register or sign in to reply
    Assignee
    Côme Chilliet's avatar
    Côme Chilliet
    Assign to
    Labels
    0
    None
    0
    None
      Assign labels
    • Manage project labels

    Milestone
    No milestone
    None
    Due date
    None
    None
    None
    Time tracking
    No estimate or time spent
    Confidentiality
    Not confidential
    Not confidential

    You are going to turn on confidentiality. Only project members with at least the Reporter role, the author, and assignees can view or be notified about this issue.

    Lock issue
    Unlocked
    0
    0 Participants
    Reference:

    Menu

    Explore Projects Groups Topics Snippets