Write Field Content to new comment but format string first

Issue #829 resolved
DavidF created an issue

Hello, I'm trying to write a string from a custom field as a new comment during a transition. This worked so far using " following text parsed in basic mode will be copied to New comment" post function. The problem is, the string needs to be reformated first, because what I recieve now is this:

[ {"id":"Just a Question?","type":"todo"} , {"id":"And another Question?","type":"todo"} ]

What I want to be written as a comment is this:

Just a Question?

And another Question?

Is that possible (knowing your great add-on, I'm sure it is ;-)) and if so, how?

JIRA Software Version: 7.5.0 Workflow Toolbox 2.2.42

Thank you very much! Kind regards, David

Comments (2)

  1. Fidel Castro Armario repo owner

    Hi @friedrich78,

    You can implement it using "Copy a parsed text to a field" with the following configuration:

    Captura de pantalla 2017-10-06 a las 12.20.29.png

    String expression is:

    toString(findPattern(%{nnnnn}, "[^\"]+(?=\",\"type)"), "\n\n")
    

    replacing nnnnn with field code of the field that contains the text to be reformated.

  2. Log in to comment