Change status when publishing

Is there an option that when an artist publishes a version we can automatically change the status of the asset to for example “ready to review”
When saving a workfile to “in progress”

Especially now with Ayon get slowly more functionality for project management would that be a massive big plus.

And while we’re ad it with project management, is there an option to force artist to write a comment to there publish?

1 Like

Is there an option that when an artist publishes a version we can automatically change the status of the asset to for example “ready to review”

Think you can make a Pyblish plugin to handle this?

When saving a workfile to “in progress”

Depending on the DCC you are using, you could hook into the saving callbacks either in the DCC or in the Workfiles app.

And while we’re ad it with project management, is there an option to force artist to write a comment to there publish?

Dont think so, but will leave to @mustafa_jafar to investigate.

1 Like

The more I read you post, I think you are describing something similar to this Kitsu plugin. it leverage Kitsu’s API to update task status, add automated commenting with custom comment template.

I think it’s possible to have Integrate AYON Note plugin as Toke mentioned above.

For reference, AYON’s API provides update “status” on updating task.
https://ayon.ynput.io/api#tag/Tasks/operation/update_task

As far as I know, you can create a validator that raise a PublishValidationError
if no comment found.

Here are some examples (I didn’t try them):
It can be a context plugin

class ValidatePublishComment(pyblish.api.ContextPlugin,
                             OptionalPyblishPluginMixin):
    """ValidatePublishComment."""

    order = pyblish.api.ValidatorOrder 
    label = "Validate File Saved"
    optional = False

    def process(self, context):
        if not self.is_active(context.data):
            return

        if not context.data.get("comment"):
            self.log.error("Please Provide a comment!")
            raise PublishValidationError(
                "Publish comment was not found!",
                title=self.label
            )

It can be an instance plugin.
Instances can have their comment but as far as I know, artists can’t access/modify instances’ comments.
So, you may stick to context comment.

class ValidatePublishComment(pyblish.api.InstancePlugin,
                             OptionalPyblishPluginMixin):
    """ValidatePublishComment."""

    order = pyblish.api.ValidatorOrder 
    label = "Validate File Saved"
    optional = False

    def process(self, instance):
        if not self.is_active(isntnace.data):
            return

        instance_comment = instance.data.get("comment")
        context_comment = instance.context.data.get("comment")

        if not context_comment:
            self.log.error("Please Provide a comment!")
            raise PublishValidationError(
                "Publish comment was not found!",
                title=self.label
            )

Thanks.

Indeed the kitsu looks like something i would like to have in Ayon, but without Kitsu :wink:
Status conditions would be an incredibly useful addition to Ayon.

Just want to add that from a UX point of view the “Comment” requirement should really be done BEFORE starting the publisher and may need to be something that is part of the UX in the Publisher UI itself. You’d really want to notify the artist directly before they are to click publish instead of during validation. It’s just too late.

So yes, it can be done during validation but definitely isn’t the nicest way from a UX perspective to the artists. I vaguely recall there being a way in Pyblish QML to force requiring a minimum comment length to allow publishing. Not sure if that’s something that exists in AYON’s publisher, @iLLiCiT ?

2 Likes

There is nothing like requirement for comment at this moment, most of publishes are without comment.

I would say that the main issue is requirement for a comment when a review should be integrated. Don’t know kitsu api, but I guess there is a way how to integrate “empty” comment with just reviewable?

As far as I know, Kitsu doesn’t require a comment. I have many publishes with empty comments.


I think if a comment is required, then we can have a default fallback comment template that can be formatted using instance data.

I would say that the issue is that integration of reviewable does require existing kitsu comment, which can be bypassed with creating new comment.