Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(DHIS2-17506): enable configuring a section display options #17891

Merged
merged 3 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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() {
jbee marked this conversation as resolved.
Show resolved Hide resolved
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;
Loading