Skip to content

Commit

Permalink
Merge 23.7 to develop
Browse files Browse the repository at this point in the history
  • Loading branch information
labkey-teamcity committed Oct 24, 2023
2 parents 5714005 + 1e95d66 commit 93e9a20
Show file tree
Hide file tree
Showing 9 changed files with 673 additions and 109 deletions.
1 change: 1 addition & 0 deletions api-src/org/labkey/api/snd/Event.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public class Event

public static final String SND_EVENT_DATE_CSS_CLASS = "snd-event-date";
public static final String SND_EVENT_SUBJECT_CSS_CLASS = "snd-event-subject";
public static final String SND_EVENT_NOTE_CSS_CLASS = "snd-event-note";

public static final String SND_EXCEPTION_MSG_JSON = "message";
public static final String SND_EXCEPTION_SEVERITY_JSON = "severity";
Expand Down
41 changes: 41 additions & 0 deletions api-src/org/labkey/api/snd/EventNote.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package org.labkey.api.snd;

public class EventNote
{
private Integer _eventId;
private String _note;
private Integer _eventNoteId;
private String _container;

public static final String EVENT_ID = "eventId";
public static final String NOTE = "note";
public static final String EVENT_NOTE_ID = "eventNoteId";
public static final String CONTAINER = "Container";

public EventNote(Integer eventId, String note, Integer eventNoteId) {
_eventId = eventId;
_note = note;
_eventNoteId = eventNoteId;
}

public EventNote () {}

public Integer getEventId()
{
return _eventId;
}

public void setEventId(Integer eventId)
{
_eventId = eventId;
}

public String getNote() { return _note; }

public void setNote(String note) { _note = note; }

public Integer getEventNoteId() { return _eventNoteId; }

public void setEventNoteId(Integer eventNoteId) { _eventNoteId = eventNoteId; }

}
2 changes: 1 addition & 1 deletion api-src/org/labkey/api/snd/SNDService.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ static SNDService get()
void fillInNarrativeCache(Container c, User u, Logger logger);
void clearNarrativeCache(Container c, User u);
void deleteNarrativeCacheRows(Container c, User u, List<Map<String, Object>> eventIds);
void populateNarrativeCache(Container c, User u, List<Map<String, Object>> eventIds, Logger logger);
void populateNarrativeCache(Container c, User u, List<Integer> eventIds, Logger logger);
Map<Integer, Category> getAllCategories(Container c, User u);
Integer getQCStateId(Container c, User u, QCStateEnum qcState);
QCStateEnum getQCState(Container c, User u, int qcStateId);
Expand Down
18 changes: 18 additions & 0 deletions api-src/org/labkey/api/snd/SuperPackage.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.function.Function;

import static org.labkey.api.snd.Package.PKG_ATTRIBUTES;

Expand All @@ -41,7 +42,9 @@ public class SuperPackage
private Integer _pkgId;
private Package _pkg;
private String _superPkgPath;
private String _treePath;
private Integer _parentSuperPkgId;
private Integer _topLevelPkgId;
private String _description; // From referenced package
private String _narrative; // From referenced package
private Integer _sortOrder;
Expand All @@ -51,13 +54,16 @@ public class SuperPackage

public static final String SUPERPKG_ID = "superPkgId";
public static final String SUPERPKG_PARENTID = "parentSuperPkgId";
public static final String SUPERPKG_TOP_LEVEL_PKGID = "topLevelPkgId";
public static final String SUPERPKG_PKGID = "pkgId";
public static final String SUPERPKG_DESCRIPTION = "description";
public static final String SUPERPKG_NARRATIVE = "narrative";
public static final String SUPERPKG_ORDER = "sortOrder";
public static final String SUPERPKG_REPEATABLE = "repeatable";
public static final String SUPERPKG_PATH = "superPkgPath";
public static final String SUPERPKG_TREEPATH = "treePath";
public static final String SUPERPKG_REQUIRED = "required";
public static final String SUPERPKG_PKGID_CSS_CLASS = "snd-superpkg-pkg-id";

public SuperPackage()
{
Expand Down Expand Up @@ -96,6 +102,11 @@ public void setParentSuperPkgId(Integer parentSuperPkgId)
_parentSuperPkgId = parentSuperPkgId;
}

@Nullable
public Integer getTopLevelPkgId() { return _topLevelPkgId; }

public void setTopLevelPkgId(Integer topLevelPkgId) { _topLevelPkgId = topLevelPkgId; }

@Nullable
public List<SuperPackage> getChildPackages()
{
Expand Down Expand Up @@ -156,6 +167,11 @@ public void setSuperPkgPath(String superPkgPath)
_superPkgPath = superPkgPath;
}

@Nullable
public String getTreePath() { return _treePath; }

public void setTreePath(String treePath) { _treePath = treePath; }

@Nullable
public Integer getSuperPkgId()
{
Expand Down Expand Up @@ -211,6 +227,8 @@ public Map<String, Object> getSuperPackageRow(Container c)
superPkgValues.put("container", c);
superPkgValues.put(SUPERPKG_PATH, getSuperPkgPath());
superPkgValues.put(SUPERPKG_REQUIRED, getRequired());
superPkgValues.put(SUPERPKG_TREEPATH, getTreePath());
superPkgValues.put(SUPERPKG_TOP_LEVEL_PKGID, getTopLevelPkgId());

return superPkgValues;
}
Expand Down
4 changes: 2 additions & 2 deletions src/org/labkey/snd/SNDController.java
Original file line number Diff line number Diff line change
Expand Up @@ -1123,9 +1123,9 @@ private List<AttributeData> parseAttributeData(JSONArray attributesDataJson)
}
else
{
propertyId = attributeJson.getInt("propertyId");
propertyId = attributeJson.optInt("propertyId");
}
String value = attributeJson.getString("value");
String value = attributeJson.optString("value");

// propertyDescriptor not used for saving, so make it null
if (propertyName != null)
Expand Down
Loading

0 comments on commit 93e9a20

Please sign in to comment.