Skip to content

Update to remote-link title; use URL, set icon favicon url. #207

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

Merged
merged 4 commits into from
Aug 25, 2022

Conversation

bsieber-mozilla
Copy link
Contributor

@bsieber-mozilla bsieber-mozilla commented Aug 16, 2022

#202

After testing locally, this doesn't add the favicon--but is one step closer to what was previously expected.

The atlassian-python-api does not accept "icon" as part of the api, however if we use the Jira REST API, we should be able to add a link to a favicon.

@bsieber-mozilla bsieber-mozilla added the enhancement New feature or request label Aug 16, 2022
@bsieber-mozilla
Copy link
Contributor Author

@grahamalama do you think we should move forward with something like this?

(If so, we can look into modifying the atlassian-python-api to add the icon parameter internal to the remote-issue api call, or moving away from the atlassian-python-api to use the rest api and add the icon later.)

@grahamalama
Copy link
Contributor

grahamalama commented Aug 22, 2022

Yeah, since the client library doesn't support adding favicons and we're already adding some more context requested in #202 (i.e. Bugzilla Bug 1234567), maybe it's best to close this PR and instead:

  • "Eject" from atlassian-python-api in favor of our own, internal library
  • Submit a PR to atlassian-python-api to supporting remote link favicons in Jira.create_or_update_issue_remote_links

EDIT: it looks like atlassian-python-api exposes a Jira.post method. It seems that we could use this to make some function in the services module where we do:

jira.post(
    "<rest/api/3/issue/{issueIdOrKey}/remotelink>", 
    data={<link title, link URL, image title, image URL>}
)

@grahamalama
Copy link
Contributor

@bsieber-mozilla I ended up submitting atlassian-api/atlassian-python-api#1040 since it was a pretty straightforward change

@bsieber-mozilla bsieber-mozilla changed the title Update to remote-link title; just use URL. Update to remote-link title; use URL, set icon favicon url. Aug 24, 2022
@bsieber-mozilla
Copy link
Contributor Author

@grahamalama thanks for the addition; I've pointed to the new commit hash to pick those changes up.

@bsieber-mozilla bsieber-mozilla marked this pull request as ready for review August 24, 2022 23:43
@bsieber-mozilla bsieber-mozilla requested a review from a team as a code owner August 24, 2022 23:43
Copy link
Contributor

@grahamalama grahamalama left a comment

Choose a reason for hiding this comment

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

Do you want to set icon_title as well?

Also, could you create an issue to revert back to PyPI-released version of atlassian-python-api once that patch makes it into the next release?

@bsieber-mozilla
Copy link
Contributor Author

bsieber-mozilla commented Aug 25, 2022

Do you want to set icon_title as well?

When looking at the API and testing this adds a tooltip, but isn't essential (just like icon_link).

I'll add it in though

Also, could you create an issue to revert back to PyPI-released version of atlassian-python-api once that patch makes it into the next release?

Good callout.

Currently the toml is pointed to the previous commit when our team last updated the atlassian-python-api however, I did not see an issue already made.

Followup:
#221

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

Successfully merging this pull request may close these issues.

Change Jira's Bugzilla links to use the Bugzilla favicon and URL instead of a generic globe icon and "Bugzilla Ticket" title
2 participants