Move Resource Plan action removes and recalculates allocations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-03-2023 01:44 AM
Hello Community,
I would like to know more about the logic/reason behind the "Move Resource Plan" action on the allocation workbench. This feature is intended to shift the resource plan in time, however it has (in my opinion) a big flaw: moving a resource plan in confirmed/allocated state removes the original allocations and the system recalculates new ones.
Example: Let's have a resource plan, where a Group with "Any Members" is requested for 1 FTE (meaning 1 resource could fulfill the whole resource plan theoretically), and 3 resources allocated to this plan:
Now the resource manager moves the resource plan 1 month ahead:
Notice, that 2 out of 3 HARD allocations are removed and the system reallocated only 1 resource with full time.
This is far from ideal, as original allocation are lost and now the plan needs to be replanned from scratch.
So the question is if this "smart" redistribution can be turned off for moving the resource plans, or if not, what is a good workaround for shifting resource plans - other than cancelling and recreating them from scratch?
Any input is appreciated!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-03-2023 12:32 PM
Hi @Attila Beregvar ;
The resource plan work fine, its a good practice when you move your Resource Plan to another state and realocate but as you now that would cancell the resource plan if for example you tried to add new members between the resource plan without the need of create a new one, in my company i Create a new UI action to recreate allocations i would share, that can solve tha majority of the problem because you can just recalculate the hours if you resource plan is actually allocated:
Condition:
(new RMUIActionHelper(current)).canComplete()
Script:
updateAllocation();
function updateAllocation(){
// First Step delete the existing resource allocations
var rp = new ResourcePlan();
rp.get(current.getValue("sys_id"));
rp.deleteResourceAllocations();
//Second Step recreate the existing allocations
var handler = new ResourcePlanStateChangeHandler(current);
handler.process();
//Thrid step reproccess the existing time cards from the current resource plan
var timeGR = new GlideRecord('time_card');
timeGR.addQuery('resource_plan',current.getValue("sys_id"));
timeGR.addEncodedQuery("stateINApproved,Processed");
timeGR.query();
while(timeGR.next()){
var timeCardProcessHandler = new TimeCardProcessHandler();
timeCardProcessHandler.process(timeGR.getUniqueValue());
}
}
If you want to know more when the resource plan move accross the phases, those are trigered by a Business Rules and then trigger some script includes from the "ResourcePlan()", you can check the Business Rule of "Handle state change" from the Resource Plan table, and check the " ResourcePlanStateChangeHandler" script include to know how are triggered and processed.
Hope that help you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2023 07:44 AM
Hello Marco,
Thanks for the reply! It looks like a workaround for the case, but it involves the reprocessing of allocations (instead of keeping the current ones and just shifting them in time) and even time cards, so I would avoid doing it unless absolutely necessary.
Still, the fact that using the "Move Plan" action overwrites the existing allocations made by the resource manager and replaces them with a system-calculated allocation is not a good practice. It makes this feature basically unusable if you don't want to replan your resource plans after moving them to get back your original hard allocations.
So I'm still looking for some other workaround.