annotate .svn/pristine/03/03dacc5eb19ef8f9c13510c3c9db9d59186398e2.svn-base @ 1524:82fac3dcf466
redmine-2.5-integration
Fix failure to interpret Javascript when autocompleting members for project
author |
Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
date |
Thu, 11 Sep 2014 10:24:38 +0100 |
parents |
dffacf8a6908 |
children |
|
rev |
line source |
Chris@1517
|
1 class StoreRelationTypeInJournalDetails < ActiveRecord::Migration
|
Chris@1517
|
2
|
Chris@1517
|
3 MAPPING = {
|
Chris@1517
|
4 "label_relates_to" => "relates",
|
Chris@1517
|
5 "label_duplicates" => "duplicates",
|
Chris@1517
|
6 "label_duplicated_by" => "duplicated",
|
Chris@1517
|
7 "label_blocks" => "blocks",
|
Chris@1517
|
8 "label_blocked_by" => "blocked",
|
Chris@1517
|
9 "label_precedes" => "precedes",
|
Chris@1517
|
10 "label_follows" => "follows",
|
Chris@1517
|
11 "label_copied_to" => "copied_to",
|
Chris@1517
|
12 "label_copied_from" => "copied_from"
|
Chris@1517
|
13 }
|
Chris@1517
|
14
|
Chris@1517
|
15 def up
|
Chris@1517
|
16 StoreRelationTypeInJournalDetails::MAPPING.each do |prop_key, replacement|
|
Chris@1517
|
17 JournalDetail.where(:property => 'relation', :prop_key => prop_key).update_all(:prop_key => replacement)
|
Chris@1517
|
18 end
|
Chris@1517
|
19 end
|
Chris@1517
|
20
|
Chris@1517
|
21 def down
|
Chris@1517
|
22 StoreRelationTypeInJournalDetails::MAPPING.each do |prop_key, replacement|
|
Chris@1517
|
23 JournalDetail.where(:property => 'relation', :prop_key => replacement).update_all(:prop_key => prop_key)
|
Chris@1517
|
24 end
|
Chris@1517
|
25 end
|
Chris@1517
|
26 end
|