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

usage per team #47

Open
punkyard opened this issue Sep 3, 2023 · 3 comments
Open

usage per team #47

punkyard opened this issue Sep 3, 2023 · 3 comments
Labels
feature request Request for a feature

Comments

@punkyard
Copy link

punkyard commented Sep 3, 2023

hi
i think i understand the app creates one single shift plan for everybody in next cloud instance, as only one email admin address can be added, is this correct?

What about when we have 12 teams with different people in each, and would like to have a custom shift plan for each team?

for instance, if the admin group is not set as permitted to use this app, users/team manages can't access Shifts settings. Is this correct too?

so far I can't add a user-group, an email and save .. error: Could not save Settings
one AIO v7
shift 193

thanks for the update to NC27 !!

@punkyard punkyard closed this as completed Sep 3, 2023
@punkyard punkyard changed the title user usage usage per team Sep 3, 2023
@punkyard punkyard reopened this Sep 3, 2023
@punkyard
Copy link
Author

punkyard commented Sep 3, 2023

my logs

`[index] Error: OC\DB\Exceptions\DbalException: An exception occurred while executing a query: SQLSTATE[42803]: Grouping error: 7 ERROR: column "oc_shifts_type.id" must appear in the GROUP BY clause or be used in an aggregate function
LINE 1: SELECT "id", "skill_group_id" FROM "oc_shifts_type" GROUP BY...
^ at <>

  1. /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php line 295
    OC\DB\Exceptions\DbalException::wrap(["Doctrine\DBAL ... "])
  2. /var/www/html/lib/public/AppFramework/Db/QBMapper.php line 335
    OC\DB\QueryBuilder\QueryBuilder->executeQuery()
  3. /var/www/html/custom_apps/shifts/lib/Db/ShiftsTypeMapper.php line 74
    OCP\AppFramework\Db\QBMapper->findEntities(["OC\DB\QueryBuilder\QueryBuilder"])
  4. /var/www/html/custom_apps/shifts/lib/Controller/SettingsController.php line 79
    OCA\Shifts\Db\ShiftsTypeMapper->findAllSkillGroupIds()
  5. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 230
    OCA\Shifts\Controller\SettingsController->saveSettings("", true, "lerez0", "[email protected]", "Europe/Paris", "réz0s", "Analyst", "1", [[0,"Level 1"]])
  6. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 137
    OC\AppFramework\Http\Dispatcher->executeController(["OCA\Shifts\C ... "], "saveSettings")
  7. /var/www/html/lib/private/AppFramework/App.php line 183
    OC\AppFramework\Http\Dispatcher->dispatch(["OCA\Shifts\C ... "], "saveSettings")
  8. /var/www/html/lib/private/Route/Router.php line 315
    OC\AppFramework\App::main("OCA\Shifts\Co ... r", "saveSettings", ["OC\AppFramewo ... "], ["shifts.settings.saveSettings"])
  9. /var/www/html/lib/base.php line 1071
    OC\Route\Router->match("/apps/shifts/settings")
  10. /var/www/html/index.php line 36
    OC::handleRequest()

Caused by:

Doctrine\DBAL\Exception\DriverException: An exception occurred while executing a query: SQLSTATE[42803]: Grouping error: 7 ERROR: column "oc_shifts_type.id" must appear in the GROUP BY clause or be used in an aggregate function
LINE 1: SELECT "id", "skill_group_id" FROM "oc_shifts_type" GROUP BY...
^ at <>

  1. /var/www/html/3rdparty/doctrine/dbal/src/Connection.php line 1814
    Doctrine\DBAL\Driver\API\PostgreSQL\ExceptionConverter->convert(["Doctrine\DBAL ... "], ["Doctrine\DBAL\Query"])
  2. /var/www/html/3rdparty/doctrine/dbal/src/Connection.php line 1749
    Doctrine\DBAL\Connection->handleDriverException(["Doctrine\DBAL ... "], ["Doctrine\DBAL\Query"])
  3. /var/www/html/3rdparty/doctrine/dbal/src/Connection.php line 1055
    Doctrine\DBAL\Connection->convertExceptionDuringQuery(["Doctrine\DBAL ... "], "SELECT "id", ... "", [], [])
  4. /var/www/html/lib/private/DB/Connection.php line 262
    Doctrine\DBAL\Connection->executeQuery("SELECT "id", ... "", [], [], null)
  5. /var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php line 345
    OC\DB\Connection->executeQuery("SELECT "id", ... "", [], [])
  6. /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php line 280
    Doctrine\DBAL\Query\QueryBuilder->execute()
  7. /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php line 293
    OC\DB\QueryBuilder\QueryBuilder->execute()
  8. /var/www/html/lib/public/AppFramework/Db/QBMapper.php line 335
    OC\DB\QueryBuilder\QueryBuilder->executeQuery()
  9. /var/www/html/custom_apps/shifts/lib/Db/ShiftsTypeMapper.php line 74
    OCP\AppFramework\Db\QBMapper->findEntities(["OC\DB\QueryBuilder\QueryBuilder"])
  10. /var/www/html/custom_apps/shifts/lib/Controller/SettingsController.php line 79
    OCA\Shifts\Db\ShiftsTypeMapper->findAllSkillGroupIds()
  11. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 230
    OCA\Shifts\Controller\SettingsController->saveSettings("", true, "lerez0", "[email protected]", "Europe/Paris", "réz0s", "Analyst", "1", [[0,"Level 1"]])
  12. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 137
    OC\AppFramework\Http\Dispatcher->executeController(["OCA\Shifts\C ... "], "saveSettings")
  13. /var/www/html/lib/private/AppFramework/App.php line 183
    OC\AppFramework\Http\Dispatcher->dispatch(["OCA\Shifts\C ... "], "saveSettings")
  14. /var/www/html/lib/private/Route/Router.php line 315
    OC\AppFramework\App::main("OCA\Shifts\Co ... r", "saveSettings", ["OC\AppFramewo ... "], ["shifts.settings.saveSettings"])
  15. /var/www/html/lib/base.php line 1071
    OC\Route\Router->match("/apps/shifts/settings")
  16. /var/www/html/index.php line 36
    OC::handleRequest()

Caused by:

Doctrine\DBAL\Driver\PDO\Exception: SQLSTATE[42803]: Grouping error: 7 ERROR: column "oc_shifts_type.id" must appear in the GROUP BY clause or be used in an aggregate function
LINE 1: SELECT "id", "skill_group_id" FROM "oc_shifts_type" GROUP BY...
^ at <>

  1. /var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Connection.php line 77
    Doctrine\DBAL\Driver\PDO\Exception::new(["PDOException", ... ]])
  2. /var/www/html/3rdparty/doctrine/dbal/src/Connection.php line 1050
    Doctrine\DBAL\Driver\PDO\Connection->query("SELECT "id", ... "")
  3. /var/www/html/lib/private/DB/Connection.php line 262
    Doctrine\DBAL\Connection->executeQuery("SELECT "id", ... "", [], [], null)
  4. /var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php line 345
    OC\DB\Connection->executeQuery("SELECT "id", ... "", [], [])
  5. /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php line 280
    Doctrine\DBAL\Query\QueryBuilder->execute()
  6. /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php line 293
    OC\DB\QueryBuilder\QueryBuilder->execute()
  7. /var/www/html/lib/public/AppFramework/Db/QBMapper.php line 335
    OC\DB\QueryBuilder\QueryBuilder->executeQuery()
  8. /var/www/html/custom_apps/shifts/lib/Db/ShiftsTypeMapper.php line 74
    OCP\AppFramework\Db\QBMapper->findEntities(["OC\DB\QueryBuilder\QueryBuilder"])
  9. /var/www/html/custom_apps/shifts/lib/Controller/SettingsController.php line 79
    OCA\Shifts\Db\ShiftsTypeMapper->findAllSkillGroupIds()
  10. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 230
    OCA\Shifts\Controller\SettingsController->saveSettings("", true, "lerez0", "[email protected]", "Europe/Paris", "réz0s", "Analyst", "1", [[0,"Level 1"]])
  11. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 137
    OC\AppFramework\Http\Dispatcher->executeController(["OCA\Shifts\C ... "], "saveSettings")
  12. /var/www/html/lib/private/AppFramework/App.php line 183
    OC\AppFramework\Http\Dispatcher->dispatch(["OCA\Shifts\C ... "], "saveSettings")
  13. /var/www/html/lib/private/Route/Router.php line 315
    OC\AppFramework\App::main("OCA\Shifts\Co ... r", "saveSettings", ["OC\AppFramewo ... "], ["shifts.settings.saveSettings"])
  14. /var/www/html/lib/base.php line 1071
    OC\Route\Router->match("/apps/shifts/settings")
  15. /var/www/html/index.php line 36
    OC::handleRequest()

Caused by:

PDOException: SQLSTATE[42803]: Grouping error: 7 ERROR: column "oc_shifts_type.id" must appear in the GROUP BY clause or be used in an aggregate function
LINE 1: SELECT "id", "skill_group_id" FROM "oc_shifts_type" GROUP BY...
^ at <>

  1. /var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Connection.php line 72
    PDO->query("SELECT "id", ... "")
  2. /var/www/html/3rdparty/doctrine/dbal/src/Connection.php line 1050
    Doctrine\DBAL\Driver\PDO\Connection->query("SELECT "id", ... "")
  3. /var/www/html/lib/private/DB/Connection.php line 262
    Doctrine\DBAL\Connection->executeQuery("SELECT "id", ... "", [], [], null)
  4. /var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php line 345
    OC\DB\Connection->executeQuery("SELECT "id", ... "", [], [])
  5. /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php line 280
    Doctrine\DBAL\Query\QueryBuilder->execute()
  6. /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php line 293
    OC\DB\QueryBuilder\QueryBuilder->execute()
  7. /var/www/html/lib/public/AppFramework/Db/QBMapper.php line 335
    OC\DB\QueryBuilder\QueryBuilder->executeQuery()
  8. /var/www/html/custom_apps/shifts/lib/Db/ShiftsTypeMapper.php line 74
    OCP\AppFramework\Db\QBMapper->findEntities(["OC\DB\QueryBuilder\QueryBuilder"])
  9. /var/www/html/custom_apps/shifts/lib/Controller/SettingsController.php line 79
    OCA\Shifts\Db\ShiftsTypeMapper->findAllSkillGroupIds()
  10. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 230
    OCA\Shifts\Controller\SettingsController->saveSettings("", true, "lerez0", "[email protected]", "Europe/Paris", "réz0s", "Analyst", "1", [[0,"Level 1"]])
  11. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 137
    OC\AppFramework\Http\Dispatcher->executeController(["OCA\Shifts\C ... "], "saveSettings")
  12. /var/www/html/lib/private/AppFramework/App.php line 183
    OC\AppFramework\Http\Dispatcher->dispatch(["OCA\Shifts\C ... "], "saveSettings")
  13. /var/www/html/lib/private/Route/Router.php line 315
    OC\AppFramework\App::main("OCA\Shifts\Co ... r", "saveSettings", ["OC\AppFramewo ... "], ["shifts.settings.saveSettings"])
  14. /var/www/html/lib/base.php line 1071
    OC\Route\Router->match("/apps/shifts/settings")
  15. /var/www/html/index.php line 36
    OC::handleRequest()

PUT /apps/shifts/settings
from 185.252.235.96 by lerez0 at 2023-09-03T22:59:01+00:00`

@punkyard punkyard closed this as completed Sep 3, 2023
@punkyard punkyard reopened this Sep 3, 2023
@punkyard
Copy link
Author

punkyard commented Sep 3, 2023

in fact, the search function does not work in the config page in admin settings

@csoc-kevink
Copy link
Collaborator

Hi @punkyard,

yes, currently there is only one plan for everybody. Multiple plans for differen groups would be a nice feature. I've added it to our todo. I think we will implement this feature together with the refactored backend since the current structure of the backend (and frontend) do not allow such a feature.

The admin settings are only accessible for Nextcloud-Admins, regardless of your shifts app user status.
For the new feature it would be good when the shift admins can create new plans.

I think you have the same issue as described in #45
A quick fix will be to remove 'only_full_group_by' from your SQL_MODE (SHOW VARIABLES LIKE 'sql_mode').

@csoc-kevink csoc-kevink added the feature request Request for a feature label Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request for a feature
Projects
None yet
Development

No branches or pull requests

2 participants