Commit 5bd9e432b1de74fadc4dbdecb9e9e53323d4c6be
1 parent
a6e28e40
(#2616) added check to see if default users have been assigned to routing steps
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2407 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
15 additions
and
7 deletions
presentation/lookAndFeel/knowledgeTree/documentmanagement/viewBL.php
| @@ -86,14 +86,22 @@ if (checkSession()) { | @@ -86,14 +86,22 @@ if (checkSession()) { | ||
| 86 | $oDocument->beginCollaborationProcess(); | 86 | $oDocument->beginCollaborationProcess(); |
| 87 | $sStatusMessage = "Document collaboration successfully started"; | 87 | $sStatusMessage = "Document collaboration successfully started"; |
| 88 | $oPatternCustom->setHtml(getStatusPage($oDocument, $sStatusMessage)); | 88 | $oPatternCustom->setHtml(getStatusPage($oDocument, $sStatusMessage)); |
| 89 | - } else { | ||
| 90 | - //not all the roles have actual users assigned to them, so we must assign the | ||
| 91 | - //default users and then proceed | 89 | + } else { |
| 90 | + // check that default users have been assigned to the routing steps before using them | ||
| 92 | 91 | ||
| 93 | - FolderUserRole::createDefaultFolderUserRoles($oDocument); | ||
| 94 | - $oDocument->beginCollaborationProcess(); | ||
| 95 | - $sStatusMessage = "Document collaboration successfully started"; | ||
| 96 | - $oPatternCustom->setHtml(getStatusPage($oDocument, $sStatusMessage)); | 92 | + if (FolderCollaboration::defaultUsersAssigned($aFolderCollaboration)) { |
| 93 | + //not all the roles have actual users assigned to them, so we must assign the | ||
| 94 | + //default users and then proceed | ||
| 95 | + | ||
| 96 | + FolderUserRole::createDefaultFolderUserRoles($oDocument); | ||
| 97 | + $oDocument->beginCollaborationProcess(); | ||
| 98 | + $sStatusMessage = "Document collaboration successfully started"; | ||
| 99 | + $oPatternCustom->setHtml(getStatusPage($oDocument, $sStatusMessage)); | ||
| 100 | + } else { | ||
| 101 | + // the folder does not have default users assigned for the routing steps | ||
| 102 | + $sStatusMessage = "Default users have not been assigned at the folder level. Please set these up, or choose specific users for this document before attempting to start collaboration."; | ||
| 103 | + $oPatternCustom->setHtml(getStatusPage($oDocument, $sStatusMessage)); | ||
| 104 | + } | ||
| 97 | } | 105 | } |
| 98 | } else { | 106 | } else { |
| 99 | //the folder has no collaboration set up yet, so we can't start document collaboration | 107 | //the folder has no collaboration set up yet, so we can't start document collaboration |