Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scene Inventory: Action to update to latest approved version #690

Merged

Conversation

iLLiCiTiT
Copy link
Member

@iLLiCiTiT iLLiCiTiT commented Jun 24, 2024

Changelog Description

Scene inventory tool now can update to latest approved version.

Additional info

This is a proposal how it could be implemented, we still need to modify validator which checks versions of loaded containers. The latest approved version is determined by Status "state" which has 4 options "not_started", "in_progress", "done" and "blocked. We use "done".

Function get_outdated_containers now does not mark last approved as outdated > not sure if this is an issue or enhancement? Reverted

Testing notes:

  1. Scene inventory should be able to load latest approved version.

@ynbot
Copy link
Contributor

ynbot commented Jun 24, 2024

@ynbot ynbot added size/S type: feature Adding something new and exciting to the product labels Jun 24, 2024
return cls(
version_id=version_entity["id"],
product_id=version_entity["productId"],
version=version_entity["version"],
status=version_entity["status"],
is_latest=is_latest,
is_last_approved=is_last_approved,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it odd that we call the state done but here refer to it as approved. Should we rename this is_last_done?
Admittedly, that's a confusing name - but at least it's referring to the same thing. Or, we refactor the status name from done to approved so it matches with this?

Copy link
Member Author

@iLLiCiTiT iLLiCiTiT Jun 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should really care about last approved, how the value is filled might change in future.

NOTE: We had a long discussion about how to define "last approved" (or just "approved") and came to conclusion that it might change in future with more specific settings.

client/ayon_core/tools/common_models/projects.py Outdated Show resolved Hide resolved
@m-u-r-p-h-y m-u-r-p-h-y self-assigned this Jun 24, 2024
@m-u-r-p-h-y m-u-r-p-h-y added the sponsored This is directly sponsored by a client or community member label Jun 24, 2024
Copy link
Member

@m-u-r-p-h-y m-u-r-p-h-y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

correctly offers Updated to last approved only for outdated items and loads the highest approved version

@BigRoy
Copy link
Collaborator

BigRoy commented Jun 24, 2024

I like it - but now I start to definitely want to have a "set default status on publish" (settings) and "choose publish status in publisher" (publisher attribute per instance) implementations 🗡️

@iLLiCiTiT iLLiCiTiT force-pushed the feature/AY-5635_Action-to-update-to-latest-approved-version branch from 8864b06 to 403442b Compare June 25, 2024 09:36
@iLLiCiTiT iLLiCiTiT merged commit e76ad2f into develop Jun 25, 2024
1 check passed
@iLLiCiTiT iLLiCiTiT deleted the feature/AY-5635_Action-to-update-to-latest-approved-version branch June 25, 2024 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/S sponsored This is directly sponsored by a client or community member type: feature Adding something new and exciting to the product
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants