Skip to content
This repository was archived by the owner on May 5, 2021. It is now read-only.

Commit 8f9c6d5

Browse files
SORMAS-Foundation#3223 - Made event title mandatory
1 parent 5292e19 commit 8f9c6d5

4 files changed

Lines changed: 8 additions & 3 deletions

File tree

sormas-app/app/src/main/res/layout/fragment_event_edit_layout.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,12 @@
140140
<de.symeda.sormas.app.component.controls.ControlTextEditField
141141
android:id="@+id/event_eventTitle"
142142
style="@style/ControlSingleColumnStyle"
143+
app:required="true"
143144
app:value="@={data.eventTitle}" />
144145

145146
<de.symeda.sormas.app.component.controls.ControlTextEditField
146147
android:id="@+id/event_eventDesc"
147148
style="@style/ControlSingleColumnStyle"
148-
app:required="true"
149149
app:value="@={data.eventDesc}" />
150150

151151
<de.symeda.sormas.app.component.controls.ControlSwitchField

sormas-backend/src/main/java/de/symeda/sormas/backend/event/Event.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public void setEventTitle(String eventTitle) {
187187
this.eventTitle = eventTitle;
188188
}
189189

190-
@Column(length = COLUMN_LENGTH_BIG, nullable = false)
190+
@Column(length = COLUMN_LENGTH_BIG)
191191
public String getEventDesc() {
192192
return eventDesc;
193193
}

sormas-backend/src/main/resources/sql/sormas_schema.sql

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5533,4 +5533,9 @@ CREATE INDEX IF NOT EXISTS idx_eventparticipant_resultingcase_id ON eventpartici
55335533

55345534
INSERT INTO schema_version (version_number, comment) VALUES (272, 'Increase case directory performance #3137');
55355535

5536+
-- 2020-11-02 Drop not null constraint from event description #3223
5537+
ALTER TABLE events ALTER COLUMN eventdesc DROP NOT NULL;
5538+
5539+
INSERT INTO schema_version (version_number, comment) VALUES (273, 'Drop not null constraint from event description #3223');
5540+
55365541
-- *** Insert new sql commands BEFORE this line ***

sormas-ui/src/main/java/de/symeda/sormas/ui/events/EventDataForm.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ protected void addFields() {
221221
Collections.singletonList(EventDto.DISEASE_DETAILS),
222222
Collections.singletonList(Disease.OTHER));
223223

224-
setRequired(true, EventDto.EVENT_STATUS, EventDto.UUID, EventDto.EVENT_DESC, EventDto.REPORT_DATE_TIME, EventDto.REPORTING_USER);
224+
setRequired(true, EventDto.EVENT_STATUS, EventDto.UUID, EventDto.EVENT_TITLE, EventDto.REPORT_DATE_TIME, EventDto.REPORTING_USER);
225225

226226
FieldHelper.setVisibleWhen(getFieldGroup(), EventDto.END_DATE, EventDto.MULTI_DAY_EVENT, Collections.singletonList(true), true);
227227
FieldHelper.setCaptionWhen(

0 commit comments

Comments
 (0)