Skip to content

Commit

Permalink
impl
Browse files Browse the repository at this point in the history
Issue #391
  • Loading branch information
rsoika committed Jun 6, 2024
1 parent a77201f commit 79fdba0
Showing 1 changed file with 0 additions and 47 deletions.
47 changes: 0 additions & 47 deletions src/main/java/org/imixs/marty/team/TeamController.java
Original file line number Diff line number Diff line change
Expand Up @@ -638,53 +638,6 @@ private List<ItemCollection> getMemberListByRole(String aUniqueID, String role)
return resultList;
}

/**
* This method updates the space.ref item with the first space ID the current
* user is member of.
* The method can be used as a default selector as in the Imixs-Office-Workflwo
* form part 'spaceref.xhtml'
*
* The method updates the items space.ref and space.name and returns the
* space.ref
*/
public String setDefaultSpace(ItemCollection workitem) {
// If the current workitem is assigned to a process then first resolve all
// spaces assigned to this process...
ItemCollection defaultSpace = null;
List<ItemCollection> _spaceList = getSpacesByProcessId(workitem.getItemValueString("process.Ref"));
if (_spaceList != null) {
for (ItemCollection space : _spaceList) {
if (space.getItemValueBoolean("isMember")) {
defaultSpace = space;
break;
}
}
}
// we did not yet find a matching space in the process list.
// so we iterate over all spaces
if (defaultSpace == null) {
_spaceList = getSpaces();
if (_spaceList != null) {
for (ItemCollection space : _spaceList) {
if (space.getItemValueBoolean("isMember")) {
defaultSpace = space;
break;
}
}
}
}
// do we have a match?
if (defaultSpace != null) {
workitem.setItemValue("space.ref", defaultSpace.getUniqueID());
workitem.setItemValue("space.name", defaultSpace.getItemValueString("name"));
return defaultSpace.getUniqueID();
}

// no match !
return "";

}

/**
* This method resolves the field 'process.default.ref'.
* This fields holds the first space ID the current user is member of.
Expand Down

0 comments on commit 79fdba0

Please sign in to comment.