Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

General: missing comment on standalone and tray publisher #4303

Merged

Conversation

kalisp
Copy link
Member

@kalisp kalisp commented Jan 10, 2023

Brief description

Comment might have not been collected when inserted only after collection phase which resulted in not sending comment to Ftrack.

Additional info

Clean-up of comment and using only comments on instances is good step, but as far as we are still using old Pyblish, context comment should be kept as a fallback (comment might be filled after collection phase, in this case it is present only on context level. Eg. artists knows/sees that it is filled, but integrator prints it is not there. Another approach would be to disable comments field after publish is started, but I didn't want to mess with Pyblish.)

Comment field in Publisher is controlled by project_settings/global/publish/collect_comment_per_instance. To show comment field this should be set:
2023-01-10 17_47_24-CollectInstanceCommentDef

Testing notes:

  1. publish anything in Standalone Publisher, fill comment only after collecting phase
  2. check Integrate Ftrack note and Ftrack for presence of comment
  3. (btw default note template expects both intent and comment, skipping intent is quite easy in SP, in Publisher field for it is missing completely, imho)

Check for context must be preserved until old Pyblish is completely eradicated as comment could be filled after collection phase, therefore not caught by collector.
Printing what is actually missing is more helpful than only full data.
@kalisp kalisp added type: bug Something isn't working sponsored Client endorsed or requested labels Jan 10, 2023
@kalisp kalisp self-assigned this Jan 10, 2023
@@ -45,7 +45,8 @@ def process(self, instance):
host_name = context.data["hostName"]
app_name = context.data["appName"]
app_label = context.data["appLabel"]
comment = instance.data["comment"]
# context comment is fallback until old Pyblish is removed
comment = instance.data["comment"] or context.data.get("comment")
Copy link
Member

@iLLiCiTiT iLLiCiTiT Jan 10, 2023

Choose a reason for hiding this comment

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

This is duplicate of what happens here https://github.com/ynput/OpenPype/blob/develop/openpype/plugins/publish/collect_comment.py#L99

The "comment" should be always filled. Maybe only if instance is created after the collector?

Pyblish allows modifying comment after collect phase, eg. collector wouldn't collect it.
Should be pushed back to Collect phase after Pyblish is eradicated.
Availability of comment on instance has been resolved by bumping up order of CollectComment.
@jakubjezek001
Copy link
Member

@kalisp
Copy link
Member Author

kalisp commented Jan 11, 2023

Pushed collector to Extract phase because of Pyblish.

Marked with TODO, should be refactored when Pyblish is gone.

@kalisp kalisp requested a review from iLLiCiTiT January 11, 2023 15:21
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.

tested Tray publisher

image

@m-u-r-p-h-y
Copy link
Member

there is just a slight inconsistency in terminology.

There are three terms used and it may be a bit confusing.

We are writing a Comment, integrating a Note but publishing a Description

@kalisp kalisp merged commit 554c72c into develop Jan 12, 2023
@kalisp kalisp deleted the bugfix/OP-4679_Issue-Comment-on-Standalone-and-tray-Publisher branch January 12, 2023 09:15
@github-actions github-actions bot added this to the next-patch milestone Jan 12, 2023
@jakubjezek001 jakubjezek001 modified the milestones: next-patch, 3.15.0 Jan 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
sponsored Client endorsed or requested type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants