tractive 1.0.20 → 1.0.21

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9f486ab9e712d09b64065d75d9a7f54eb6b7805e0a5aa14c90ec3094e36dd7d8
4
- data.tar.gz: f7ec7b661d9f8a9210a3364f897443ab1d8e2969c74c36f7cf6271fe0003c465
3
+ metadata.gz: 7a10eeb2f828d2d135d48f0f6437f669c939104e17ef1b777e42d29e59aac5dc
4
+ data.tar.gz: df20934dfee4b890c9f633df93955f60d237987743c48f12a95a4bb8cb1b8806
5
5
  SHA512:
6
- metadata.gz: 9355453a9074c3dd3b3a8aa7aed6326961b4193ec92c6d6dfe107ae1e6ee840a6709f95017f788ceee32e5edbb3fdb509301a378abe4dbdd64334879d9d1d151
7
- data.tar.gz: 3faa452b99139fe2a688ab6cdd0a40a6403ccf7c457abee4e1c97aa424fc37ee06f0beed48d4e58bb15b8e3ba6fd410a3ddd3e90eab8424f025faf65e43d4df7
6
+ metadata.gz: 8dbc73bbf823c89b05267fb42991401f33c6e1097488b0e49bd4ec87a3c457ddfa500d6d16fd88793a6bb9ccd4a2c27514a74b1ca3e5c10786184284d691ae7f
7
+ data.tar.gz: ca6165b8852a0c5609737f5794683e8bb82c522934f861d59eb798a2475d8662b95742a76cd19c585a45980aa4a12cfaf3a35f169235c74ae2adb43851b667e4
@@ -75,12 +75,19 @@ module Migrator
75
75
  # replay all changes in chronological order:
76
76
  comments = changes.map { |x| ticket_change(@singlepost, x) }.select { |x| x }.to_a
77
77
 
78
+ index = 0
78
79
  curr_index = 0
79
- changes.each_with_index do |change, index|
80
- if change[:field] == "comment"
80
+ changes.each do |change|
81
+ kind = change[:field] || "attachment"
82
+
83
+ next unless interested_in_change?(kind, change[:newvalue])
84
+
85
+ if kind == "comment" || (kind == "attachment" && change[:description] != "")
81
86
  @comments_map[curr_index] = index
82
87
  curr_index += 1
83
88
  end
89
+
90
+ index += 1
84
91
  end
85
92
 
86
93
  if @singlepost
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tractive
4
- VERSION = "1.0.20"
4
+ VERSION = "1.0.21"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tractive
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.20
4
+ version: 1.0.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose