Skip to content

Commit 461e39f

Browse files
committed
Merge branch 'release_1.83'
2 parents 775c5a2 + 6358c98 commit 461e39f

File tree

8 files changed

+34
-196
lines changed

8 files changed

+34
-196
lines changed

app/models/cylinder_tm.rb

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,12 @@ class CylinderTm < ActiveRecord::Base
6262
'Locked grooves at the end' => [:pres, :presInt, :prod],
6363
'False start at the beginning' => [:pres, :presInt, :prod]
6464
}.freeze,
65-
text_comment_uses: [:pres, :presInt, :prod].freeze,
6665
timestamp_comments: {
67-
:locked_grooves => [:pres, :presInt, :prod],
68-
:speed_change => [:pres, :presInt, :prod],
69-
:speed_fluctuations => [:pres, :presInt, :prod],
70-
:second_attempt => [:pres, :presInt, :prod]
66+
:locked_grooves => [:pres],
67+
:speed_change => [:pres],
68+
:speed_fluctuations => [:pres],
69+
:second_attempt => [:pres]
7170
}.freeze,
72-
timestamp_comment_uses: [:pres].freeze,
7371
file_uses: {
7472
default: [:pres, :presRef, :presInt, :intRef, :prod],
7573
optional: []

app/views/returns/return_bin.html.erb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,5 +190,7 @@
190190
});
191191
//set barcode focus, only if no warning div content was set
192192
if (!$.trim($("div.warning").html())) { $("#mdpi_barcode").focus() };
193+
//alert if return_to notification
194+
if ($.trim($("div.notice").html()).match(/Return to:.*notify/i)) { alert($.trim($("div.notice").html()).match(/Return to:.*notify.*/i)) }
193195
});
194196
</script>

config/environments/development.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@
3838

3939
# this sets up log rotating first arg the log file location, second arg the number of files to rotate through
4040
# third arg the size of each file
41-
# config.logger = Logger.new("#{Rails.root}/log/#{Rails.env}.log", 10, 10.kilobyte)
41+
config.logger = Logger.new("#{Rails.root}/log/#{Rails.env}.log", 10, 10.megabytes)
4242

4343
end

config/environments/test.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,9 @@
4848

4949
# Test workaround for resolving routing issue in assets/images
5050
config.assets.debug = true
51+
52+
# this sets up log rotating first arg the log file location, second arg the number of files to rotate through
53+
# third arg the size of each file
54+
config.logger = Logger.new("#{Rails.root}/log/#{Rails.env}.log", 10, 10.megabytes)
55+
5156
end
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# log_duplicate_mdpi_barcodes.rake
2+
# Rake tasks for logging duplicate non-zero MDPI barcodes
3+
#
4+
# Example use:
5+
# rake pod:log_duplicate_mdpi_barcodes
6+
#
7+
namespace :pod do
8+
desc "Log duplicate MDPI barcodes"
9+
task :log_duplicate_mdpi_barcodes => :environment do |task|
10+
@logger = Logger.new(Rails.root.join('log', 'find_duplicate_barcodes.log'))
11+
duplicates = PhysicalObject.where.not(mdpi_barcode: '0').select(:mdpi_barcode).group(:mdpi_barcode).having("count('mdpi_barcode') > 1").size
12+
if duplicates.empty?
13+
@logger.info 'No duplicates found'
14+
else
15+
@logger.info "#{duplicates.size} duplicate cases found."
16+
@logger.info duplicates.to_yaml
17+
duplicates.keys.each do |barcode|
18+
PhysicalObject.where(mdpi_barcode: barcode).each { |po| @logger.info po.inspect }
19+
end
20+
end
21+
end
22+
end

log/development.log.0

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)