File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -42,15 +42,17 @@ module ::CommunityCustomFields
42
42
on ( :topic_created ) do |topic , _opts , user |
43
43
next unless topic . archetype == "regular" && user . id > 0
44
44
45
- topic . custom_fields [ :assignee_id ] = 0
46
45
topic . custom_fields [ :status ] = "new"
47
- topic . custom_fields [ :waiting_since ] = Time . now . utc
46
+ topic . custom_fields [ :waiting_since ] = Time . now . utc . iso8601
48
47
topic . custom_fields [ :waiting_id ] = user . id
49
48
topic . save_custom_fields
50
49
end
51
50
52
51
on ( :post_created ) do |post , _opts , user |
53
- next unless post . archetype == "regular" && user . id > 0 && post . post_type == 1
52
+ next unless post . archetype == "regular"
53
+ next unless post . post_type == 1
54
+ next if post . post_number == 1
55
+ next if user . id < 0
54
56
55
57
topic = post . topic
56
58
@@ -59,7 +61,7 @@ module ::CommunityCustomFields
59
61
topic . custom_fields [ :waiting_id ] = nil
60
62
else
61
63
if user . id != topic . custom_fields [ :waiting_id ]
62
- topic . custom_fields [ :waiting_since ] = Time . now . utc
64
+ topic . custom_fields [ :waiting_since ] = Time . now . utc . iso8601
63
65
topic . custom_fields [ :waiting_id ] = user . id
64
66
end
65
67
You can’t perform that action at this time.
0 commit comments