In case a "JIRA Metadata - Calc. field" contains a long Velocity script, certain operations on issues containing this custom field will fail:
Adding a Sub-Task to an existing issue using the 'plus' icon next to the 'Sub-Tasks' section (not the menu item).
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:
Create a "JIRA Metadata - Calc. field" containing a Velocity script with more than 255 characters. Example:
Create an issue containing the Calc. field.
Add a Sub-Task to the new issue using More Actions -> Create Sub-Task (should work).
Add a Sub-Task using the 'plus' icon next to the 'Sub-Tasks' section:
The following error occurs after clicking on 'Create':
The Sub-Task has been created but it doesn't show up in the 'Sub-Tasks' section.
Scanning for workflow integrity using the 'Integrity Checker' will show the newly created Sub-Task.
Steps to reproduce - Cloning:
Simply use "More Actions -> Clone" to clone an issue containing the Calc. field.
No error will be displayed.
The original issue is linked to itself using a 'is cloned by' link
The workflow state of the cloned issue is invalid
In both cases no error or stack trace is logged.
Java: 1.6.0_31-b04 (Solaris)
DB: Postgres 9.0.x
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.
thanks for your quick response!
Provided your solution works, is version x.2.0 still targeted for a release around May 31st?
I'm working on it. But I can not promise.
starting manual tests
Thanks a lot!
Works perfect now.