Puzzlepart / prosjektportalen365

Prosjektportalen for Microsoft 365
MIT License
29 stars 16 forks source link

Version history from "Vis versjonshistorikk" not working, always shows latest version #221

Closed tarjeieo closed 4 years ago

tarjeieo commented 4 years ago

Describe the bug Version history in projects only shows the latest version.

To Reproduce Steps to reproduce the behavior:

  1. Perform changes in project properties
  2. See that version history only shows the current data, no history

Expected behavior Expect to see version by version changes

About your setup

olemp commented 4 years ago

https://github.com/Puzzlepart/prosjektportalen365/blob/master/Templates/Portfolio/Objects/Lists/Prosjekter.xml#L1

tarjeieo commented 4 years ago

https://pzlcloud.sharepoint.com/sites/Eiendomsskattikommunen/_layouts/15/versions.aspx?list=82209356-edfd-4ec8-95f9-34609cd94677&ID=1

olemp commented 4 years ago

Ah, the local list.

We just need to add the property for enabling versioning here: https://github.com/Puzzlepart/prosjektportalen365/blob/master/SharePointFramework/%40Shared/src/services/PortalDataService/index.ts#L115 (line 115)

tarjeieo commented 4 years ago

Aight, sweet, was worried it was something more serious wrt how syncing is done. Lets do it before 1.2.0

olemp commented 4 years ago

Might be:

targetWeb.lists.ensure(listName, '', 100, false, { Hidden: true, EnableAttachments: false, EnableVersioning: true }),

But I'm not sure if it's called EnableVersioning. Could you have a look?

tarjeieo commented 4 years ago

AdditionalSettings: { EnableVersioning: true } is what we're using elsewhere

olemp commented 4 years ago

Awesome, then that's the way to go!