Lifecycles Synchronization

Targeted milestone: unknown, may be replaced by InBulkPromote

Add ability to let several parts share the same lifecycle so that a signer can promote all parts in one click.

Purpose

Who?

  • Who will use it?
    • owners : they synchronize parts
    • signers : they sign XX parts in two clicks

Synchronized parts

Part A and B can share a lifecycle if:

  • they have the same owner
  • they have the same lifecycle
  • A is not a revision of B
  • B is not a revision of A

It is possible to build a set of synchronized parts as long as all rules are followed by each couple of parts.

/!\ FIXME /!\

GraphViz image

If P1 and P3 are synchronized, it is impossible to promote P2 since P3 is a draft but it is impossible to promote (P3, P1) since P2 is a draft.

It can be less obvious:

GraphViz image

-> possible fixes:

  • checks in check_add_child, check_synchronize: can be annoying
  • split the synchronized set in two (or more) sets (when?, who (signers, owner...)? )
  • let users fix it (easy for developers, painful for users)
  • ...

Synchronization

It's possible to synchronize parts if, and only if, they are draft.

It's possible to synchronize a parent and its child. In that case, both parts are promotable if the child is promotable.

Is it possible to merge two sets of synchronized parts (if all requirements are met) ???

Desynchronization

It should be possible to desynchronize a part.

When a promotion is approved

All synchronized parts are approved.

When a part is promoted…

to proposed states

All synchronized parts are promoted to the same state.

to its official state

All synchronized parts are promoted to the same state.

All previous revisions (of all synchronized parts) are deprecated/cancelled according to their states.

to its deprecated state

The other parts are not deprecated.

The deprecated part is no longer synchronized.

When a part is demoted

When a part is cancelled

The other parts are not cancelled.

Documents

Document can not be synchronized since signers should check the content of their files/resources before approving a promotion.

User interface

New pages

Updated pages

The lifecycle page should display the list of synchronized part.

Implementation details

Main idea: when a signer is edited or a promotion is approved, changes are propagated on all parts.

Database schema

Similar to AlternateLink

Controllers

Similar to AlternateLink

Warning: do not send to many mails.

Models

Need to update Part.is_promotable to test if a group of synchronized parts is promotable. Difference with the original Part.is_promotable : a parent is promotable if its children are synchronized with it or are already promoted.

Views

Tests