Overwriting Summary field based upon key and two other fields

Issue #516 resolved
David Sumlin created an issue

I'm trying to update the Summary field on a Workflow Post Function.

I have two drop down boxes in the Create Issue screen that are required. I also have the Summary field hidden with a static dummy value defaulted to it.

What I'm trying to do is to have the Post Function set the Summary field to a concatenation of initials of the two drop down boxes and the issue key. (e.g. DB1)

I've put create ephemeral string fields for the initials of the two drop down boxes, but I'm not sure which Post Function to use to set the Summary field, nor what syntax/formula to use to concatenate the two ephemeral fields with the issue key. Any help?

Comments (4)

  1. Fidel Castro Armario repo owner

    Hi David,

    The post-function you have to use is "Copy a parsed text to a field".

    By your example (i.e., DB1) I think that you want to use only the numerical part of the issue key. In that case you should use the following configuration:

    Captura de pantalla 2017-02-17 a las 3.51.54.png

    Text to be parsed is:

    %{00061} + %{00062} + replaceFirst(%{00015}, "\\D+", "")
    

    Note that:

    • %{00061} is field code for Ephemeral string 1.
    • %{00062} is field code for Ephemeral string 2.
    • %{00015} is field code for Issue key.

    Very important: You should move all your 3 post-function AFTER post-function "Creates the issue originally".

  2. David Sumlin reporter

    AWESOME! Thank you! And especially thank you for being succinct and direct with your answer and not giving me grief over why I want to do it and how I should do it some other way, blah blah blah. :-)

  3. Log in to comment