Copy issue details to the issue description
Issue #762
resolved
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?
Here is my current post function. This fires when the ticket is created.
Thanks! Weston
Comments (3)
-
repo owner -
reporter Thanks Fidel! I'll give this a try.
-
reporter - changed status to resolved
This works perfectly! Thanks again for your help!
- Log in to comment
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.