Skip to content

Commit 1bdab9d

Browse files
authored
Create README.md
1 parent 1e41956 commit 1bdab9d

File tree

1 file changed

+93
-0
lines changed
  • Specialized Areas/Resource Management/Resource Capacity And Availability Viewer (Daily Basis)

1 file changed

+93
-0
lines changed
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
This script will output a User's Capacity and Availability hourly breakdown of a on a daily basis for a given range.
2+
This is normally not easily accessible in the platform as there are only Weekly and Monthly aggregates in the platform (resource_aggregate_weekly and resource_aggregate_monthly).
3+
4+
If there is a Schedule change, the Capacity and Availablility aggregates may be out of sync as well.
5+
So, this script will show you what the breakdown is based on the current Schedule.
6+
7+
Of course, you need "Resource Management" installed to use this which typically comes as part of the "PPM Standard" plugin.
8+
9+
To use it, call the "getUserCapacity" function. You can run this in the [System Defintion > Scripts - Background] module
10+
11+
- Argument 1 can be a Sys ID or a User ID from the sys_user table
12+
- Argument 2 is the Start Date of the range you care about in YYYY-MM-DD format
13+
- Argument 3 is the End Date of the range you care about in YYYY-MM-DD format
14+
15+
Example calls:
16+
17+
getUserCapacity("ae44946c835cba90cac7a5e0deaad38f", "2025-01-01", "2025-02-28");
18+
19+
OR
20+
21+
getUserCapacity("abel.tuter", "2026-10-01", "2026-10-31");
22+
23+
Example output (left number is Capacity, right number is Availability):
24+
25+
2025-01-01: 6 | 6
26+
2025-01-02: 6 | 6
27+
2025-01-03: 6 | 6
28+
2025-01-04: 0 | 0
29+
2025-01-05: 0 | 0
30+
2025-01-06: 6 | 5
31+
2025-01-07: 6 | 6
32+
2025-01-08: 6 | 6
33+
2025-01-09: 6 | 6
34+
2025-01-10: 6 | 6
35+
2025-01-11: 0 | 0
36+
2025-01-12: 0 | 0
37+
2025-01-13: 6 | 5
38+
2025-01-14: 6 | 6
39+
2025-01-15: 6 | 6
40+
2025-01-16: 6 | 6
41+
2025-01-17: 6 | 6
42+
2025-01-18: 0 | 0
43+
2025-01-19: 0 | 0
44+
2025-01-20: 6 | 5
45+
2025-01-21: 6 | 6
46+
2025-01-22: 6 | 6
47+
2025-01-23: 6 | 6
48+
2025-01-24: 6 | 6
49+
2025-01-25: 0 | 0
50+
2025-01-26: 0 | 0
51+
2025-01-27: 6 | 5
52+
2025-01-28: 6 | 6
53+
2025-01-29: 6 | 6
54+
2025-01-30: 6 | 6
55+
2025-01-31: 6 | 6
56+
57+
Breakdown for Month --- Capacity: 138 --- Availability: 134
58+
59+
2025-02-01: 0 | 0
60+
2025-02-02: 0 | 0
61+
2025-02-03: 6 | 6
62+
2025-02-04: 6 | 6
63+
2025-02-05: 6 | 6
64+
2025-02-06: 6 | 6
65+
2025-02-07: 6 | 6
66+
2025-02-08: 0 | 0
67+
2025-02-09: 0 | 0
68+
2025-02-10: 6 | 6
69+
2025-02-11: 6 | 6
70+
2025-02-12: 6 | 6
71+
2025-02-13: 6 | 6
72+
2025-02-14: 6 | 6
73+
2025-02-15: 0 | 0
74+
2025-02-16: 0 | 0
75+
2025-02-17: 6 | 6
76+
2025-02-18: 6 | 6
77+
2025-02-19: 6 | 6
78+
2025-02-20: 6 | 6
79+
2025-02-21: 6 | 6
80+
2025-02-22: 0 | 0
81+
2025-02-23: 0 | 0
82+
2025-02-24: 6 | 6
83+
2025-02-25: 6 | 6
84+
2025-02-26: 6 | 6
85+
2025-02-27: 6 | 6
86+
2025-02-28: 6 | 6
87+
88+
Breakdown for Month --- Capacity: 120 --- Availability: 120
89+
90+
Total days in range: 59
91+
Total working days in range: 43
92+
Total capacity: 258
93+
Total availability: 254

0 commit comments

Comments
 (0)