Copy issue details to the issue description

Issue #762 resolved
Weston Rossborough created an issue

Hi Fidel,

I have a use-case where I would like to copy an issue's fields to the issue description. I can do this using the post function Copy a parsed text to a field, but the field names are displayed even if that field has no value. Is there a way I can update the post function to only copy fields that have values to the issue description?

Description.png

Here is my current post function. This fires when the ticket is created.

Description2.png

Thanks! Weston

Comments (3)

  1. Fidel Castro Armario repo owner

    Hi @WestonR,

    You should use conditional operator ? :.

    For example, you should replace terms like "Leave Duration: " + %{nnnnn} + "\n" with (%{nnnnn} != null ? ("Leave Duration: " + %{nnnnn} + "\n") : ""), where nnnnn is field code for Leave Duration custom field.

  2. Log in to comment