Closed T0mek closed 1 year ago
Hi,
Use this code:
if @issue.new_record? && @issue.copy?
#clear dates
self.custom_field_values = { '14'=> CustomField.find_by_id(14).default_value.to_s }
self.custom_field_values = { '13'=> CustomField.find_by_id(13).default_value.to_s }
...
I hope it helps!
Hi,
Use this code:
if @issue.new_record? && @issue.copy? #clear dates self.custom_field_values = { '14'=> CustomField.find_by_id(14).default_value.to_s } self.custom_field_values = { '13'=> CustomField.find_by_id(13).default_value.to_s } ...
I hope it helps!
It works! Many thanks! Tomek
Hi all,
I have code that clears values of some custom field when the issue is copied from another issue:
But for some another fields I do not want to clear its values, but set the default value. The question is: how to set value of a custom field back to its default/initial value?
Tomek