Skip to content

Commit

Permalink
feat(DHIS2-17506): enable configuring a section display options
Browse files Browse the repository at this point in the history
  • Loading branch information
Flaminia Cavallo authored and Flaminia Cavallo committed Jun 26, 2024
1 parent fbe637c commit 1965747
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ public class DataSet extends BaseDimensionalItemObject

private ObjectStyle style;

private String displayOptions;

// -------------------------------------------------------------------------
// Constructors
// -------------------------------------------------------------------------
Expand Down Expand Up @@ -778,6 +780,16 @@ public void setStyle(ObjectStyle style) {
this.style = style;
}

@JsonProperty
@JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
public String getDisplayOptions() {
return displayOptions;
}

public void setDisplayOptions(String displayOptions) {
this.displayOptions = displayOptions;
}

@Override
@JsonProperty
@JacksonXmlProperty(namespace = DxfNamespaces.DXF_2_0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

<property name="style" type="jbObjectStyle" column="style" />

<property name="displayOptions" type="jbPlainString" column="displayoptions" length="50000" />

<many-to-one name="periodType" lazy="false" class="org.hisp.dhis.period.PeriodType" column="periodtypeid"
not-null="true" foreign-key="fk_dataset_periodtypeid" />

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE dataset ADD COLUMN IF NOT EXISTS displayoptions jsonb default '{}'::jsonb;

0 comments on commit 1965747

Please sign in to comment.