The Vertec Python modules for working with Resource Planning
Operating mode
Cloud Suite
|ON-PREMISES
Modules
Services & CRM
Budget & Phases
Purchases
Resource Planning
Business Intelligence
As of version 6.6, the Python module vtcplanningcore is available for Resource Planning with the following methods:
Method / feature | description |
---|---|
increment_interval_date(date, increment): date |
Feature for incrementing and decrementing period start data. Increment the specified date by the increment specified quantity of intervals. A negative quantity of intervals can be specified for decrementing. |
get_planning_level(): string |
Returns the planning layer as a string. Possible results: 'Project' or 'Phase' . |
get_planning_interval_type(): string |
Returns the planning interval as a string. Possible results: 'day' , 'week' or 'month' . |
show_bulk_planning_dialog(left_obj, right_obj) |
Displays a dialog for efficiently setting multiple planning values for the specified objects. The order in which the objects are provided does not play Role, but the caller must ensure that one of them is an object of type |
For the implementation of the Resource Planning lists, this module also includes a ResourcePlanningProvider
Class available which allows reading and setting of plan data and which can be used in a List Controller.
A ResourcePlanningProvider
Object is created for a list of entries (users, projects or phases) and a time period. The provider then loads all planning data for these source objects and for the specified period. Subsequently, the planned values can be retrieved or set.
A budgeted value in ResourcePlanningProvider
always applies to 2 entries and a date, e.g. for the user “Christoph Keller,” the project “AZZ2” and the month starting with 01.08.2022.
The one entry (sourceEntry
) must come from the list of entries specified at the time of initialization. The other entry is called othersideEntry
.
The following methods are available on a ResourcePlanningProvider object:
ResourcePlanningProvider(sourceEntries, start, end) |
Constructor, creates a planning provider and loads the planning data for the specified objects and period. |
add_entry(obj) |
Adds a new object to the provider’s sourceEntries list. |
add_otherside_entry(obj) |
Adds a new object temporarily to the list of otherside entries. This allows this object to be set_planned_minutes() Budgeted values can be entered. |
get_planned_minutes(date, sourceEntry, othersideEntry, subscriber): int |
Returns the planned time in minutes for the planning cell with interval date date and the two entries indicated. If no plan data is available, None returned. |
set_planned_minutes(date, sourceEntry, othersideEntry, value) |
Sets the planned time in minutes for the planning cell with interval date date and the specified entries.Setting a None Value as value removes the plan data for this cell. |
has_write_access(sourceEntry, othersideEntry, subscriber): boolean |
Checks whether the two objects and the date interval have write permissions. |
get_planned_minutes_aggregated (source_entry, otherside_entry, dateFrom, dateTo=None, subscriber=None): int |
Returns the aggregated scheduled time for the two specified records in the specified period.
None if no budgeted values with the specified criteria are found. |
get_net_capacity_minutes(self, worker, dateFrom, dateTo=None, subscriber=None): int |
Net capacity in minutes per user.
|
get_custom_net_capacity_minutes(self, worker, dateFrom, dateTo=None, subscriber=None): int |
As of Vertec 6.7.0.5. Net Capacity in minutes per user based on the system setting Adjusted Net Capacity (Percentage). Gives |
get_gross_capacity_minutes(self, worker, dateFrom, dateTo=None, subscriber=None): int |
Gross capacity in minutes per user.
|
get_remaining_capacity_minutes(worker, dateFrom, dateTo=None, subscriber=None): int |
Remaining free capacity in minutes for a given user and a given date range (net_capacity – planned_minutes).
|
get_custom_remaining_capacity_minutes(self,worker, dateFrom, dateTo=None, subscriber=None): int |
As of Vertec 6.7.0.5. Remain free capacity in minutes for a specific user and a specific date range, taking into account the system setting Adjusted Net Capacity (Percentage). Gives |
get_otherside_entries(subscriber): list of entries |
Returns the list of entries for which plan data already exists, based on the sourceEntries objects specified in the constructor. |
generate_date_range(start, end) |
Returns a list of date values for scheduling intervals of start to end . Depend on the system-wide setting of the planning interval (months, weeks, days). |
get_start_preceding_interval(): date |
Returns the date of the interval preceding the start interval. |
get_column_title_by_date(date): string |
Returns the appropriate column title if the date value for a specific planning interval is specified. |
ResourcePlanningProviders are commonly used in List controllers and Custom renderers for planning lists. The list controller instantiates a planning provider, which is then used to show and set the values in plan cells.
The vtcplanningcore module is also available as a Python Stub File. It says vtcplanningcore.py
and is stored like the other Stub Files in the PythonStubs subfolder in the Vertec installation directory.
From version 6.6. there is the Python module vtcplanning
, which provides standard implementations of list controllers for Resource Planning.
These all have an initialize_with_period(start, end, interval)
Method which is called by the Vertec core and specifies the planning period and the planning interval to be displayed.
To ensure that a planning list that starts on a new interval (e.g. current month) is not completely empty, the list controllers also load planning data for an interval before the specified start date.
This means that if August – October is specified as the planning period (planning interval “month”) then row objects are also displayed which have planning data in July, but not in August-October.
The Timetables are based on a single object and show one row for each planned opposite object. The columns correspond to the scheduled time intervals.
Time tables can also be shown as read-only sum tables based on a list.
We provide the following list controller classes in the Python module vtcplanning:
list controller | description |
---|---|
vtcplanning.SingleObjectTimeTableController |
Used to plan on individual objects (check The controller can handle the different classes (project, project phase, AbstractWorker, project user or PlanningWorker), the same controller can always be specified. |
vtcplanning.ReadonlySingleObjectTimeTableController | Based on a single object, but read-only, not for scheduling. Used for timesheets on single objects that cannot be scheduled. |
vtcplanning.ReadonlyProjectsSingleObjectTimeTableController | For read-only project timesheets on individual objects. Use to show project totals if the planning level is phases. |
vtcplanning.ReadonlyPhasesSingleObjectTimeTableController | For read-only phase time tables on individual objects. Use to show phase totals if the planning type is Processor Phase Assignment. |
vtcplanning.ReadonlyContainerTimeTableController | For read-only timesheets on lists (check Für Listen anzeigen? is set).Used for Total Timesheets. |
vtcplanning.ReadonlyOtherSideContainerTimeTableController | For read-only timesheets on lists (check Für Listen anzeigen? is set).Use for Total Timesheets to show the totals of the opposite side on a list of objects (e.g. editor totals on a project list). |
vtcplanning.ReadonlyPhasesContainerTimeTableController | For read-only timesheets on lists (check Für Listen anzeigen? is set) to show sums of phases on a list of projects or users if the planning level is project (in this case, the normal list controllers on projects would not be shown). |
Starting from a list of entries (AbstractWorker, project or phases), a Resource Planning Pivot Table can be displayed. The pivot table shows the entries as columns and the planned opposing entries as rows. This makes it possible to enter planning data for new opposing entries via star-row.
The following list controller classes are available to implement pivot table views:
list controller | description |
---|---|
vtcplanning.RegularPivotTableController |
For pivot tables with the entries in the list as rows and the opposite side as columns. Use to plan on a list (check The controller can handle the different classes (project, project phase, AbstractWorker, project user or PlanningWorker), the same controller can always be specified. |
vtcplanning.MirroredPivotTableController |
For pivot tables with the entries in the list as columns and the opposite side as rows. Use to plan on a list (check a star line can be shown in this list to add new objects to be planned. More detailed information can be found here. The controller can handle the different classes (project, project phase, AbstractWorker, project user or PlanningWorker), the same controller can always be specified. |
vtcplanning.ReadonlyRegularPivotTableController | Used to show project user PivotTables when the planning level Phasen is, with the entries of the list as rows and the opposite side as columns. |
vtcplanning.ReadonlyMirroredPivotTableController | Used to show project user PivotTables when the planning level Phasen is, with the entries of the list as columns and the opposite side as rows. |
vtcplanning.RegularSingleObjectPivotTableController | Used to also plan on a single project in pivot tables. Display a pivot table with the single entry as a row and the opposite side as columns. |
vtcplanning.MirroredSingleObjectPivotTableController | Used to also plan on a single project in pivot tables. Show a pivot table with the single entry as a column and the opposite side as rows. |
To match this, the following Custom Renderer are available for use in the resource planning tables. All of these renderers can be used in the list settings in two ways:
%col%
Ja
Displays the value in the cell that matches the row/column combination.
Checkbox Dynamic: Nein
Displays the summed value across all columns per row.
Custom renderer | description |
---|---|
vtcplanning.PlannedMinutesRenderer |
Renderer for the planning times. Allows you to enter the planned values in the individual cells. |
vtcplanning.NetCapacityRenderer |
Renderer to show the net availability of users. |
vtcplanning.CustomNetCapacityRenderer |
As of Vertec 6.7.0.5. Show the net availability of users taking into account the system setting setting. |
vtcplanning.GrossCapacityRenderer |
Renderer to show the gross availability of users. |
vtcplanning.RemainingCapacityRenderer |
Renderer to show the remaining availability of users. |
vtcplanning.CustomRemainingCapacityRenderer |
As of Vertec 6.7.0.5. Show the remaining availability of users taking into account the system setting Adjusted Net Capacity (Percentage). |
The vtcplanning module is also available as a Python Stub File. It says vtcplanning.py
and is stored like the other Stub Files in the PythonStubs subfolder in the Vertec installation directory.