Closed nicolasfranck closed 1 year ago
@laurastandaert
The controller that unpublishes the template, fetches all versions, sets the flag published
to false
,
and then returns to the list of templates. That lists always shows the latest versions.
There are two scenario's in which you can hit the unpublish button:
1) You DID NOT make any changes after publishing
version | published | -> | new attribute published |
---|---|---|---|
version-2 | true | -> | false |
version-1 | false | -> | false |
version-0 | false | -> | false |
2) You DID make changes. This is what they call "draft templates", i.e. unpublished templates that have a published version also. version-2
is draft here.
version | published | -> | new attribute published |
---|---|---|---|
version-2 | false | -> | false |
version-1 | true | -> | false |
version-0 | false | -> | false |
Scenario 1) is problematic as now a template that was previously published (i.e. version-2
), can be edited again, directly, which will alter the structure of existing plans.
Scenario 2) is not problematic, because the latest template version-2
was never published. So hitting "unpublish" when you're dealing with a draft template is fine
Conclusion: if the latest template version is published and has plans, then generate a new version for that
my PR https://github.com/DMPRoadmap/roadmap/pull/3143 is merged BTW
to be deployed on update of dmponline.be. See test.dmponline.be for newer version
cf. https://github.com/DMPRoadmap/roadmap/issues/2860