Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • fusiondirectory fusiondirectory
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 39
    • Issues 39
    • List
    • Boards
    • Service Desk
    • Milestones
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Terraform modules
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • fusiondirectoryfusiondirectory
  • fusiondirectoryfusiondirectory
  • Issues
  • #5428
Something went wrong while setting issue due date.
Closed
Open
Issue created 8 years ago by bmortier@bmortierMaintainer
  • New related issue

  • New related issue

Add a substitute placeholder

Closed

Add a substitute placeholder

thanks to https://documentation.fusiondirectory.org/en/documentation/how_to/use/placeholder, FD have a funny account creation tools.

But there is no way to make a simple substitute action like : replace caraters by antother one: ex :

"de la pate feuillete" should be repmace trough the place holder by "de-la-pate-feuillete" or "de_la_pate_feuillete"

maybe remplace the "p" placeholder like %p[" ","-"]|sn% : p as "permute", followed by an array with 2 values ( whatToremplace / newValue) could be a solution

old p place holder could be : %p[" ",""]|sn%

cheers

(from redmine: issue id 5428, created on 2017-03-15, closed on 2017-03-15)

  • Relations:
    • copied_to #5432
  • Changesets:
    • Revision 50461200 by Côme Chilliet on 2017-03-15T08:20:25.000Z:
Fixes #5428 Added parameter to p modifier to be able to do substitutions
  • Custom Fields:
    • Support contract: None
    • Dolibarr project Name: PJ1701-0050

    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


    • bmortier
      bmortier @bmortier · 8 years ago
      Author Maintainer

      Indeed 'p' modifier was already a call to preg_replace so I added support for parameters to be able to do any kind of substitutions. Default parameters are @'/\s/', ''@ (remove any whitespace). Note that 'u' is added internally at the end of the pattern to activate UTF-8 handling.

      You should be able to use @%p['/\s/','-']|sn%@ in your case

      (from redmine: written on 2017-03-15)

      By Côme Chilliet on 2017-09-02T15:36:11 (imported from GitLab)

    • bmortier
      bmortier @bmortier · 8 years ago
      Author Maintainer

      hello,

      priere de faire un ticket de doc pour mettre la doc a jour

      Merci

      (from redmine: written on 2017-03-15)

      By bmortier on 2017-09-02T15:36:12 (imported from GitLab)

    • bmortier
      bmortier @bmortier · 8 years ago
      Author Maintainer

      Ça marche mais il ne faut pas mettre les guillemets: @%p[/\s/,-]|sn%@

      Close issue

      (from redmine: written on 2017-03-15)

      By Côme Chilliet on 2017-09-02T15:36:12 (imported from GitLab)

    • bmortier
      bmortier @bmortier · 7 years ago
      Author Maintainer

      Set time spent

      (from redmine: written on 2017-06-22)

      By Côme Chilliet on 2017-09-02T15:36:12 (imported from GitLab)

    • bmortier closed 7 years ago

      closed

      By Côme Chilliet on 2017-09-02T15:36:12 (imported from GitLab)

    • bmortier added 1h of time spent 7 years ago

      added 1h of time spent

      By Côme Chilliet on 2017-09-02T15:36:13 (imported from GitLab)

    • bmortier added Added label 6 years ago

      added Added label

      By bmortier on 2018-09-24T17:33:48 (imported from GitLab)

    Please register or sign in to reply
    Assignee
    bmortier's avatar
    bmortier
    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: