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

Handle external links + links to issues outside the project group #38

Open
marko-bekhta opened this issue Oct 29, 2024 · 7 comments
Open

Comments

@marko-bekhta
Copy link
Member

  • Issues can have "web links".
  • Issues that are linked to other Jira issues but the project of the linked issue is not in the "project group" (that is synced) may fail to sync as the project will not necessarily be present in the downstream Jira.
@yrodiere
Copy link
Member

Issues that are linked to other Jira issues but the project of the linked issue is not in the "project group" (that is synced) may fail to sync as the project will not necessarily be present in the downstream Jira.

Shouldn't the project group contain all projects from a given Jira instance then? I.e. we'd have a single group for hibernate.atlassian.net?

@marko-bekhta
Copy link
Member Author

I.e. we'd have a single group for hibernate.atlassian.net?

+1 yes that's the idea. I've noticed while syncing HV that there are links to BVAL, we've archived that project and we don't have a mirror on the RH side... so the link to a RH issue won't work here 😕. But we could try pointing back to the "original" ticket in such case.

@yrodiere
Copy link
Member

I've noticed while syncing HV that there are links to BVAL, we've archived that project and we don't have a mirror on the RH side... so the link to a RH issue won't work here 😕. But we could try pointing back to the "original" ticket in such case.

Or you can link to upstream BVAL from the RH side... since issues.redhat.com is configured to handle Jira issue links to hibernate.atlassian.net:

image

Actually you might want to do that for all projects, regardless of whether they are synced? IDK :D

@yrodiere
Copy link
Member

Makes me think that "upstream issue" links could also be handled as "cloned from" Jira issue links...

@marko-bekhta
Copy link
Member Author

Tested this a bit with https://issues.redhat.com/browse/HV-1561 :

image

all of these are actually handled as "remote links". The difference is whether we specify the "application" or not. if we have a jira configured(like Hibernate Jira) then we can pass the application object as part of the request to get it showing up as if it was a "jira link" and pick up the status/summary/icon upstream.

we can put any "issue-relationship" label we want there e.g. "does not relate to" 😄

Adding remote links upstream do not trigger web hook events 😖: https://jira.atlassian.com/browse/JRASERVER-32237?focusedId=764815&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-764815

I also confirmed that by testing on JIRATEST1 and looking for any events to be triggered 😕. BUT! 😃 if a web link is added a ticket is considered updated so a query like project = "JIRATEST1" and updated >= -1d ORDER BY updated DESC pics it up. If we'd want to sync the remote links we could do that by adding a cron that would go through recently updated tickets and fetch their remote links (they aren't returned as part of the issue response and have own endpoint ... )

Makes me think that "upstream issue" links could also be handled as "cloned from" Jira issue links...

since it's all remote links in the end... I can add the "application" object to the request so it shows up as if a jira-link if we want to have that. I'd keep the "Upstream issue" as a relation label so that if there are any "cloned from" links this one would still stand out from the list.

@yrodiere
Copy link
Member

Thanks for looking into it!

When you say remote link, you mean web links?

Anyway... Considering there's no real difference, I'd say do whatever you think makes sense / is simpler. I wouldn't say that syncing web links is top priority though :)

@marko-bekhta
Copy link
Member Author

marko-bekhta commented Oct 30, 2024

When you say remote link, you mean web links?

yes 😃. Jira calls them "remote" 😃 https://developer.atlassian.com/server/jira/platform/jira-rest-api-for-remote-issue-links/

I've tested the new link on https://issues.redhat.com/browse/HV-2060
Note if we push the change, already synced issues will get two links in the "Upstream issue" section (when they are updated upstream and an update is pushed to the downstream jira) since the globalId will be different and can't keep the old one if we want to show it as if it's a Jira link 🙈

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