Feeds:
Posts
Comments

Recently had a requirement to update the title of the document with the same name as of document irrespective of what user sets, thought to do it via javascript but then given 2013 changed my mind to give it a try with ECMA script, it took an hour(most of it in finding the name of the document:( ) of troubleshooting but got it working :)

Could have done it in lesser steps may be only one query load, but left it in a raw state for others to read through and refine as required ;)

in case someone want to go through some extra steps

UpdateListItemTitle


<script type='text/javascript'>

function getContext()

{

    try

    {

        var context = new SP.ClientContext.get_current(); 

        var list = context.get_web().get_lists().getByTitle('Documents');; 

        var camlQuery = new SP.CamlQuery();

        camlQuery.set_viewXml('');

        this.collListItem = list.getItems(camlQuery);

        context.load(collListItem);

        context.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));        

    }

    catch(exception)

    {

        alert(exception);

    }

}

function onQuerySucceeded(sender, args) {

    try

    {

        var listItemInfo = '';

        var listItemEnumerator = collListItem.getEnumerator();

        while (listItemEnumerator.moveNext()) {

            var oListItem = listItemEnumerator.get_current();

            alert("Updating item with ID-->"+oListItem.get_item('ID')+" with Title-->"+oListItem.get_item('Title')+" To new Title -->"+oListItem.get_item('FileLeafRef'));

            //if(oListItem.get_item('Title')==null){}

            updateListItem(oListItem.get_item('ID'), oListItem.get_item('FileLeafRef'));

        }

    }

    catch(ex)

    {alert(ex);}

}

function onQueryFailed(sender, args) {

    alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());

}

function updateListItem(ItemID, title) {

    var clientContext = new SP.ClientContext.get_current();

    var oList = clientContext.get_web().get_lists().getByTitle('Documents');

    this.oListItem = oList.getItemById(ItemID);

    oListItem.set_item('Title', title);

    oListItem.update();

    clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceededUpdate), Function.createDelegate(this, this.onQueryFailedUpdate));

}

function onQuerySucceededUpdate() {

    alert('Item updated!');

}

function onQueryFailedUpdate(sender, args) {

    alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());

}

_spBodyOnLoadFunctionNames.push("getContext");

</script>

Scenario : You have to track all those tasks which if delayed by 3 days (you can change the Total Slack value say 5 days) would fall on the ciritcal tasks path. So, these could be termed as the near critical tasks which need to be monitored closely along with the Critical path in the project to adhere to the commited timelines.

Total Slack is defined as : The amount of time a task’s finish could be delayed without delaying the Project’s finish date. Critical Tasks by default have 0 Total Slack.

Let’s create a view for these second level critical tasks, it could be done even directly in Gantt View itself, yet let’s create a view.

We want to define a view which :
•Displays the true Critical Path in the project using red Gantt bars for all tasks that have 0 days of Total Slack.
•Displays the “nearly Critical” Path for the tasks that have Total Slack less than 3 days.
•Highlight these tasks using in the table by background formatting.
•Display bars in the Gantt chart for these tasks in different color.

Create a Table named “Second level critical path.” You can either copy the current Entry table or create a new as needed.

Create a Filter “Second level critical path.” Give below parameters :
pic1

Create a View “Second Level Critical path.”
1. Table – Second level critical path
2. Group – No Group
3. Filter – Second level critical path
4. Select – Highlight Filter checkbox.

All ground work done for the view, once you apply this view you can see that all tasks with Total Slack less than 3 (but more than 0 to exclude critical tasks). Now when you apply this all near critical tasks get highlighted in the view.

pic2

Now we need to format the Gantt chart to display these tasks in different colored bars. Copied Total Slack into Number1 by using formula, then created Flag1 with formula as – IIf(([Number1]<3 And [Number1]0),1,0).

Now go to chart section -> right click -> bar styles give following values :
You can chose color from the below secction of the bars tab.

pic3

Now here comes an overall view where in the table we see tasks which have Total Slack less than 3days and can become critical if delayed beyond 3 days. In chart we can view Critical tasks, regular tasks and near critical tasks which if delayed beyond 3 days will fall on Critical path.

pic4


Scenario : I want to run a report to show that since the Start Date of the project how many working days would have elapsed until the finish date of a task. This is instrumental in projects with tight deadline wherein we try to assess that how many working days would fall before we really finish the tasks.
Create a text type task custom field and add the formula – ProjDateDiff([Project Start],[Finish])/480. This will give the exact working days from Project start date that goes into finish the task.

NOTE : In-case your work hours/day are different than Standard Calendar and you are using different project calendar, please add Calendar name as 3rd parameter in the formula within bracket and [Minutes per day] to divide instead of 480.

Project Start Date – 5/5 I have added 5/6-5/7 as the holiday.
pic2<

Refer to the task ID – 3 which starts on 5/5 (which is also project start date) and ends on 5/8 ( which shows that calculation has considered 5/5 and 5/8 as the working days count for calculations).

Highlighted are the tasks where the difference could easily be assessed.

pic1


Scenario : You want to assess the peak units (assignments) of various resources month-wise to better do the capacity planning, you can open your resource usage view – in that add Peak Units in the timephased area by right clicking and seleting it from list of the fields and then zoom in the timephased view to reach to month-wise details and here you have the peak unit assignments done on the resources month-wise. An excellent way to assess the current resource allocation to ensure that resourcing is done effectively.

pic1


Assignment Delay field can be used to show the delays on a task on which multiple resources are assigned yet some starts the task as on the task’s start date while few may start it on a later date. This field helps in tracking the number of days an assignment got delayed.

I’m adding the futher details on one of the question I answered on the Forum related to it; wherein Vendors resources assigned on the task started it late while the internal resources started the task on time. So, the user needed the report to track the delayed tasks and days it was delayed.

Say for a task Meeting which should start on 1st May and end on 7th May internal resource Kim and Vendor resources Tim & Ko were assigned. Kim started the task on time while Tim started 2 days late and Ko started a day late as their engagement was only for that span. So, Vendor resources were given Group name – Vendor in resource sheet and then Group by was created filtering first on the Group and second on the assignment delay. This created an overall snapshot of the delay.

pic


How do we handle a resource when we got to deal with Vendor side SPOC who is just acting as the Supervisior/SPOC or Reporting Manager on the tasks getting assigned to his team mates. He won’t be actually working on them. This is the scenario when we are just using the standalone Project for scheduling and reporting purpose.

He can’t be assigned on the tasks with 0% unit as then his data would get pulled on all usage reports and other assignment related reports. He is just a dummy resource actually not working on the task yet crucial for been the point of contact.

For this purpose MS Project has a wonderful option of “Contact” field which is a task oriented field basically visible in Gantt and other task related views like Task Usage. Wherein we can just add the name of vendor SPOC for the artifact credentials. This is clean way to add him without complicating our assignment reports.

Hope this help!!

 


So once again we are back with some interesting topic Resource Plan, it has been discussed in length at several places, blogs forums etc….and i am here with another thread on the same functionality / feature, though there are quite a few areas where resource plan can be improved and i am sure MS is working hard to prioritize things and getting them into the product but i still feel this is one area which has been ignored

So to start the discussion today if you have to do detail resource management, in my experience you need to know the MS Project tool extensively and all of it concepts to have proper resource management otherwise its possible or likely you are not going to get good results

Despite of loads of features being added everyday, even today PM’s tend to use all other applications like power point most favorite excel to do all kind of management why possibly the answer it they don’t need to learn excel or power point or visio to use it and this is the point of my today’s post which is usability, even though there are other functional areas which needs improvement in resource plan like calendars not being considered in resource plan which creates problem in calculation, not able to import resource plan into MS project, even though there are 3rd party tools or customizations and other things that will help you do it, however i am not going to discuss these today but will focus on the usability if resource plan, there are several inconsistencies in 2010 where in most of the places where project server uses JSGrid for resource plan there is no JSGrid perhaps an XML grid

So what are the problems, from my perspective UI has potential issues which creates problem in using the resource plan functionality, listed below

1. Adding Resources to Resource Plan

Why it has to be so hard, performing so many clicks just to  add a resource, in an OOB environment >> click 1 Build team >> select individual resources >> Add the resources to team >> do a save & close

Problems ::

  • Too many clicks

 Solution: Given that now with 2010 / 2013 there is a ribbon infrastructure available, it could have been as simple as adding a Add Resource button to the ribbon which provides search functionality(kind of auto complete or something like that) for resource name and all you do is keep typing name and selecting the resources and add them, something like as below

NewRibbonButtons

AddResource

ResourceAdded

2. Removing a resource from resource Plan

Same problems as with adding a resource plan, too many clicks, solution could have been as simple as selecting the resource from grid and on ribbon clicking a button remove resource and with a confirmation all should be done

DeleteResource

3. Searching Resource

Problem :: No easy way to search and add resource if there are quite a bit of resources in resource center, for me it was around 28k resources

  • Cannot perform Resource Match in resource plan
  • If there are too many resources e.g. ~30K resources no easy way to filter resources

Solution :: Including solution 1 where we have a ribbon button to add resource, a modal dialog box can be prompted with having a functionality to search resource and add it something like below

AutoCompleteSearch

4. Replacing Resource From Resource Plan

What happens if initially you added a resource in resource plan and now needs to replace him with someone else, should this be so hard to delete all data for existing resource >> follow all the steps to add new resource and re enter all same data :o

Easier said than done

Solution :: Again my all solution are leveraging the ribbon infrastructure, so select a resource from grid, click ribbon and select new resource and simply hit replace, as in below snapshot

ReplaceResource

5. Modifying Resource Assignment level attributes

This may or may not be critical/applicable depending upon how you want it to but in our case it was

Now if you have to modify only few attributes of resource assignment you click on the edit custom fields, you are presented with  all custom fields not even relevant, why would you want the end user to see all attributes and additional things which end user might not even need to see, so wouldn’t that be overwhelming for end user

Solution :: simple solution allow users to edit custom field with restriction using a ribbon button, as below

UpdateResourceAttributes

ResourcePlanCustomAtrributeUpdated

 6. Even though you select resource Plan from the utilization drop down it changes back to project plan upon navigating between pages initially while building team and an overlook results in data problems specially while performing portfolio analysis

Again this may or may not be applicable to everyone

Solution : We defaulted it to Resource plan for everyone and hid the ribbon component

ResourcePlanCustomAtrributeUpdated

 

 

There is more to it, this was just a start which i wanted to focus on this post, stay tuned for more

Follow

Get every new post delivered to your Inbox.