Forum

MODULE OF MANAGEMEN...
 
Notifications
Retirer tout

MODULE OF MANAGEMENT OF REGULATED ABSENCES

15 Posts
2 Utilisateurs
0 Reactions
10.7 {numéro}K Vu
(@tabary)
Posts: 27
Active Member
Début du sujet
 
[#5639]

Hy,

I realized a module of 'MANAGEMENT OF REGULATED ABSENCES' (that is to say: Leave, RTT, Disease Stop, etc.).

Here are the sources (checked with branch 7.4) and associated documentation (in French).

For the source, i extract only directories with changes and in those only changes for : db, external, tool/i18n

I am willing to put it in PlugIn (free) but do not know how to build the plugin and do not really see how to do when you modify for example the sources of CORE.

Do you have a complete procedure and recommendations so that I can do the plugging work?

Looking forward to hear from you :

HAPPY END YEAR CELEBRATIONS

Best regards

Marc


 
Posté : 21 Déc PM 13:1212
(@babynus)
Posts: 14952
Membre Admin
 

Hi Marc,

Thank you for this new contribution.
I've quickly read the documentation : it seems great.

To ba able to integrate the code, It will be defficult to treat folders as you send, as it may rease some of our code.
If you did this from branch V7.4, could you please generate a patch file, that will integrate only changes.
It will help me a lot to integrate your changes.
Thanks in advance, and thanks again for this contribution.

NB : about integration as a plugin, it will not be possible as it seems you added items in core code (SqlElement.php, projeqtor.pjp)
But maybe activation through a dedicated parameter, as you did for Notification System, may be a good alternative.


 
Posté : 21 Déc PM 16:1212
(@tabary)
Posts: 27
Active Member
Début du sujet
 

Hi

Here are the patches from V7.4.0.

Best regards

Marc


 
Posté : 27 Déc AM 11:1212
(@babynus)
Posts: 14952
Membre Admin
 

Hi,

GREAT !

Thnak you very mush.
I will integrate this as soon as possible and give you a feedback.

Thnaks for your contribution.


 
Posté : 27 Déc PM 17:1212
(@babynus)
Posts: 14952
Membre Admin
 

Hi,

I tested your contribution.

First, it is impressive :woohoo:
There are many really very good ideas.

Here are my first (I hope constructive) remarks :

* Attention, in db scripts, name of tables MUST be in lowercase
This is a technical constraint : if names are stored with uppercases, issue may occur with linux and postgresql

* isLeaveManager on resource
maybe this, being an access right, may be defined elsewhere

* isLeaveMngProject on project
Why not use "Administrative" project ?

* isLeaveMngWorkflow on workflow
Why not just select a workflow (on global parameters or else)

* Issue with PHPExcel.php
If I leave line 38 in projeqtor.php
require_once '../external/PHPExcel/Classes/PHPExcel.php';
I get an error.
It seems the Autoload in PHPExcel.php sets a mess with projeqtor

* Icons are missing in patchs
Ok, I found them in full version 😉

* Translation missing
I found translations in lang.js but not sure I found all
Could you please send changes or lang.xls file ?
(not found in full version)

* Some code is missing in the patchs
For instance "addGenericBankOffDays" is not is the patch
I found it in full version, in projectorDialog.js.
I could copy it, but I think other parts of code are not working.
Identifying all missing parts is almost impossible on my side.
Moreover, this code should be included in projeqtorHR.js.
Also, some features were not working, and I found that some complete scripts were missing (leaveCalendar.php, leaveCalendarPopupErrorAndResult.php, leavesSystemHabilitation.php, dashboardEmployeeManager.php)
I'm noit sure I found all missing items.

* Some minor ergonomic issues are remaining
For instance, in leave calendar screen,
- there is an extra unnecessary vertical scrollbar
- buttons have strange caracters as caption (surely some non utf8 encoding of script)
- you can move a leave period, this show a pop-up, chenge change does not seem to be saved.

As a summary, there is great potential, but it needs more reliability and integration will require hard work.
So we won't be able to integrate it on V7.4.
Moreover, this module will push projeqtor to V8 😉
So we'll plan to integrate it on V8.0 that will replace V7.5 (or possibly replace V7.5+V7.6).
We'll possibly also try and include modules management in ProjeQtOr on this version.
The idea is to be able to select, at installation and able to change later, the "modules" that will be used :
- HR
- Financial
- Configuration (products, component, versions)
- ...
to be able to "remove" parts that will not be used depending on needs of the company.

Thanks again for this contribution.
It would be great if you could provide patch with fixing of upper remarks.


 
Posté : 28 Déc PM 13:1212
(@tabary)
Posts: 27
Active Member
Début du sujet
 

Hi,

Thank you for your remarks.

Here new patches (I hope they are complete this time 🙁 )

My answers below:

* Attention, in db scripts, name of tables MUST be in lowercase
done

* isLeaveManager on resource
I had thought of making an 'EmployeeManager' table (just like for 'Employee').
Maybe when I will use the other features of the 'HR Management' module

* isLeaveMngProject on project
Why not use "Administrative" project ?
Because I want to dedicate this project to regulated absences without 'polishing' an existing project.
In addition, I use 'Administrative' projects for other things.

* isLeaveMngWorkflow on workflow
Why not just select a workflow (on global parameters or else)
The workflow can not be changed.
Indeed, it can only have 3 statuses:
  * Recorded = Absence requested
  * Validated = Absence accepted
  * Canceled = Absence denied

* Issue with PHPExcel.php
If I leave line 38 in projeqtor.php
require_once '../external/PHPExcel/Classes/PHPExcel.php';
I get an error.
It seems the Autoload in PHPExcel.php sets a mess with projeqtor
Is the directory 'PHPExcel' created in 'external'.
For me, everything is ok.
Maybe the 'external' patch did not integrate everything.
When in doubt, the PHPExcel zip is attached.

* Translation missing
Done

* Some code is missing in the patchs
Done

* Some minor ergonomic issues are remaining
For instance, in leave calendar screen,
- there is an extra unnecessary vertical scrollbar
Done

- buttons have strange caracters as caption (surely some non utf8 encoding of script)
Patch with UTF8 encoding 'externaldojoxcalendarnls*.*' and 'externaldojoxcalendarnlsfr*.*'

- you can move a leave period, this show a pop-up, chenge change does not seem to be saved.
For me, all is correct. Popup is show. I valid and changes are saved. May be, because the patch 'view' was not complete

Hoping to have met your expectations

Best regards,

Marc


 
Posté : 28 Déc PM 23:1212
(@babynus)
Posts: 14952
Membre Admin
 

Hi,

Thanks for taking into account my remarks.
I'll have a llok to new patch.

* isLeaveMngWorkflow on workflow
Why not just select a workflow (on global parameters or else)
The workflow can not be changed.
Indeed, it can only have 3 statuses:
* Recorded = Absence requested
* Validated = Absence accepted
* Canceled = Absence denied

This is bad design as it expects the status have not been deleted or hidden by admin.
As list of statuses may be completely modified, we cannot rely on fix list.
You must rely on "isDone" and "isCancelled" on each status to give move freedom of configuration.
Possibily someone could need a 2 phases validation or another workflow (for instance ass a status "submit for validation" after "recorded"), requiring more steps that only the 3 you defined.

* Issue with PHPExcel.php
If I leave line 38 in projeqtor.php
require_once '../external/PHPExcel/Classes/PHPExcel.php';
I get an error.
It seems the Autoload in PHPExcel.php sets a mess with projeqtor
Is the directory 'PHPExcel' created in 'external'.
For me, everything is ok.
Maybe the 'external' patch did not integrate everything.
When in doubt, the PHPExcel zip is attached.

With patch, same issue.
After unzipping the zip file to get full content of library, issue disepears.

I am still facing small issues with patch as some line breaks are missing (I don't know why).
In most cases, it is not an issue, but it may by on when the missing line break is at end of comment followed by some code.
For instance in login.php, line 44, I had :

// MTY - MULTI CALENDAR         if (getSessionValue('setup', null, true) or version_compare(ltrim(Sql::getDbVersion(),'V'), '5.0.0',"<") ) {

that I had to change to

// MTY - MULTI CALENDAR      
   if (getSessionValue('setup', null, true) or version_compare(ltrim(Sql::getDbVersion(),'V'), '5.0.0',"<") ) {

to have code work.
I don't know if you have a clue to avoid this issue in the patch...


 
Posté : 3 Jan PM 17:011
(@tabary)
Posts: 27
Active Member
Début du sujet
 

Hello

First of all: my best wishes for this new year.

Here is a V2 of the module 'Absences Regulaires'.

From now on, it is possible to associate any workflow with any type of regulated absence.
This makes the use of the module more flexible and avoids bad design.

It is now possible to have as many validation processes for a regulated absence as you want.

However, regulated absences only have 4 transitions (new concept: see the new documentation):

  • Submitted: Absence is submitted and waiting for validation.
  • Accepted: The submitted absence was accepted
  • Rejected: The submitted absence was rejected
  • Neutral: none of the previous 3 The absence has been created but the submission for validation is not yet done.

In the first 3 cases, only the absence status can be modified by either the manager of the employee for whom the absence is made or the administrator of the 'Regulated Absence' module.

For lines without CR, I added a plugin to netBeans that should normally fix the problem.

Hope this will suit you.

Best regards


 
Posté : 18 Jan AM 01:011
(@babynus)
Posts: 14952
Membre Admin
 

Many Thanks.

I'll have a look to include it in V7.5 (that will possibly become V8.0)


 
Posté : 20 Jan PM 16:011
(@babynus)
Posts: 14952
Membre Admin
 

Hi,

I integrated your contribution in V8.0.0.
It was not easy as there were many conflicts with our own devs, but now it's done on branck V8.0.

I changed few things, mainly about activation, as V8.0 introduces Modules Management.
So Regular absences are in a dedicated module, that is enabled through Module Management, not through parameter any more.

I also retreived and fixed some translations, and I think some are still missing, but this may be complete on patches

Most important, I have issues with Workflow.
I saw that now your code is done to manage workflows in the standard way; but I think something is missing.
For instance, in tool/projeqtor-hr.php, there is reference to var $theWorkFlowId that is never initialized.
I replaced if with 1, but of course this is sure not correct.
I think that initialisation of a default workflow (using for instance standard status) is missing.
Can you please have a look at that ?

I also have issue with calendar.
It is always empty.
I have some information about aquired absences on right part, but left part is always empty (except for legends)
No issue on browser Console, no error recorded on log file.
Possibly it is linked with WorkflowId issue.
Do you have any idea of possible source of the issue ?
Can you please have a look at that from code commited on branch V8.0 ?

I also tried and replace PHPExcel which is obsolete with PHPSpreadsheet.
I succeeded in generating the file, but all color formating are lost.
So things are not complete yet, and I preserve (for next version) use of PHPExcel.
My try is in tool/exportLeaveCalendarOfDashboardEmployeeManager.php.new
Note that I changed the include of PHPExcel excel to avoid loading it on every request as it is needed only for one Export...
Possibly it will be able to switch to PHPSpreadsheet on a next version.

I also have idea to find a way to load projeqtor-hr.php only if module is enabled, but I think it is not so trivial as some functions are called without testing if module is enabled.

Thanks again for your contribution.
Hope you'll be able to help finalize highlighted point so that the module can be enabled in V8.0.


 
Posté : 9 Avr PM 20:044
(@babynus)
Posts: 14952
Membre Admin
 

Hi,

In addition to my previous remark, I noticed a big performance issue.
When saving a simple Timesheet, saving time was more than 3 seconds, where it took only 1 second for same thing on V7.4.
I just traved DB access and found 8263 calls to "select * from calendardefinition where id=1" for a single Timesheet save
(of course this was not present in V7.4).

I will spend some time to analyse this (cannot deploy V8.0 with such a big issue), but if you have a clue where it can come, as it was possibly introduced by new absence manageùent or (more likely) with the new bank off days on calendar definition.
Any clue will help.
Thanks.


 
Posté : 9 Avr PM 21:044
(@babynus)
Posts: 14952
Membre Admin
 

Hi Marc,

I found and fixed performance issue that called over 8000 times access to calendarDefinition.
If was is function isOpenDay().
I use some cache, so saving Timesheet now takes 1 second instead of 3 seconds, and planning that took 6 seconds now takes 0,5 second


 
Posté : 12 Avr PM 17:044
(@babynus)
Posts: 14952
Membre Admin
 

Hi,

I now fixed te issue about $theWorkFlowId.
I generated a default (simple) workflow that should work fine for leave system.
I also fixed some issues on StatusMain.php about incorrect SQL queries.


 
Posté : 14 Avr AM 00:044
(@tabary)
Posts: 27
Active Member
Début du sujet
 

Hello,

First of all, thank you for taking this contribution into account.

For $ theWorkFlowId, you've been faster than me. I did the same thing as you.

As for the display of the calendar, I saw that you had found the solution.
I made a change in view js projeqtorHR.js on the leaveCalendarDisplay () function to see only the 'Previous' and 'Next' buttons.
See in the patch attached : view-js-projeqtorHR.
By cons, I can not internationalize the calendar. The Calendar widget is based on the locale of the browser even if I change the locale value in dojoConfig or the lang property of the Calendar widget.

By the way, I fixed a bug in tool getLeaves.php (see in the patch attached : Tool-getLeaves).

For the generation of the file EXCEL I had also tried with PhpSpreadsheet and had also had the same result as you.
I am looking more finely to find the solution.

Finally, in the version 8.0.0 revision '4729', I noticed that the global parameter allowing to choose the administrator of the module is no longer visible in the global parameters (it worked in the revision of last week).

Hoping to have helped you.


 
Posté : 15 Avr PM 16:044
(@babynus)
Posts: 14952
Membre Admin
 

I made a change in view js projeqtorHR.js on the leaveCalendarDisplay () function to see only the 'Previous' and 'Next' buttons.
See in the patch attached : view-js-projeqtorHR.

Good idea, buttons were no need.
Patch integrated.

By cons, I can not internationalize the calendar. The Calendar widget is based on the locale of the browser even if I change the locale value in dojoConfig or the lang property of the Calendar widget.

Not an issue...

By the way, I fixed a bug in tool getLeaves.php (see in the patch attached : Tool-getLeaves).

I don't understand your patch

if (count($resStatus)sortOrder, $b->sortOrder);
     }
 );

You sort a table only if it is empty ?

For the generation of the file EXCEL I had also tried with PhpSpreadsheet and had also had the same result as you.
I am looking more finely to find the solution.

Not an issue, we continue with PHP-Excel, but will have to think to replace with phpSpreadsheet (PHPExcel ios not maintained any more)

Finally, in the version 8.0.0 revision '4729', I noticed that the global parameter allowing to choose the administrator of the module is no longer visible in the global parameters (it worked in the revision of last week).

This is fixed.
It was wrong management of modules.


 
Posté : 19 Avr PM 16:044
Share:
Retour en haut