From c08e22f927313f94f344c807876688cc192190d5 Mon Sep 17 00:00:00 2001 From: "Dzial Techniczny WMW Projekt s.c" Date: Wed, 15 Jan 2020 17:07:50 +0100 Subject: Default for task assignee field is now logged-in user ID - fixes #111 --- plugins/DefaultSelfAssign/Plugin.php | 51 ++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 plugins/DefaultSelfAssign/Plugin.php (limited to 'plugins/DefaultSelfAssign/Plugin.php') diff --git a/plugins/DefaultSelfAssign/Plugin.php b/plugins/DefaultSelfAssign/Plugin.php new file mode 100644 index 00000000..48a966d3 --- /dev/null +++ b/plugins/DefaultSelfAssign/Plugin.php @@ -0,0 +1,51 @@ +hook->on('controller:task-creation:form:default', function($values) use($container) { + $user = $container->userSession->getId(); + return array('owner_id' => $user); + }); + } + + public function onStartup() + { + } + + public function getPluginName() + { + return 'DefaultSelfAssign'; + } + + public function getPluginDescription() + { + return 'Self-assign tasks by default'; + } + + public function getPluginAuthor() + { + return 'mkl'; + } + + public function getPluginVersion() + { + return '1.0.0'; + } + + public function getPluginHomepage() + { + return 'https://kanban.intranet/'; + } + + public function getClasses() { + return array(); + } +} -- cgit v1.2.3