Calc fields with long velocity scripts cause problems if issues are cloned or Sub-Tasks are added


In case a "JIRA Metadata - Calc. field" contains a long Velocity script, certain operations on issues containing this custom field will fail:

  1. Adding a Sub-Task to an existing issue using the 'plus' icon next to the 'Sub-Tasks' section (not the menu item).

  2. Cloning an issue

The Sub-Task or Clone is created, but the workflow state of the newly created issue is invalid and the new issue isn't linked to it's parent or original issue.

Steps to reproduce - Sub-Task:

  1. Create a "JIRA Metadata - Calc. field" containing a Velocity script with more than 255 characters. Example:

  2. Create an issue containing the Calc. field.

  3. Add a Sub-Task to the new issue using More Actions -> Create Sub-Task (should work).

  4. Add a Sub-Task using the 'plus' icon next to the 'Sub-Tasks' section:

  5. The following error occurs after clicking on 'Create':


  6. The Sub-Task has been created but it doesn't show up in the 'Sub-Tasks' section.

  7. Scanning for workflow integrity using the 'Integrity Checker' will show the newly created Sub-Task.

Steps to reproduce - Cloning:

  1. Simply use "More Actions -> Clone" to clone an issue containing the Calc. field.

  2. No error will be displayed.

  3. The original issue is linked to itself using a 'is cloned by' link

  4. The workflow state of the cloned issue is invalid

In both cases no error or stack trace is logged.


JIRA: 4.4.4
Java: 1.6.0_31-b04 (Solaris)
DB: Postgres 9.0.x


Former user
May 1, 2012, 12:26 PM

Hi Steffen,
I think I've found it. It seems that JIRA perform some tests, before the Subtask-Creation via ('plus' icon next to the 'Sub-Tasks' section) and Cloning. For this purpose, JIRA uses the default value for the calc. Field and not the calculated value.
I need to verify my solution, but it will be a part of the release x.2.0.

Former user
May 1, 2012, 10:00 PM

Hi Andreas,

thanks for your quick response!

Provided your solution works, is version x.2.0 still targeted for a release around May 31st?



Former user
May 3, 2012, 11:28 AM

Hi Steffen,

I'm working on it. But I can not promise.



Former user
May 7, 2012, 9:33 AM

starting manual tests

Former user
May 10, 2012, 12:55 PM

Thanks a lot!
Works perfect now.

Best Regards,



Former user


Former user



Fix versions

Affects versions