Skip to content

Commit

Permalink
v1.1.7 merge
Browse files Browse the repository at this point in the history
  • Loading branch information
olemp authored Jan 9, 2020
2 parents 5b47d29 + 12c01cb commit 5a43734
Show file tree
Hide file tree
Showing 101 changed files with 2,338 additions and 1,200 deletions.
25 changes: 22 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,34 @@
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## 1.1.7 - 2020-01-09

### Added
- RiskMatrix added as separate web part #97
- RiskMatrix added to project status #172
- Improved error messages when provisioning new projects #170
- Including previous budget numbers in new project status #167
- Better support for the Portfolio administrator role #133
- Made it possible to work with draft and published versions of project status reports #119
- Support for copying more than 100 items in CopyListData (up to 500)
- Support for installing to /teams/ #177

### Fixed
- Fixed lookups in list 'Prosjektkolonnekonfigurasjon' #142
- Fixed colors and columns not matching content #134
- Fixed an issue with invalid web part properties on Oppgaver.aspx #164
- Added support for currency fields in Portfolio Insights #155
- Fields with _ in field name doesn't sync to portfolio
- Persists selection for ListContentSection/ExtensionsSection #182

## 1.1.6 - 2019-11-14

## Fixed
### Fixed
- Fixed a bug with current phase not being displayed in phase web part on project frontpage #149


## 1.1.5 - 2019-11-13

## Added
### Added
- Support for PSCredential in Install script #145
- Added missing resource for choice option (Choice_GtResourceAbsence_Linetasks) #148

Expand Down
12 changes: 7 additions & 5 deletions Install/Install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
)

$sw = [Diagnostics.Stopwatch]::StartNew()
$InstallStartTime = (Get-Date).ToUniversalTime().ToString("MM/dd/yyy HH:mm")
$InstallStartTime = (Get-Date -Format o)
if ($Upgrade.IsPresent) {
Write-Host "[INFO] Upgrading [Prosjektportalen 365] to [VERSION_PLACEHOLDER]"
}
Expand Down Expand Up @@ -88,7 +88,7 @@ $AdminSiteUrl = (@($Uri.Scheme, "://", $Uri.Authority) -join "").Replace(".share
#endregion

#region Check if URL specified is root site
if ($Alias.Length -lt 2 -or $ManagedPath -ne "sites/") {
if ($Alias.Length -lt 2 -or (@("sites/", "teams/") -notcontains $ManagedPath)) {
Write-Host "[ERROR] It looks like you're trying to install to a root site or an invalid site. This is not supported." -ForegroundColor Red
exit 0
}
Expand Down Expand Up @@ -281,7 +281,7 @@ Catch {
if (-not $SkipSearchConfiguration.IsPresent) {
Try {
Write-Host "[INFO] Importing Search Configuration"
Set-PnPSearchConfiguration -Scope Subscription -Path .\SearchConfiguration.xml -Connection $AdminSiteConnection -ErrorAction Stop
Set-PnPSearchConfiguration -Scope Subscription -Path .\SearchConfiguration.xml -Connection $AdminSiteConnection -ErrorAction Continue
Write-Host "[INFO] Successfully imported Search Configuration" -ForegroundColor Green
}
Catch {
Expand All @@ -298,6 +298,8 @@ Write-Host "[INFO] Running post-install steps"
$sw.Stop()

Write-Host "[REQUIRED ACTION] Go to $($AdminSiteUrl)/_layouts/15/online/AdminHome.aspx#/webApiPermissionManagement and approve the pending requests" -ForegroundColor Yellow
Write-Host "[RECOMMENDED ACTION] Go to https://github.com/Puzzlepart/prosjektportalen365/wiki/Installasjon#steg-4-manuelle-steg-etter-installasjonen and verify post-install steps" -ForegroundColor Yellow


if ($Upgrade.IsPresent) {
Write-Host "[INFO] Upgrade completed in $($sw.Elapsed)" -ForegroundColor Green
Expand All @@ -306,7 +308,7 @@ else {
Write-Host "[INFO] Installation completed in $($sw.Elapsed)" -ForegroundColor Green
}

$InstallEndTime = (Get-Date).ToUniversalTime().ToString("MM/dd/yyy HH:mm")
$InstallEndTime = (Get-Date -Format o)

$InstallEntry = @{
InstallStartTime = $InstallStartTime;
Expand All @@ -315,7 +317,7 @@ $InstallEntry = @{
InstallCommand = $MyInvocation.Line.Substring(2);
}

Add-PnPListItem -List "Installasjonslogg" -Values $InstallEntry -Connection $SiteConnection >$null 2>&1
Add-PnPListItem -List "Installasjonslogg" -Values $InstallEntry -Connection $SiteConnection -ErrorAction SilentlyContinue >$null 2>&1

$InstallEntry.InstallUrl = $Url

Expand Down
3 changes: 1 addition & 2 deletions Install/Scripts/PostInstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ Set-PnPList -Identity Konfigurasjon -EnableContentTypes:$false -Connection $Conn
Set-PnPList -Identity Listeinnhold -EnableContentTypes:$false -Connection $Connection
Set-PnPList -Identity Porteføljevisninger -EnableContentTypes:$false -Connection $Connection
Set-PnPList -Identity Prosjektkolonner -EnableContentTypes:$false -Connection $Connection
Set-PnPList -Identity Ressursallokering -EnableContentTypes:$false -Connection $Connection
Set-PnPList -Identity Statusseksjoner -EnableContentTypes:$false -Connection $Connection
Set-PnPList -Identity Ressursallokering -EnableContentTypes:$false -Connection $Connection
15 changes: 15 additions & 0 deletions SharePointFramework/@Shared/src/models/StatusReport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,28 @@ export class StatusReport {
}, {});
}

/**
* Budget numbers
*/
public get budgetNumbers(): TypedHash<number> {
return {
GtBudgetTotal: this._item.GtBudgetTotal || 0,
GtCostsTotal: this._item.GtCostsTotal || 0,
GtProjectForecast: this._item.GtProjectForecast || 0,
}
}

/**
* Field values
*/
public get fieldValues(): TypedHash<string> {
return this._item.FieldValuesAsText || this._item;
}

public get moderationStatus(): string {
return this._item.FieldValuesAsText.GtModerationStatus;
}

/**
* Get status values from item
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class PortalDataService {
* @param {TypedHash<string>} properties Properties
*/
public async updateStatusReport(id: number, properties: TypedHash<string>): Promise<void> {
await this._web.lists.getByTitle(this._configuration.listNames.STATUS_SECTIONS).items.getById(id).update(properties);
await this._web.lists.getByTitle(this._configuration.listNames.PROJECT_STATUS).items.getById(id).update(properties);
}

/**
Expand Down
3 changes: 2 additions & 1 deletion SharePointFramework/@Shared/src/util/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ export * from './setUrlHash';
export * from './stringToArrayBuffer';
export * from './redirect';
export * from './getUrlParam';
export * from './sleep';
export * from './sleep';
export * from './replaceTokens';
15 changes: 15 additions & 0 deletions SharePointFramework/@Shared/src/util/replaceTokens.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { TypedHash } from '@pnp/common';

/**
* Replace tokens
*
* @param {string} str The string
* @param {TypedHash} obj Object containing misc values (no deep support)
* @param {RegExp} regex Regex
*/
export function replaceTokens(str: string, obj: TypedHash<any>, regex: RegExp = /\{[A-Za-z]*\}/gm): string {
return str.match(regex).reduce((s, value) => {
let field = value.substring(1, value.length - 1);
return s.replace(value, obj[field] || '');
}, str);
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"solution": {
"name": "pp-portfolio-web-parts",
"id": "00483367-68e2-4977-9cc3-6cf0de623daa",
"version": "1.1.6.0",
"version": "1.1.7.0",
"includeClientSideAssets": true,
"skipFeatureDeployment": true,
"webApiPermissionRequests": [
Expand Down
2 changes: 1 addition & 1 deletion SharePointFramework/PortfolioWebParts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "portfoliowebparts",
"version": "1.1.6",
"version": "1.1.7",
"private": true,
"engines": {
"node": ">=8.0.0 <11.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@

.portfolioOverview {
margin: 15px 0 0 0;
height: 90%;
.container {
position: relative;
height: 100%;
.header {
padding: 20px 0 20px 0;
.title {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,13 @@ export class PortfolioOverview extends React.Component<IPortfolioOverviewProps,
layerHostId={this._layerHostId}
hidden={!this.props.showCommandBar} />
<div className={styles.container}>
<ScrollablePane scrollbarVisibility={ScrollbarVisibility.auto}>
<ScrollablePane scrollbarVisibility={ScrollbarVisibility.auto} styles={{ root: { top: 75 } }}>
<MarqueeSelection selection={this._selection} className={styles.listContainer}>
<DetailsList
items={items}
constrainMode={ConstrainMode.unconstrained}
layoutMode={DetailsListLayoutMode.fixedColumns}
columns={this._getColumns(columns)}
columns={columns}
groups={groups}
selectionMode={SelectionMode.multiple}
selection={this._selection}
Expand Down Expand Up @@ -149,20 +149,6 @@ export class PortfolioOverview extends React.Component<IPortfolioOverviewProps,
return format(strings.SearchBoxPlaceholderText, this.state.currentView.title.toLowerCase());
}

/**
* Get columns
*
* @param {ProjectColumn[]} columns Columns
*/
private _getColumns(columns: ProjectColumn[]) {
let columnsCopy = [...columns];
if (this.props.pageContext.legacyPageContext.isSiteAdmin) {
let addCol = new ProjectColumn().create('AddColumn', null, ` ${strings.AddColumnLabel}`, 'CalculatorAddition', () => redirect(this.props.configuration.columnUrls.defaultNewFormUrl), 150);
columnsCopy.push(addCol);
}
return columnsCopy;
}

/**
* On search
*
Expand Down
6 changes: 4 additions & 2 deletions SharePointFramework/PortfolioWebParts/src/data/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,10 @@ export class DataAdapter {
}

/**
* Fetch data for view (used by [PortfolioOverview] and [PortfolioInsights])
* Fetch data for view
*
* @description Used by PortfolioOverview and PortfolioInsights
*
* @param {PortfolioOverviewView} view View configuration
* @param {IPortfolioConfiguration} configuration PortfolioOverviewConfiguration
* @param {string} siteId Site ID
Expand All @@ -105,7 +107,7 @@ export class DataAdapter {
}),
sp.search({
...DEFAULT_SEARCH_SETTINGS,
QueryTemplate: `DepartmentId:{${siteId}} ContentTypeId:0x010022252E35737A413FB56A1BA53862F6D5*`,
QueryTemplate: `DepartmentId:{${siteId}} ContentTypeId:0x010022252E35737A413FB56A1BA53862F6D5* GtModerationStatusOWSCHCS:Publisert`,
SelectProperties: [...configuration.columns.map(f => f.fieldName), siteIdProperty],
Refiners: configuration.refiners.map(ref => ref.fieldName).join(','),
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ declare interface IPortfolioWebPartsStrings {
DataSourceCategoryLabel: string;
DataSourceLabel: string;
SelectedColumnsLabel: string;
AddColumnLabel: any;
SortDescLabel: string;
SortAscLabel: string;
ColumSettingsLabel: string;
Expand Down
1 change: 0 additions & 1 deletion SharePointFramework/PortfolioWebParts/src/loc/nb-no.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ define([], function () {
FilterBy: 'Filtrer etter',
DataSourceCategoryLabel: 'Kategori for datakilder',
DataSourceLabel: 'Datakilde',
AddColumnLabel: 'Legg til kolonne',
SortDescLabel: 'A til Å',
SortAscLabel: 'Å til A',
ColumSettingsLabel: 'Kolonneinnstillinger',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export class ChartConfiguration {
if (this.fields.length === 1) {
const [field] = this.fields;
switch (field.type) {
case 'number': {
case 'currency': case 'number': {
return [{
type: 'pie',
colorByPoint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class ChartDataItem {
}
return 0;
}
case 'number': {
case 'currency': case 'number': {
if (this.hasValue(field)) {
return parseInt(rawValue, 10);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export type DataFieldType = 'text' | 'tags' | 'number' | 'percentage';
export type DataFieldType = 'text' | 'tags' | 'number' | 'currency' | 'percentage';
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"id": "5f925484-cfb4-42ce-9f90-79a874bb8a68",
"alias": "BenefitsOverviewWebPart",
"componentType": "WebPart",
"version": "1.1.6",
"version": "1.1.7",
"manifestVersion": 2,
"requiresCustomScript": false,
"hiddenFromToolbox": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"id": "d8558017-1e3b-4d13-82fa-2520e845297b",
"alias": "DeliveriesOverviewWebPart",
"componentType": "WebPart",
"version": "1.1.6",
"version": "1.1.7",
"manifestVersion": 2,
"requiresCustomScript": false,
"hiddenFromToolbox": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"id": "3ec6bcaf-28bc-4f2e-9e90-77e8cebf0b5f",
"alias": "ExperienceLogWebPart",
"componentType": "WebPart",
"version": "1.1.6",
"version": "1.1.7",
"manifestVersion": 2,
"requiresCustomScript": false,
"hiddenFromToolbox": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"id": "941fd73c-b957-41c3-8d4f-082268407f10",
"alias": "LatestProjectsWebPart",
"componentType": "WebPart",
"version": "1.1.6",
"version": "1.1.7",
"manifestVersion": 2,
"requiresCustomScript": false,
"hiddenFromToolbox": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"id": "875ca87a-e331-4ffb-bc69-0272fdf80e41",
"alias": "PortfolioInsightsWebPart",
"componentType": "WebPart",
"version": "1.1.6",
"version": "1.1.7",
"manifestVersion": 2,
"requiresCustomScript": false,
"hiddenFromToolbox": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"id": "e58e3d32-057a-4418-97ce-172b92482ba2",
"alias": "PortfolioOverviewWebPart",
"componentType": "WebPart",
"version": "1.1.6",
"version": "1.1.7",
"manifestVersion": 2,
"requiresCustomScript": false,
"hiddenFromToolbox": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"id": "54fbeb7d-e463-4dcc-8873-50a3ab2f0f68",
"alias": "ProjectListWebPart",
"componentType": "WebPart",
"version": "1.1.6",
"version": "1.1.7",
"manifestVersion": 2,
"requiresCustomScript": false,
"hiddenFromToolbox": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"id": "2ef269b2-6370-4841-8b35-2185b7ccb22a",
"alias": "ResourceAllocationWebPart",
"componentType": "WebPart",
"version": "1.1.6",
"version": "1.1.7",
"manifestVersion": 2,
"requiresCustomScript": false,
"hiddenFromToolbox": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"id": "57530c94-4fb2-4ca2-9279-16c57881fa19",
"alias": "RiskOverviewWebPart",
"componentType": "WebPart",
"version": "1.1.6",
"version": "1.1.7",
"manifestVersion": 2,
"requiresCustomScript": false,
"hiddenFromToolbox": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"solution": {
"name": "pp-project-extensions",
"id": "fe723971-d5c2-4698-91e3-c16e2f72fb5b",
"version": "1.1.6.0",
"version": "1.1.7.0",
"includeClientSideAssets": true,
"skipFeatureDeployment": true,
"webApiPermissionRequests": [
Expand Down
4 changes: 2 additions & 2 deletions SharePointFramework/ProjectExtensions/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "projectextensions",
"version": "1.1.6",
"version": "1.1.7",
"private": true,
"engines": {
"node": ">=0.10.0"
Expand Down Expand Up @@ -50,7 +50,7 @@
"shared": "link:..\\@Shared",
"sp-entityportal-service": "^1.0.0",
"sp-hubsite-service": "0.5.2",
"sp-js-provisioning": "^1.0.2",
"sp-js-provisioning": "^1.0.4",
"spfx-jsom": "^0.6.4",
"string-format": "^2.0.0",
"underscore": "^1.9.1",
Expand Down
Loading

0 comments on commit 5a43734

Please sign in to comment.