How to configure the portfolio with a new project property - Puzzlepart/prosjektportalen GitHub Wiki

The project portfolio

The project portfolio is one of the powerful tools that make the Project portal great. The project portfolio has the following features:

How-to-configure-the-project-portfolio-01.png

  1. List of projects, with columns corresponding to project properties
  2. Information bar showing the number of projects shown and any filters in use
  3. Search bar to filter the list of projects
  4. Group projects by relevant project properties
  5. Export the list of projects to an Excel file
  6. Create a new portfolio view. A portfolio view is based on a search query, and by using KQL the view can be filtered to show a subset of projects or projects from other portfolios. The default query is "ContentTypeId:0x010088578E7470CC4AA68D5663464831070211* NOT GtProjectLifecycleStatusOWSCHCS:Avsluttet Path:{Site.URL}", which shows all "not closed" projects in the current site collection. A view can also have a certain set of columns (project properties)
  7. A list of available views
  8. Filter and column options. The options is only persisted for the current browsing session

How to add a new project property

In many cases, the default project properties are not enough to fully represent the project organization and you want to add another way to categorize projects. We're going to go through the process of adding a new project property named "Project size" and add this to our portfolio view.

Step 1: Create a new SharePoint column

In the project portal site collection, create a new site column (site settings --> site columns --> create). Note that in many cases it is better to do this step programmatically in a structured way, especially if you're adding multiple columns. However, this approach is still supported, but we do recommend that you create the site column using a name without spaces and special characters the first time you create the column. The reason being that SharePoint will auto-create an internal name based on the first given name of the column. You can still rename the column afterwards to give it a more friendly name.

We are creating a column of type choice/valg, to allow users to select from a pre-defined set of choices.

How-to-configure-the-project-portfolio-02.png

Optional: Edit the field to give it a better name.

How-to-configure-the-project-portfolio-03.png

Step 2: Add the column to the project properties content type

Go to site content types and locate "Project properties" ("Prosjektegenskaper"). Below the columns, select "Add existing column".

How-to-configure-the-project-portfolio-04.png

Locate the column you created in the previous step.

How-to-configure-the-project-portfolio-05.png

Step 3: Create or update a project and add a value to the new property

The column should now be available as a project property in both old and new projects. Edit a project and add a value, and save the project properties.

How-to-configure-the-project-portfolio-06.png

Step 4: Find the managed property name of the new property

After SharePoint search has crawled the new value, SharePoint will create a new crawled and managed property automatically. In SharePoint online, this usually takes about 5 minutes. Go to site settings, locate the setting "Search schema" ("Søkeskjema").

How-to-configure-the-project-portfolio-07.png.

Now you search for the internal name of the field. This is the value you entered as the name of the field in step 1.

How-to-configure-the-project-portfolio-08.png.

The result, in this example "ProjectSizeOWSCHCS", is the name of the managed property of the new column.

(Optional) Step 5: Filter by the column

Note: If you want to use this column as a filter in the project portfolio, you will need to perform a couple of additional steps. By default the managed properties are not "filterable". This means that they can not be used to filter/refine search results. To be able to do this, you will have to map a refinable managed property to the crawled property of the column.

In the search schema, search for "RefinableString" and select one of the available RefinableStrings (it doesn't matter which one you choose, as long as it's not in use.) We will use RefinableString100 in this example. Select RefinableString100, and scroll down to where you can add crawl properties. Search for the name from step 1 again. Select the crawled property on the format ows_internalname.

How-to-configure-the-project-portfolio-09.png.

How-to-configure-the-project-portfolio-10.png.

It might take some time (hours) before values are starting to appear in the RefinableString100 managed property. You can still finish this tutorial, but don't expect values for the column in the project portfolio until the next day.

Step 6: Add the column as a portfolio column

Go to "Project portal - portfolio configuration (Fields)".

How-to-configure-the-project-portfolio-11.png.

Add a new item. Fill out the form.

  • "Order"/"Rekkefølge" corresponds to the order of the column in the portfolio view, relative to other columns.
  • "Managed property"/"Forvaltet egenskap" is the name of the managed property (e.g. ProjectSizeOWSCHCS or RefinableString100 if mapping has been performed)

How-to-configure-the-project-portfolio-12.png.

The new column can now be selected in project portfolio views.

(Optional) Step 7: Add the column as a filterable column

If you carried out step 5 above, you will need to do this as well. Go to "Project portal - portfolio configuration (Filters)".

How-to-configure-the-project-portfolio-11.png.

Select "Add new" and fill out the form.

How-to-configure-the-project-portfolio-13.png.

The column is now enabled for filtering.

Step 8: Add the column to view(s)

Go to "Project portal - portfolio configuration (Views)".

How-to-configure-the-project-portfolio-11.png.

Locate the views you want to show the new column in. In this example, we want to edit the default view and add the field to this view.

How-to-configure-the-project-portfolio-14.png.

  1. Select view
  2. Edit view
  3. Select fields that should be shown
  4. You should now be able to find the new field
  5. (Optional) Select the new field as filter as well

The column is now shown in the project portfolio view.

Step 9: Add the column as a project configuration column

One last step is required to display the new column in the project properties information dialog on portfolio level, project frontpage and project status page.

Go to "Project portal - project configuration". Add new item and fill out the form with information about the new field.

How-to-configure-the-project-portfolio-15.png.

  • Title: Display name of the new column
  • "Show on project status page": Show the project property on the project status page in each project.
  • "Show on front page": Show the project property on the front page of each project.
  • "Show on portfolio level": Show the project property in the modal dialog that appears when a project is selected at portfolio level.

Step 10: Verification

Note that if you performed step 5 and 7 above, it might take up to 24 hours for values to start appearing the project portfolio. After this, the project portfolio can look like the following:

How-to-configure-the-project-portfolio-16.png.

Selecting a project will also show the new value:

How-to-configure-the-project-portfolio-17.png.