Need help parsing text

Issue #86 resolved
Former user created an issue

Hi, I'm trying to parse some text into a new field, please help :)

I have the following fileds

Customer Name Surname Display Name Username

I'd like to populate Display Name, and Username automatically. - Customer is always one word. - Display Name should be {Customer} - {Name Surname} - Username should be all lowercase, and all spaces should be removed. {Customer}{Name Surname}

I've tried several options, but I can't seem to get the regular expressions to work..

Thanks!

Comments (4)

  1. Former user Account Deleted

    An example:

    Customer: ONE
    Name Surname: Peter Sellers
    Display Name: ONE - Peter Sellers
    Username: onepetersellers
    

    Thanks!

  2. Fidel Castro Armario repo owner

    Hi,

    You have to use post-function Copy a parsed text to a field for both assignments. In the instance of JIRA I use for these demonstration custom fields have the following field codes:

    • Customer has field code %{11900}
    • Name Surname has field code %{11901}

    Now I explain you how to do both assignments:

    1. SETTING FIELD Display Name

    Set post-function Copy a parsed text to a field with the following configuration:

    conf-1.png

    Once configured, post-function will look like this:

    conf-2.png

    2. SETTING FIELD Username

    Set post-function Copy a parsed text to a field with the following configuration:

    conf-3.png

    Notice that in this example we use advanced parsing mode with the following expression: toLowerCase(replaceAll(%{11900} + %{11901}, "\s", ""))

    Once configured, post-function will look like this:

    conf-4.png

  3. Log in to comment