Skip to content
This repository was archived by the owner on Apr 13, 2021. It is now read-only.

Commit bf89de0

Browse files
committed
update: readme
1 parent 432da4b commit bf89de0

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ To put a field ID in the formula, double-click on an item in the list of availab
1111

1212
> ### Notes:
1313
> - %{cf_id} — must be an ID of existing custom field
14+
> - If format of Custom Field is Text, Long Text or List, you need to surround '%{cf_id}' with quotes
1415
> - Be careful with code in formula, if it would wrong your application can be crashed
1516
> - This plugin has been tested on Redmine v2.6.7 with RoR v3.2.22 and Redmine v3.1 with RoR v4.2.3
1617
> - There are six types of output format: "int", "float", "string", "link", "datetime", "bool", "percentage"
@@ -25,9 +26,10 @@ git clone https://github.com/annikoff/redmine_plugin_computed_custom_field.git c
2526
Or download [ZIP-archive](https://github.com/annikoff/redmine_plugin_computed_custom_field/archive/master.zip) and extract it into "computed_custom_field" directory.
2627

2728
### Examples:
28-
2929
```ruby
30-
%{cf_1}*2+%{cf_2}
30+
%{cf_1}*2+%{cf_2}
31+
# means
32+
# custom_field_value(1) * 2 + custom_field_value(2)
3133
```
3234

3335
```ruby
@@ -52,6 +54,11 @@ end
5254
self.parent_id == 2
5355
```
5456

57+
```ruby
58+
# If format of Custom Field with ID 4 is Text, Long Text or List
59+
'%{cf_4}'
60+
```
61+
5562
To write formulas this documentation can be helpful:
5663
- [Issue](http://www.rubydoc.info/github/edavis10/redmine/Issue)
5764
- [Project](http://www.rubydoc.info/github/edavis10/redmine/Project)

0 commit comments

Comments
 (0)