User Tools

Site Tools


extensions:itop-time-tracking

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
extensions:itop-time-tracking [2021/04/19 15:25]
vdumas [Revision history]
extensions:itop-time-tracking [2021/07/06 14:59] (current)
Line 4: Line 4:
 description_wiki : Track your time spent on Tickets, via a calendar view description_wiki : Track your time spent on Tickets, via a calendar view
 index_hidden ​    : yes index_hidden ​    : yes
-version ​         : 2.1.2 +version ​         : 2.2.1 
-release_dt ​      : 2021-01-08+release_dt ​      : 2021-06-02
 itop-version-min :  itop-version-min : 
-download_hidden ​ : http://​www.combodo.com/​itop-extensions/​itop-time-tracking-2.1.2-672.zip+download_hidden ​ : http://​www.combodo.com/​itop-extensions
 code             : itop-time-tracking code             : itop-time-tracking
 state            : stable state            : stable
 product_hidden ​  : not-included product_hidden ​  : not-included
-module-lists_hidden : itop-time-tracking/​2.1.2, itop-legacy-search-base/​1.0.0+module-lists_hidden : itop-time-tracking/​2.2.0, itop-legacy-search-base/​1.0.0
 diffusion ​       : Client Store, iTop Hub diffusion ​       : Client Store, iTop Hub
 ---- ----
Line 17: Line 17:
  
 <​related_components>​Other versions of this component:</​related_components>​ <​related_components>​Other versions of this component:</​related_components>​
 +
 +===== Features =====
  
 This extension provides a way to track the time spent by the end-users in association with objects in iTop (like Tickets). This extension provides a way to track the time spent by the end-users in association with objects in iTop (like Tickets).
-The user input is done via a Google-like calendar via (provided by [[http://​arshaw.com/​fullcalendar|FullCalendar JS]]), either directly as an extra tab on the target object, or via a special page (and its menu "Track my time").+The user input is done via a Google-like calendar via (provided by [[http://​arshaw.com/​fullcalendar|FullCalendar JS]]), either directly as an extra tab on the target object, or via a special page and its menu "Track my time".
  
-The module also provides two menus pointing to reports: "My time tracking report"​, and "Time tracking report"​. The first menu provides a report ​of the activities of the current user only, while the second ​takes into account the activities of all users.+The module also provides two menus pointing to reports: ​ 
 +  * "My time tracking report" ​reports ​of the activities of the current user only.  
 +  * "Time tracking report" ​takes into account the activities of all users.
  
 The implementation provided by this extension limits the time tracking to User Requests and Incidents tickets. The implementation provided by this extension limits the time tracking to User Requests and Incidents tickets.
- 
- 
-===== Features ===== 
  
   * Customized scopes for each time tracking feature   * Customized scopes for each time tracking feature
Line 38: Line 39:
  
 ^ Date ^ Version ^ Description ^ ^ Date ^ Version ^ Description ^
 +|  2021-06-02 ​ |  2.2.1  | * Fix modal mode being considered as classic mode |
 +|    2021-05-11 ​         |  2.2.0  |* Allow copy-paste of "time spent" on calendar \\     * Manage TimeSpent mandatory fields on creation from calendar \\          * Allow to filter report page with custom query \\          * Improve performances with large object scopes \\      * Apply user obsolescence preference on report page overview \\      * Harmonize TimeSpent create/​modify rights |
 +|  2021-01-08 ​ |  2.1.2  | * Add overview missing dictionary entries \\       * Fix Activity class format \\       * Fix dependency with legacysearchbase |
 |  2020-11-04 ​ |  2.1.1  | Fix installation issue  | |  2020-11-04 ​ |  2.1.1  | Fix installation issue  |
 |  2020-08-03 ​ |  2.1.0  | * Fix data not being filtered by search on report page \\       * Add an overview for Time tracker manager in report page \\       * Add silo for managers in config \\       * Add configuration for report chart in config \\       * Align chart color with time tracking colors | |  2020-08-03 ​ |  2.1.0  | * Fix data not being filtered by search on report page \\       * Add an overview for Time tracker manager in report page \\       * Add silo for managers in config \\       * Add configuration for report chart in config \\       * Align chart color with time tracking colors |
Line 47: Line 51:
 ===== Limitations ===== ===== Limitations =====
  
 +  * The report page does not takes //the selected organization//​ into account when reporting time spent. 
 +  * The detailed list of activities is limited to the selected organization,​ but the overview, total duration and charts do show time spent for all organizations. 
 +  * The same occurs for the calendar tracking page, it displays Activities and TimeSpent for all organizations.
 ===== Requirements ===== ===== Requirements =====
  
Line 69: Line 75:
   ​   ​
 insert into activity (obj_id,​obj_class,​background_color,​text_color,​label) insert into activity (obj_id,​obj_class,​background_color,​text_color,​label)
-  select distinct a.ticket_id,​ t.finalclass,'#​0000ff','#​ffffff',​t.ref from activity_legacy AS a JOIN ticket AS t ON a.ticket_id=t.id;​+  select distinct a.ticket_id,​ t.finalclass,'#​0000ff','#​ffffff',​t.ref from activity_legacy AS a  
 +    ​JOIN ticket AS t ON a.ticket_id=t.id;​
   ​   ​
 INSERT INTO timespent (id,​user_id,​start_date,​end_date,​duration,​org_id,​title,​description,​contact_id,​activity_id) INSERT INTO timespent (id,​user_id,​start_date,​end_date,​duration,​org_id,​title,​description,​contact_id,​activity_id)
Line 128: Line 135:
  )  )
  ),  ),
 +        '​clone_events'​ => false, // Set to true to allow event cloning
  '​default_event_duration'​ => '​00:​30:​00',​  '​default_event_duration'​ => '​00:​30:​00',​
  '​day_start_time'​ => '​04:​00:​00',​  '​day_start_time'​ => '​04:​00:​00',​
Line 142: Line 150:
  '​stopwatch_max_time'​ => 12,  '​stopwatch_max_time'​ => 12,
  '​delete_max_event_age'​ => 30,  '​delete_max_event_age'​ => 30,
 +        '​default_report_query'​ => '​SELECT TimeSpent ​
 +                                   WHERE contact_id = :​contact_id ​
 +                                   AND start_date >= :​start_date ​
 +                                   AND end_date < :​end_date',​
 +        '​manager_report_query'​ => '​SELECT TimeSpent ​
 +                                   WHERE start_date >= :​start_date ​
 +                                   AND end_date < :​end_date',​
  '​manager_report_silo'​ => '​SELECT Person',​  '​manager_report_silo'​ => '​SELECT Person',​
  '​weekly_report_time_spent_attribute'​ => '',​  '​weekly_report_time_spent_attribute'​ => '',​
  '​weekly_report_time_spent_default'​ => '​30hrs',​  '​weekly_report_time_spent_default'​ => '​30hrs',​
  '​report_charts_definition'​ => array(  '​report_charts_definition'​ => array(
- array('​group_by_attribute'​ => '​contact_id',​ '​label'​ => '​TimeTracking:​ReportActivityPerUser'​),​ + array('​group_by_attribute'​ => '​contact_id', ​ 
- array('​group_by_attribute'​ => '​org_id',​ '​label'​ => '​TimeTracking:​ReportActivityPerCustomer'​) +                      ​'​label'​ => '​TimeTracking:​ReportActivityPerUser'​),​ 
- )+ array('​group_by_attribute'​ => '​org_id', ​ 
 +                      ​'​label'​ => '​TimeTracking:​ReportActivityPerCustomer'​) 
 + ),
 ), ),
 </​code>​ </​code>​
Line 156: Line 173:
 | colors| array defining the default colors globaly and by type of object. The array default_stopwatch defines the default color for a stopwatch. The array default_calendar defines the default color for time tracked in a calendar view. The you can define an array for each type fo object (classes) to define a default color for this one |  | | colors| array defining the default colors globaly and by type of object. The array default_stopwatch defines the default color for a stopwatch. The array default_calendar defines the default color for time tracked in a calendar view. The you can define an array for each type fo object (classes) to define a default color for this one |  |
 |default_event_duration| duration of an activity by default| 30 minutes| |default_event_duration| duration of an activity by default| 30 minutes|
-|clone_events| **Since 2.1.3** allow user to clone time spent via ctrl+click| false|+|clone_events| **Since 2.2.0** of this extension. Allow user to clone time spent| false|
 |day_start_time| start time in the calendar view | 6:00 | |day_start_time| start time in the calendar view | 6:00 |
 |day_end_time| end time in the calendar view| 22:00 | |day_end_time| end time in the calendar view| 22:00 |
Line 166: Line 183:
 |stopwatch_max_time| max duration in hours of a stopwatch if it is not stop manualy by a user| 4 hours| |stopwatch_max_time| max duration in hours of a stopwatch if it is not stop manualy by a user| 4 hours|
 |delete_max_event_age| duration in days after which a user cannot modify or create a time spent| 30 days| |delete_max_event_age| duration in days after which a user cannot modify or create a time spent| 30 days|
-|default_report_query| **Since 2.1.3** Time spent scope for self report (available placeholder:​ contact_id, ​start| SELECT TimeSpent WHERE contact_id = :contact_id AND start_date >= :start_date AND end_date < :end_date | +|default_report_query| **Since 2.1.3** Time spent scope for self report (available placeholder:​ contact_id, ​start_date, end_date corresponding to the contact and time fram selected in the filtering box))| SELECT TimeSpent WHERE contact_id = :contact_id AND start_date >= :start_date AND end_date < :end_date | 
-|manager_report_query| **Since 2.1.3** Time spent scope for self report (available placeholder:​ contact_id, ​start| SELECT TimeSpent WHERE start_date >= :start_date AND end_date < :end_date | +|manager_report_query| **Since 2.1.3** Time spent scope for self report (available placeholder:​ contact_id, ​start_date, end_date)| SELECT TimeSpent WHERE start_date >= :start_date AND end_date < :end_date | 
-|manager_report_silo| The silo describing what Contacts Time Tracking Managers will be able to see| SELECT Person|+|manager_report_silo| The silo describing what Contacts Time Tracking Managers will be able to see. This filter is not correlated with manager_report_query| SELECT Person|
 |weekly_report_time_spent_attribute| Attribute describing the expected time shown in Time Tracking Manager Overview| //empty//| |weekly_report_time_spent_attribute| Attribute describing the expected time shown in Time Tracking Manager Overview| //empty//|
 |weekly_report_time_spent_default| Describe the default value in case `weekly_report_time_spent_default` is empty (can be a dictionary entry)| '​30hrs'​| |weekly_report_time_spent_default| Describe the default value in case `weekly_report_time_spent_default` is empty (can be a dictionary entry)| '​30hrs'​|
-|report_charts_definition| Define the charts displayed at the bottom of Time Tracking report page|  array( array('​group_by_attribute'​ => '​contact_id',​ '​label'​ => '​TimeTracking:​ReportActivityPerUser'​),​ array('​group_by_attribute'​ => '​org_id',​ '​label'​ => '​TimeTracking:​ReportActivityPerCustomer'​))|+|report_charts_definition| Define the charts displayed at the bottom of Time Tracking report page| cf below | 
 + 
 +<code PHP report_charts_definition>​array( ​ 
 +  ​array( 
 +    ​'​group_by_attribute'​ => '​contact_id',​ 
 +    ​'​label'​ => '​TimeTracking:​ReportActivityPerUser'​), ​ 
 +  ​array( 
 +    ​'​group_by_attribute'​ => '​org_id', ​ 
 +    ​'​label'​ => '​TimeTracking:​ReportActivityPerCustomer'​) 
 +)</​code>​ 
 Time tracking modes Time tracking modes
   * calendar tab : the user is allowed to set time tracking in a tab directly on the corresponding objects   * calendar tab : the user is allowed to set time tracking in a tab directly on the corresponding objects
Line 203: Line 230:
   * From the "Track my time" menu if objects are present in a "​calendar-page"​ scope   * From the "Track my time" menu if objects are present in a "​calendar-page"​ scope
   * From the stopwatch on the right of the screen on the details of an object present in a "​stopwatch"​ scope   * From the stopwatch on the right of the screen on the details of an object present in a "​stopwatch"​ scope
- 
  
 Two new profiles are defined with this extension: Two new profiles are defined with this extension:
-  * Time Tracker +  * //Time Tracker//: A user having this profile can only track time for himself and see only his time tracked 
-  * Time Tracking Manager +  * //Time Tracking Manager//: A user having ​ this profile can track time for other and will have access to the time tracked by anybody 
-<​note>​ +<​note>​A user can track his time only if he has one of the profiles defined above.</​note>​ 
-A user can track his time only if he has one of those profils + 
-</​note>​ +
-A user having the //Time Tracker// profil can only track time for himself and see only his time tracked+
  
-A user having ​ the //Time tracking// Manager profil can track time for other and will have access to the time tracked by anybody 
  
 ==== From the details of a ticket ==== ==== From the details of a ticket ====
Line 236: Line 260:
  
 {{:​extensions:​time-tracking:​tt3.png?​direct&​700|Select activity (classic mode)}} {{:​extensions:​time-tracking:​tt3.png?​direct&​700|Select activity (classic mode)}}
 +
 +Added in 2.2.0, when no activity is selected and you click to add a Time Spent, it falls back to the "​classic mode" and prompt you to select one
  
 You can pick a "​classic mode" with the combobox always visible or a "modal mode" which prompts a modal each time to click and drag on the calendar. You can pick a "​classic mode" with the combobox always visible or a "modal mode" which prompts a modal each time to click and drag on the calendar.
  
 {{:​extensions:​time-tracking:​tt4.png?​direct&​700|Select activity (modal mode)}} {{:​extensions:​time-tracking:​tt4.png?​direct&​700|Select activity (modal mode)}}
 +
 +Added in 2.2.0, you can **clone an entry**, using the top right cloning icon: it duplicates the entry, which you must then drag and drop or edit to move to another time.
 +
 +{{ :​extensions:​time-tracking-clone.png?​direct |}}
 +
  
 Each calendar has multiple views: month, week, day ,list. Each calendar has multiple views: month, week, day ,list.
Line 313: Line 344:
  
  
-====== Customization ====== +**Q: Can I add new fields on the TimeSpent object?** \\ 
- +**A:** Yes
-The class TimeSpent is defined in XML, so it can be edited to add additional attributes if required.+
  
 +The class TimeSpent is defined in XML, so it can be customized to add additional attributes if required.
 +If an additional mandatory attribute is required the TimeSpent edit box is pop-up (//only since version 2.2.0//)
 +<note warning>​The Stopwatch mode **cannot be used** if a field is added, \\ being **mandatory with no default value**</​note>​
  
  
extensions/itop-time-tracking.txt · Last modified: 2021/07/06 14:59 (external edit)

";