Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Copy from preview to final when approving #397

Open
leplatrem opened this issue Mar 12, 2019 · 0 comments
Open

Copy from preview to final when approving #397

leplatrem opened this issue Mar 12, 2019 · 0 comments

Comments

@leplatrem
Copy link
Contributor

Currently, the workflow is the following:

  • changes are made on source
  • review is requested: source records are copied to preview
  • changes are approved: source records are copied to both preview and final

Intuitively we could change the final step and just copy from preview to final instead.

Reference https://bugzilla.mozilla.org/show_bug.cgi?id=1534644

if new_status == STATUS.TO_SIGN:
# Run signature process (will set `last_reviewer` field).
updater.destination = resource['destination']
updater.sign_and_update_destination(event.request,
source_attributes=new_collection,
previous_source_status=old_status)
if old_status == STATUS.SIGNED:
# When we refresh the signature, it is mainly in order to make sure that
# the latest signer certificate was used. When a preview collection
# is configured, we also want to refresh its signature.
if has_review_enabled:
updater.destination = resource['preview']
updater.sign_and_update_destination(event.request,
source_attributes=new_collection,
previous_source_status=old_status)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant