note sur les issues et report pv propal

This commit is contained in:
afornerot 2024-09-06 17:56:42 +02:00
parent 4c9b0a1db2
commit 442718316d
7 changed files with 417 additions and 193 deletions

View File

@ -1,371 +1,374 @@
#== Home ========================================================================================================
app_home:
path: /
defaults: { _controller: App\Controller\HomeController:home }
path: /
defaults: { _controller: App\Controller\HomeController:home }
app_admin:
path: /admin/home
defaults: { _controller: App\Controller\HomeController:admin }
path: /admin/home
defaults: { _controller: App\Controller\HomeController:admin }
app_ckeditor_upload:
path: /user/activity/upload
defaults: { _controller: App\Controller\HomeController:upload }
path: /user/activity/upload
defaults: { _controller: App\Controller\HomeController:upload }
#== Security ====================================================================================================
app_login:
path: /login
defaults: { _controller: App\Controller\SecurityController:login }
path: /login
defaults: { _controller: App\Controller\SecurityController:login }
app_logout:
path: /logout
defaults: { _controller: App\Controller\SecurityController:logout }
path: /logout
defaults: { _controller: App\Controller\SecurityController:logout }
app_login_callback:
path: /logincallback
defaults: { _controller: App\Controller\SecurityController:callback }
path: /logincallback
defaults: { _controller: App\Controller\SecurityController:callback }
app_casdebug:
path: /user/casdebug
defaults: { _controller: App\Controller\SecurityController:casdebug }
path: /user/casdebug
defaults: { _controller: App\Controller\SecurityController:casdebug }
#== Config ==============================================================================================================
app_config:
path: /admin/config
defaults: { _controller: App\Controller\ConfigController:list }
path: /admin/config
defaults: { _controller: App\Controller\ConfigController:list }
app_config_render:
path: /admin/config/render/{category}
defaults: { _controller: App\Controller\ConfigController:listrender }
path: /admin/config/render/{category}
defaults: { _controller: App\Controller\ConfigController:listrender }
app_config_submit:
path: /admin/config/submit
defaults: { _controller: App\Controller\ConfigController:submit }
path: /admin/config/submit
defaults: { _controller: App\Controller\ConfigController:submit }
app_config_update:
path: /admin/config/update/{id}
defaults: { _controller: App\Controller\ConfigController:update }
path: /admin/config/update/{id}
defaults: { _controller: App\Controller\ConfigController:update }
app_config_delete:
path: /admin/config/delete/{id}
defaults: { _controller: App\Controller\ConfigController:delete }
path: /admin/config/delete/{id}
defaults: { _controller: App\Controller\ConfigController:delete }
app_config_logo:
path: /admin/config/logo
defaults: { _controller: App\Controller\ConfigController:logo }
path: /admin/config/logo
defaults: { _controller: App\Controller\ConfigController:logo }
#== Theme ================================================================================================================
app_theme:
path: /admin/theme
defaults: { _controller: App\Controller\ThemeController:list }
path: /admin/theme
defaults: { _controller: App\Controller\ThemeController:list }
app_theme_select:
path: /admin/theme/select/{name}
defaults: { _controller: App\Controller\ThemeController:select, name: "" }
path: /admin/theme/select/{name}
defaults: { _controller: App\Controller\ThemeController:select, name: "" }
#== Sonde ================================================================================================================
app_sonde:
path: /sonde
defaults: { _controller: App\Controller\SondeController:sonde }
path: /sonde
defaults: { _controller: App\Controller\SondeController:sonde }
#== Wss ==================================================================================================================
app_wss_sample:
path: /user/wss/sample
defaults: { _controller: App\Controller\WebsocketController:sample }
path: /user/wss/sample
defaults: { _controller: App\Controller\WebsocketController:sample }
#== Crop =================================================================================================================
app_crop01:
path: /user/crop01/{type}/{reportinput}
defaults: { _controller: App\Controller\CropController:crop01 }
path: /user/crop01/{type}/{reportinput}
defaults: { _controller: App\Controller\CropController:crop01 }
app_crop02:
path: /user/crop02/{type}/{reportinput}
defaults: { _controller: App\Controller\CropController:crop02 }
path: /user/crop02/{type}/{reportinput}
defaults: { _controller: App\Controller\CropController:crop02 }
app_ckupload:
path: /user/ckupload
defaults: { _controller: App\Controller\CropController:ckupload }
path: /user/ckupload
defaults: { _controller: App\Controller\CropController:ckupload }
oneup_uploader:
resource: .
type: uploader
resource: .
type: uploader
#== Cron =================================================================================================================
app_cron:
path: /admin/cron
defaults: { _controller: App\Controller\CronController:list }
path: /admin/cron
defaults: { _controller: App\Controller\CronController:list }
app_cron_ajax_list:
path: /admin/cron/ajax/list
defaults: { _controller: App\Controller\CronController:ajaxlist }
path: /admin/cron/ajax/list
defaults: { _controller: App\Controller\CronController:ajaxlist }
app_cron_update:
path: /admin/cron/update/{id}
defaults: { _controller: App\Controller\CronController:update }
path: /admin/cron/update/{id}
defaults: { _controller: App\Controller\CronController:update }
app_cron_exec:
path: /admin/cron/exec/{id}
defaults: { _controller: App\Controller\CronController:exec }
path: /admin/cron/exec/{id}
defaults: { _controller: App\Controller\CronController:exec }
app_cron_log:
path: /admin/cron/log
defaults: { _controller: App\Controller\CronController:log }
path: /admin/cron/log
defaults: { _controller: App\Controller\CronController:log }
app_cron_getlog:
path: /admin/cron/getlog/{id}
defaults: { _controller: App\Controller\CronController:getlog }
path: /admin/cron/getlog/{id}
defaults: { _controller: App\Controller\CronController:getlog }
#== User ========================================================================================================
app_user:
path: /admin/user
defaults: { _controller: App\Controller\UserController:list }
path: /admin/user
defaults: { _controller: App\Controller\UserController:list }
app_user_update:
path: /admin/user/update/{id}
defaults: { _controller: App\Controller\UserController:update }
path: /admin/user/update/{id}
defaults: { _controller: App\Controller\UserController:update }
app_user_delete:
path: /admin/user/delete/{id}
defaults: { _controller: App\Controller\UserController:delete }
path: /admin/user/delete/{id}
defaults: { _controller: App\Controller\UserController:delete }
app_user_select:
path: /user/user/select
defaults: { _controller: App\Controller\UserController:select }
path: /user/user/select
defaults: { _controller: App\Controller\UserController:select }
app_user_info:
path: /user/info
defaults: { _controller: App\Controller\UserController:info }
path: /user/info
defaults: { _controller: App\Controller\UserController:info }
app_user_profil:
path: /user/profil
defaults: { _controller: App\Controller\UserController:profil }
path: /user/profil
defaults: { _controller: App\Controller\UserController:profil }
app_user_preference:
path: /user/preference
defaults: { _controller: App\Controller\UserController:preference }
path: /user/preference
defaults: { _controller: App\Controller\UserController:preference }
#== Group ========================================================================================================
app_group:
path: /admin/group
defaults: { _controller: App\Controller\GroupController:list }
path: /admin/group
defaults: { _controller: App\Controller\GroupController:list }
app_group_submit:
path: /admin/group/submit
defaults: { _controller: App\Controller\GroupController:submit }
path: /admin/group/submit
defaults: { _controller: App\Controller\GroupController:submit }
app_group_update:
path: /admin/group/update/{id}
defaults: { _controller: App\Controller\GroupController:update }
path: /admin/group/update/{id}
defaults: { _controller: App\Controller\GroupController:update }
app_group_delete:
path: /admin/group/delete/{id}
defaults: { _controller: App\Controller\GroupController:delete }
path: /admin/group/delete/{id}
defaults: { _controller: App\Controller\GroupController:delete }
app_group_select:
path: /user/group/select
defaults: { _controller: App\Controller\GroupController:select }
path: /user/group/select
defaults: { _controller: App\Controller\GroupController:select }
#== Report =======================================================================================================
app_report_list:
path: /user/report/list/{id}
defaults: { _controller: App\Controller\ReportController:list }
path: /user/report/list/{id}
defaults: { _controller: App\Controller\ReportController:list }
app_report_csv:
path: /user/report/csv/{id}
defaults: { _controller: App\Controller\ReportController:csv }
path: /user/report/csv/{id}
defaults: { _controller: App\Controller\ReportController:csv }
app_report_milestone:
path: /user/report/milestone/{idscrum}/{mode}/{month}
defaults: { _controller: App\Controller\ReportController:milestone }
app_report_test:
path: /user/report/test/{id}
defaults: { _controller: App\Controller\ReportController:test }
path: /user/report/test/{id}
defaults: { _controller: App\Controller\ReportController:test }
#== Scrum ========================================================================================================
app_scrum:
path: /user/scrum
defaults: { _controller: App\Controller\ScrumController:list }
path: /user/scrum
defaults: { _controller: App\Controller\ScrumController:list }
app_scrum_submit:
path: /master/scrum/submit
defaults: { _controller: App\Controller\ScrumController:submit }
path: /master/scrum/submit
defaults: { _controller: App\Controller\ScrumController:submit }
app_scrum_update:
path: /master/scrum/update/{id}
defaults: { _controller: App\Controller\ScrumController:update }
path: /master/scrum/update/{id}
defaults: { _controller: App\Controller\ScrumController:update }
app_scrum_delete:
path: /master/scrum/delete/{id}
defaults: { _controller: App\Controller\ScrumController:delete }
path: /master/scrum/delete/{id}
defaults: { _controller: App\Controller\ScrumController:delete }
app_scrum_view:
path: /user/scrum/{id}
defaults: { _controller: App\Controller\ScrumController:view }
path: /user/scrum/{id}
defaults: { _controller: App\Controller\ScrumController:view }
app_scrum_table:
path: /user/scrum/table/{id}
defaults: { _controller: App\Controller\ScrumController:table }
path: /user/scrum/table/{id}
defaults: { _controller: App\Controller\ScrumController:table }
app_scrum_stat:
path: /user/scrum/stat/{id}
defaults: { _controller: App\Controller\ScrumController:stat }
path: /user/scrum/stat/{id}
defaults: { _controller: App\Controller\ScrumController:stat }
app_scrum_link:
path: /user/scrum/link/{id}
defaults: { _controller: App\Controller\ScrumController:link }
path: /user/scrum/link/{id}
defaults: { _controller: App\Controller\ScrumController:link }
app_scrum_info:
path: /user/scrum/info/{id}
defaults: { _controller: App\Controller\ScrumController:info }
path: /user/scrum/info/{id}
defaults: { _controller: App\Controller\ScrumController:info }
#== Scrumcolumn ========================================================================================================
app_scrumcolumn_submit:
path: /master/scrumcolumn/submit/{scrumid}
defaults: { _controller: App\Controller\ScrumcolumnController:submit }
path: /master/scrumcolumn/submit/{scrumid}
defaults: { _controller: App\Controller\ScrumcolumnController:submit }
app_scrumcolumn_update:
path: /master/scrumcolumn/update/{id}
defaults: { _controller: App\Controller\ScrumcolumnController:update }
path: /master/scrumcolumn/update/{id}
defaults: { _controller: App\Controller\ScrumcolumnController:update }
app_scrumcolumn_delete:
path: /master/scrumcolumn/delete/{id}
defaults: { _controller: App\Controller\ScrumcolumnController:delete }
path: /master/scrumcolumn/delete/{id}
defaults: { _controller: App\Controller\ScrumcolumnController:delete }
app_scrumcolumn_select:
path: /master/scrumcolumn/select/{scrumid}
defaults: { _controller: App\Controller\ScrumcolumnController:select }
path: /master/scrumcolumn/select/{scrumid}
defaults: { _controller: App\Controller\ScrumcolumnController:select }
app_scrumcolumn_order:
path: /master/scrumcolumn/order/{scrumid}
defaults: { _controller: App\Controller\ScrumcolumnController:order }
path: /master/scrumcolumn/order/{scrumid}
defaults: { _controller: App\Controller\ScrumcolumnController:order }
#== Scrumteam ========================================================================================================
app_scrumteam_submit:
path: /master/scrumteam/submit/{scrumid}
defaults: { _controller: App\Controller\ScrumteamController:submit }
path: /master/scrumteam/submit/{scrumid}
defaults: { _controller: App\Controller\ScrumteamController:submit }
app_scrumteam_update:
path: /master/scrumteam/update/{id}
defaults: { _controller: App\Controller\ScrumteamController:update }
path: /master/scrumteam/update/{id}
defaults: { _controller: App\Controller\ScrumteamController:update }
app_scrumteam_delete:
path: /master/scrumteam/delete/{id}
defaults: { _controller: App\Controller\ScrumteamController:delete }
path: /master/scrumteam/delete/{id}
defaults: { _controller: App\Controller\ScrumteamController:delete }
app_scrumteam_select:
path: /master/scrumteam/select/{scrumid}
defaults: { _controller: App\Controller\ScrumteamController:select }
path: /master/scrumteam/select/{scrumid}
defaults: { _controller: App\Controller\ScrumteamController:select }
app_scrumteam_order:
path: /master/scrumteam/order/{scrumid}
defaults: { _controller: App\Controller\ScrumteamController:order }
path: /master/scrumteam/order/{scrumid}
defaults: { _controller: App\Controller\ScrumteamController:order }
#== Scrumpriority ========================================================================================================
app_scrumpriority_submit:
path: /master/scrumpriority/submit/{scrumid}
defaults: { _controller: App\Controller\ScrumpriorityController:submit }
path: /master/scrumpriority/submit/{scrumid}
defaults: { _controller: App\Controller\ScrumpriorityController:submit }
app_scrumpriority_update:
path: /master/scrumpriority/update/{id}
defaults: { _controller: App\Controller\ScrumpriorityController:update }
path: /master/scrumpriority/update/{id}
defaults: { _controller: App\Controller\ScrumpriorityController:update }
app_scrumpriority_delete:
path: /master/scrumpriority/delete/{id}
defaults: { _controller: App\Controller\ScrumpriorityController:delete }
path: /master/scrumpriority/delete/{id}
defaults: { _controller: App\Controller\ScrumpriorityController:delete }
app_scrumpriority_select:
path: /master/scrumpriority/select/{scrumid}
defaults: { _controller: App\Controller\ScrumpriorityController:select }
path: /master/scrumpriority/select/{scrumid}
defaults: { _controller: App\Controller\ScrumpriorityController:select }
app_scrumpriority_order:
path: /master/scrumpriority/order/{scrumid}
defaults: { _controller: App\Controller\ScrumpriorityController:order }
path: /master/scrumpriority/order/{scrumid}
defaults: { _controller: App\Controller\ScrumpriorityController:order }
#== Scrumsprint ========================================================================================================
app_scrumsprint_submit:
path: /master/scrumsprint/submit/{scrumid}
defaults: { _controller: App\Controller\ScrumsprintController:submit }
path: /master/scrumsprint/submit/{scrumid}
defaults: { _controller: App\Controller\ScrumsprintController:submit }
app_scrumsprint_update:
path: /master/scrumsprint/update/{id}
defaults: { _controller: App\Controller\ScrumsprintController:update }
path: /master/scrumsprint/update/{id}
defaults: { _controller: App\Controller\ScrumsprintController:update }
app_scrumsprint_delete:
path: /master/scrumsprint/delete/{id}
defaults: { _controller: App\Controller\ScrumsprintController:delete }
path: /master/scrumsprint/delete/{id}
defaults: { _controller: App\Controller\ScrumsprintController:delete }
app_scrumsprint_select:
path: /master/scrumsprint/select/{scrumid}
defaults: { _controller: App\Controller\ScrumsprintController:select }
path: /master/scrumsprint/select/{scrumid}
defaults: { _controller: App\Controller\ScrumsprintController:select }
app_scrumsprint_order:
path: /master/scrumsprint/order/{scrumid}
defaults: { _controller: App\Controller\ScrumsprintController:order }
path: /master/scrumsprint/order/{scrumid}
defaults: { _controller: App\Controller\ScrumsprintController:order }
#== Scrumtype ========================================================================================================
app_scrumtype_submit:
path: /master/scrumtype/submit/{scrumid}
defaults: { _controller: App\Controller\ScrumtypeController:submit }
path: /master/scrumtype/submit/{scrumid}
defaults: { _controller: App\Controller\ScrumtypeController:submit }
app_scrumtype_update:
path: /master/scrumtype/update/{id}
defaults: { _controller: App\Controller\ScrumtypeController:update }
path: /master/scrumtype/update/{id}
defaults: { _controller: App\Controller\ScrumtypeController:update }
app_scrumtype_delete:
path: /master/scrumtype/delete/{id}
defaults: { _controller: App\Controller\ScrumtypeController:delete }
path: /master/scrumtype/delete/{id}
defaults: { _controller: App\Controller\ScrumtypeController:delete }
app_scrumtype_select:
path: /master/scrumtype/select/{scrumid}
defaults: { _controller: App\Controller\ScrumtypeController:select }
path: /master/scrumtype/select/{scrumid}
defaults: { _controller: App\Controller\ScrumtypeController:select }
app_scrumtype_order:
path: /master/scrumtype/order/{scrumid}
defaults: { _controller: App\Controller\ScrumtypeController:order }
path: /master/scrumtype/order/{scrumid}
defaults: { _controller: App\Controller\ScrumtypeController:order }
#== Scrumissue ========================================================================================================
app_scrumissue_change:
path: /user/scrumissue/change
defaults: { _controller: App\Controller\ScrumissueController:change }
path: /user/scrumissue/change
defaults: { _controller: App\Controller\ScrumissueController:change }
app_scrumissue_order:
path: /user/scrumissue/order
defaults: { _controller: App\Controller\ScrumissueController:order }
path: /user/scrumissue/order
defaults: { _controller: App\Controller\ScrumissueController:order }
app_scrumissue_info:
path: /user/scrumissue/info
defaults: { _controller: App\Controller\ScrumissueController:info }
path: /user/scrumissue/info
defaults: { _controller: App\Controller\ScrumissueController:info }
app_scrumissue_update:
path: /user/scrumissue/update
defaults: { _controller: App\Controller\ScrumissueController:update }
path: /user/scrumissue/update
defaults: { _controller: App\Controller\ScrumissueController:update }
app_scrumissue_block:
path: /user/scrumissue/block
defaults: { _controller: App\Controller\ScrumissueController:block }
path: /user/scrumissue/block
defaults: { _controller: App\Controller\ScrumissueController:block }
app_scrumissue_unblock:
path: /user/scrumissue/unblock
defaults: { _controller: App\Controller\ScrumissueController:unblock }
path: /user/scrumissue/unblock
defaults: { _controller: App\Controller\ScrumissueController:unblock }
app_scrumissue_color:
path: /user/scrumissue/color
defaults: { _controller: App\Controller\ScrumissueController:color }
path: /user/scrumissue/color
defaults: { _controller: App\Controller\ScrumissueController:color }
app_scrumissue_assigne:
path: /user/scrumissue/assigne
defaults: { _controller: App\Controller\ScrumissueController:assigne }
path: /user/scrumissue/assigne
defaults: { _controller: App\Controller\ScrumissueController:assigne }
app_scrumissue_notes:
path: /user/scrumissue/notes
defaults: { _controller: App\Controller\ScrumissueController:notes }
app_scrumissue_ctrlchange:
path: /user/scrumissue/ctrlchange
defaults: { _controller: App\Controller\ScrumissueController:ctrlchange }
path: /user/scrumissue/ctrlchange
defaults: { _controller: App\Controller\ScrumissueController:ctrlchange }
app_scrumissue_view:
path: /user/scrumissue/view/{id}
defaults: { _controller: App\Controller\ScrumissueController:view }
path: /user/scrumissue/view/{id}
defaults: { _controller: App\Controller\ScrumissueController:view }
#== Poker =============================================================================================================
app_poker_get:
path: /user/poker/{userid}/{issueid}
defaults: { _controller: App\Controller\ScrumissueController:getpoker }
path: /user/poker/{userid}/{issueid}
defaults: { _controller: App\Controller\ScrumissueController:getpoker }

View File

@ -6,24 +6,24 @@ services:
container_name: ninegitea-mariadb
restart: always
ports:
- "3306:3306"
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: changeme
MYSQL_DATABASE: ninegitea
MYSQL_USER: user
MYSQL_PASSWORD: changeme
MYSQL_PASSWORD: changeme
volumes:
- mariadb-data:/var/lib/mysql
- mariadb-data:/var/lib/mysql
ninegitea:
build:
context: .
dockerfile: ./misc/docker/Dockerfile
context: .
dockerfile: ./misc/docker/Dockerfile
container_name: ninegitea-app
image: reg.cadoles.com/envole/ninegitea
ports:
- "8005:80"
- "5588:5588"
- "8005:80"
- "5588:5588"
volumes:
- ./src:/app/src:delegated
- ./templates:/app/templates:delegated
@ -37,8 +37,9 @@ services:
container_name: ninegitea-adminer
restart: always
ports:
- 6081:8080
- 6081:8080
volumes:
mariadb-data:

View File

@ -13,6 +13,9 @@ use App\Service\giteaService;
class ReportController extends AbstractController
{
private KernelInterface $appKernel;
private giteaService $giteaservice;
public function __construct(KernelInterface $appKernel, giteaService $giteaservice) {
$this->appKernel = $appKernel;
$this->giteaservice = $giteaservice;
@ -114,6 +117,80 @@ class ReportController extends AbstractController
}
public function milestone($idscrum,$mode,$month,Request $request) {
$em = $this->getDoctrine()->getManager();
$scrum = $em->getRepository("App:Scrum")->find($idscrum);
$datestart=new \DateTime($month."01");
$dateend=new \DateTime($month."31");
$repoid = $scrum->getGiteaid();
$repoowner = $scrum->getGiteajson()["owner"]["login"];
$reponame = $scrum->getGiteajson()["name"];
//$scrumissues = $em->getRepository("App:Scrumissue")->findBy(["scrum"=>$scrum,"giteastate"=>"open"],["giteamilestonename"=>"ASC","rowid"=>"DESC"]);
$scrumissues = $em->getRepository("App:Scrumissue")->findBy(["scrum"=>$scrum],["giteamilestonename"=>"ASC","rowid"=>"DESC"]);
$reportissues=[];
foreach($scrumissues as $scrumissue) {
$labels=array_column($scrumissue->getGiteajson()["labels"], 'name');
$update=new \DateTime($scrumissue->getGiteajson()["updated_at"]);
$close=new \DateTime($scrumissue->getGiteajson()["closed_at"]);
//"created_at" => "2024-05-03T15:09:26+02:00"
//"updated_at" => "2024-05-03T16:02:00+02:00"
//"closed_at" => "2024-05-03T16:01:59+02:00"
//if(in_array("Type/Scénario",$labels)&&in_array("Statut/Backlog",$labels)) {
//if(in_array("Type/Scénario",$labels)) {
// Dans le cas d'un report Propal on ne prend que les tickets ouvert de type scénario du backlog
$ok=false;
if($mode=="Propal") {
if(in_array("Type/Scénario",$labels)&&in_array("Statut/Backlog",$labels)&&$scrumissue->getGiteastate()=="open") {
$ok=true;
}
}
// Dans le cas d'un report PV on prend tout les tickets avec une date de modification ou de cloture dans le mois
if($mode=="PV") {
$isstatut=false;
$isupdate=false;
$isclose=false;
if(in_array("Statut/Livré PREPROD",$labels) || in_array("Statut/A Livrer PROD",$labels) || in_array("Statut/Livré PROD",$labels)) {
$isstatut=true;
}
if(!empty($close)&&$close>=$datestart&&$close<=$dateend) $isclose=true;
if($update>=$datestart&&$update<=$dateend) $isupdate=true;
if($isstatut&&($isclose||$isupdate)) $ok=true;
}
if(!$ok) continue;
$tmp= [
"id" => $scrumissue->getGiteanumber(),
"title" => $scrumissue->getGiteatitle(),
"milestone" => ($scrumissue->getGiteamilestonename()??"Aucun"),
"statutorder" => $scrumissue->getScrumcolumn()->getRowid(),
"statut" => $scrumissue->getScrumcolumn()->getName(),
"issueorder" => $scrumissue->getRowid(),
];
array_push($reportissues,$tmp);
}
$statutsort = array_column($reportissues,"statutorder");
$issuesort = array_column($reportissues,"statutorder");
$milestonesort = array_column($reportissues,"milestone");
array_multisort($statutsort, SORT_ASC, $milestonesort, SORT_ASC, $issuesort, SORT_ASC, $reportissues);
return $this->render('Report/milestone.html.twig', [
'useheader' => true,
'issues' => $reportissues,
]);
}
public function test($id,Request $request)
{
$em = $this->getDoctrine()->getManager();

View File

@ -140,6 +140,7 @@ class ScrumissueController extends AbstractController
$output=[];
$output["weight"]=$scrumissue->getWeight();
$output["giteajson"]=$scrumissue->getGiteajson();
$output["notes"]=$scrumissue->getNotes();
return new JsonResponse($output);
}
@ -297,6 +298,25 @@ class ScrumissueController extends AbstractController
}
public function notes(Request $request)
{
$em = $this->getDoctrine()->getManager();
$id=$request->get('id');
$notes=$request->get('notes');
// Rechercher l'issue en cours
$scrumissue=$em->getRepository("App:Scrumissue")->find($id);
if(!$scrumissue) return new JsonResponse(['message' => 'No Issue'], 403);
$scrumissue->setNotes($notes);
$em->flush();
return new JsonResponse([]);
}
public function color(Request $request)
{
$em = $this->getDoctrine()->getManager();

View File

@ -38,6 +38,11 @@ class Scrumissue
*/
private $color;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $notes;
/**
* @ORM\Column(type="integer")
*/
@ -350,4 +355,16 @@ class Scrumissue
return $this;
}
public function getNotes(): ?string
{
return $this->notes;
}
public function setNotes(?string $notes): self
{
$this->notes = $notes;
return $this;
}
}

View File

@ -0,0 +1,23 @@
{% extends "base.html.twig" %}
{% block body %}
{% set statut="" %}
{% set milestone="" %}
{% for issue in issues %}
{% if statut!=issue.statut %}
<p>&nbsp;</p>
<h2>{{issue.statut}}</h2>
{% set statut=issue.statut %}
{% set milestone="" %}
{% endif %}
{% if milestone!=issue.milestone %}
<p>&nbsp;</p>
<h3>{{issue.milestone}}</h3>
{% set milestone=issue.milestone %}
{% endif %}
<li>{{issue.id}} = {{ issue.title }}</li>
{% endfor %}
{% endblock %}

View File

@ -35,6 +35,11 @@
margin-right:5px;
}
.tooltip-inner {
text-align: left !important; /* Aligne le texte à gauche */
white-space: pre-line; /* Conserve les retours à la ligne */
}
.assignee {
width:30px;
margin: 5px 5px 0px 0px;
@ -57,7 +62,6 @@
{% set start = microtime(true) %}
<div class="d-flex">
<div id="filters" class="d-flex flex-column pl-2 pr-2 " style="width:350px; background-color:var(--colorbgbodydark);min-height:1500px;">
<div style="width:100%" class="mt-3">
<label class="control-label" style="color:var(--colorftbodydark)">Filtre JALONS</label>
@ -163,7 +167,7 @@
{% for column in tbissues %}
<div class="d-inline-block mt-3 align-top mb-5 p-2" data-column="{{column.gicol}}" style="width: 18rem;">
<h2 style="text-transform: uppercase; text-align:center; font-size:28px">{{ column.nmcol }}</h2>
<h2 style="text-transform: uppercase; text-align:center; font-size:26px">{{ column.nmcol }}</h2>
<div class="card-body p-1">
{% for jalon in column.jalons %}
{% for sprint in jalon.sprints %}
@ -199,6 +203,7 @@
{% set datatypes="" %}
{% set dataprioritys="datapriority"~giteaprioritys|last %}
{% set issuprioritycolor=prioritycolor %}
{% for label in issue.giteajson.labels %}
{% if label.id not in giteacolumns and label.id in giteateams %}
{% set datateams=datateams~"datateam"~label.id~" " %}
@ -228,7 +233,9 @@
{% set backcolor="background-color:"~issue.scrumissueblock.color~";" %}
{% endif %}
<div id="issu{{ issue.id }}" data-id="{{ issue.id }}" data-issue="{{ issue.id }}" data-column="{{column.gicol}}" data-milestone="{{jalon.gijal}}" data-sprint="{{sprint.idspr}}" class="card mb-1 issue issue-{{issue.id}} {{datateams}} {{datatypes}} {{dataprioritys}} {{datalabels}} {{dataassignees}} state-{{issue.giteastate}}" style="border-left: 10px solid {{issuprioritycolor}}">
{% set notes=(not issue.notes is empty?issue.notes|striptags|replace({'\n': '<br>', '\r': '<br>'})|raw:"") %}
<div id="issu{{ issue.id }}" data-id="{{ issue.id }}" data-issue="{{ issue.id }}" data-column="{{column.gicol}}" data-milestone="{{jalon.gijal}}" data-sprint="{{sprint.idspr}}" class="card mb-1 issue issue-{{issue.id}} {{datateams}} {{datatypes}} {{dataprioritys}} {{datalabels}} {{dataassignees}} state-{{issue.giteastate}}" style="border-left: 10px solid {{issuprioritycolor}}" {{ (not notes is empty?'title='~notes:'') }}>
<div class="card-footer p-1 d-flex" style="line-height:16px; border-top:none; {{ backcolor }}" >
<div class="flex-grow-1 d-flex align-items-center" style="max-width:224px";>
<div class="pr-2 issu-id" style="cursor:move">
@ -320,6 +327,13 @@
</span>
</div>
<div id="notesissu{{ issue.id }}" class="notesissu mb-2" data-issue="{{ issue.id }}" data-giteaid="{{issue.giteanumber}}" data-giteatitle="{{ issue.giteatitle }}">
<i class="btn fas fa-clipboard p-0 m-0 fa-fw pl-1 pl-1"></i>
<span style="cursor:pointer;">
Notes
</span>
</div>
<div>
<input type="text" id="colorissu{{ issue.id }}" data-issue="{{ issue.id }}" class="pick-a-color form-control form-control spectrum sp-colorize" value="{{issue.color}}" autocomplete="off">
</div>
@ -485,6 +499,29 @@
</div>
</div>
<div id="mymodalnotes" class="modal" role="dialog">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title"></h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<input type="hidden" id="modal-issueid" name="modal-issueid" required="required" class=" form-control" value="">
<div style="width:100%">
<textarea id="modal-notes" style="width:100%; height:300px;">
</textarea>
</div>
<button id="issu_notes" class="btn btn-success mt-3">Enregistrer</button>
</div>
</div>
</div>
</div>
{% set end = microtime(true) %}
{% set duration = end - start %}
<p>render time: {{ duration }} seconds</p>
@ -515,6 +552,14 @@
}
$(document).ready(function() {
$(".issue").tooltip({
content: function() {
return $(this).data('tooltip'); // Utilise le contenu de l'attribut data-tooltip
},
items: '[data-tooltip]', // Spécifie les éléments qui déclenchent le tooltip
html: true // Autorise le HTML dans le tooltip (si nécessaire pour certains tooltips personnalisés)
});
// Apply Filter
function showhide() {
// Vue condensée
@ -830,6 +875,44 @@
});
});
$(document).on('click','.notesissu',function(){
$(".modal-title").html("#"+$(this).data("giteaid")+" - "+$(this).data("giteatitle"));
$("#modal-issueid").val($(this).data("issue"));
$.ajax({
method: "POST",
url: "{{path("app_scrumissue_info")}}",
data: {
id:$("#modal-issueid").val(),
},
success: function(data) {
$('#modal-notes').val(data.notes);
$("#mymodalnotes").modal('show');
$(".submenu").hide();
$("#modal-notes").focus();
},
});
});
$("#issu_notes").click(function(){
$.ajax({
method: "POST",
url: "{{path("app_scrumissue_notes")}}",
data: {
id:$("#modal-issueid").val(),
notes: $("#modal-notes").val(),
},
success: function(data) {
location.reload();
},
error: function (request, status, error) {
alert("pb sur enregistrement du ticket");
}
});
});
// Filter Milestones
function filtermilestones() {
$.ajax({