Skip to content

Commit e2597f3

Browse files
authored
[DBEX] assign otherBehaviors string value to own property
1 parent 602e153 commit e2597f3

File tree

9 files changed

+15
-14
lines changed

9 files changed

+15
-14
lines changed

lib/evss/disability_compensation_form/form0781.rb

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ def create_form_v2
5858
'reports' => @form_content['reports'],
5959
'reportsDetails' => @form_content['reportsDetails'],
6060
'behaviors' => @form_content['behaviors'],
61+
'otherBehaviors' => @form_content['otherBehaviors'],
6162
'behaviorsDetails' => @form_content['behaviorsDetails'],
6263
'evidence' => @form_content['evidence'],
6364
'traumaTreatment' => @form_content['traumaTreatment'],

lib/pdf_fill/forms/va210781v2.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ def set_option_indicator
686686
end
687687

688688
def format_other_behavior_details
689-
other_behavior = @form_data['behaviors']&.[]('otherBehavior')
689+
other_behavior = @form_data['otherBehaviors']
690690
return if other_behavior.blank?
691691

692692
details = @form_data['behaviorsDetails']['otherBehavior']

spec/fixtures/pdf_fill/21-0781V2/kitchen_sink.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@
6363
"screenings": true,
6464
"socialEconomic": false,
6565
"relationships": true,
66-
"misconduct": false,
67-
"otherBehavior": "Lorem"
66+
"misconduct": false
6867
},
68+
"otherBehaviors": "Lorem",
6969
"behaviorsDetails": {
7070
"reassignment": "requested duty assignment",
7171
"performance": "poor evaluations",

spec/fixtures/pdf_fill/21-0781V2/merge_fields.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@
7878
"screenings": true,
7979
"socialEconomic": false,
8080
"relationships": true,
81-
"misconduct": false,
82-
"otherBehavior": "Lorem"
81+
"misconduct": false
8382
},
83+
"otherBehaviors": "Lorem",
8484
"behaviorsDetails": {
8585
"reassignment": "requested duty assignment",
8686
"performance": "poor evaluations",

spec/fixtures/pdf_fill/21-0781V2/overflow.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@
8888
"screenings": true,
8989
"socialEconomic": false,
9090
"relationships": true,
91-
"misconduct": false,
92-
"otherBehavior": "Lorem"
91+
"misconduct": false
9392
},
93+
"otherBehaviors": "Lorem",
9494
"behaviorsDetails": {
9595
"reassignment": "requested duty assignment",
9696
"performance": "poor evaluations",

spec/lib/pdf_fill/forms/va210781v2_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def class_form_data
7676
let(:details) { 'Always feeling tired' }
7777
let :data do
7878
{
79-
'behaviors' => { 'otherBehavior' => other_behavior },
79+
'otherBehaviors' => other_behavior,
8080
'behaviorsDetails' => { 'otherBehavior' => details }
8181
}
8282
end

spec/support/disability_compensation_form/all_claims_with_0781v2_fe_submission.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,9 @@
192192
"substances": true,
193193
"appetite": true,
194194
"screenings": true,
195-
"relationships": true,
196-
"otherBehavior": "Withdrawal"
195+
"relationships": true
197196
},
197+
"otherBehaviors": "Withdrawal",
198198
"behaviorsDetails": {
199199
"reassignment": "Lorem ipsum dolor sit amet.",
200200
"performance": "Lorem ipsum dolor sit amet.",

spec/support/disability_compensation_form/form_0781v2.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@
6767
"substances": true,
6868
"appetite": true,
6969
"screenings": true,
70-
"relationships": true,
71-
"otherBehavior": "Withdrawal"
70+
"relationships": true
7271
},
72+
"otherBehaviors": "Withdrawal",
7373
"behaviorsDetails": {
7474
"reassignment": "Lorem ipsum dolor sit amet.",
7575
"performance": "Lorem ipsum dolor sit amet.",

spec/support/disability_compensation_form/submissions/with_0781v2.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -372,9 +372,9 @@
372372
"substances": true,
373373
"appetite": true,
374374
"screenings": true,
375-
"relationships": true,
376-
"otherBehavior": "Withdrawal"
375+
"relationships": true
377376
},
377+
"otherBehaviors": "Withdrawal",
378378
"behaviorsDetails": {
379379
"reassignment": "Lorem ipsum dolor sit amet.",
380380
"performance": "Lorem ipsum dolor sit amet.",

0 commit comments

Comments
 (0)