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

Editing comment on Jira does not update Shotgun note. #38

Open
ricekab opened this issue May 27, 2020 · 2 comments
Open

Editing comment on Jira does not update Shotgun note. #38

ricekab opened this issue May 27, 2020 · 2 comments

Comments

@ricekab
Copy link

ricekab commented May 27, 2020

The update for a synced comment does not propagate to Shotgun correctly. The reason for this being that the body is malformed based on the sg-jira-bridge's expectation.

This error is not one of the known issues (in fact, it specifically mentions it should be supported):

Shotgun Notes contain a subject and content, while Jira Comments have only a body. When syncing Notes from Shotgun to Jira, a special formatting is used to mimic the structure that Shotgun uses. Updates to a Comment in Jira must retain this formatting otherwise the Comment will not sync back to Shotgun.

Source documentation.

The issue becomes apparent if you compare the regex in source compared to what message comes in. The webapp gives the following warning:

2020-05-27 15:07:40,015 WARNING [note_comment_handler] Unable to process Jira Comment comment_updated event. Invalid Jira Comment body format. Unable to parse Shotgun subject and content from '{panel:bgColor=#deebff}
Kevin Chi Yan's Note on TestAsset

Testing out Shotgun comment replies / edits from Jira.

Edit from Jira (Try 2)
{panel}'

The regex that the handler is comparing to is r"\{panel:title=([^\}]*)\}(.*)\{panel\}" which makes sense since it's posted with the title as well. I guess in some update Jira now converts the title attribute into the bold markup above. (See: https://github.com/shotgunsoftware/sg-jira-bridge/blob/master/sg_jira/handlers/note_comment_handler.py#L95)

What I'm not sure of is if this is only a problem in certain versions (or certain settings within Jira?)

@KKSzymanowski
Copy link

I have the exact same issue. When I switch to the old view I can edit the title and the body separately but not in the old view.

Have you figured it out by any chance?

@ricekab
Copy link
Author

ricekab commented Jan 18, 2022

A late reply but maybe it could still help someone else - we modified the regex internally to match the structure that Jira gives. It's not 100% on point, but generally gets the job done.

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

No branches or pull requests

2 participants