-
Notifications
You must be signed in to change notification settings - Fork 34
[OCPERT-108] Make advisory urls clickable in the test-report #525
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
base: oar-errata-release-flow
Are you sure you want to change the base?
[OCPERT-108] Make advisory urls clickable in the test-report #525
Conversation
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
oar/core/worksheet.py
Outdated
@@ -160,7 +160,7 @@ def update_advisory_info(self, ad): | |||
Args: | |||
ad (str): advisories of current release | |||
""" | |||
self._ws.update_acell(LABEL_ADVISORY, ad) | |||
self._to_hyperlink(self._ws.update_acell(LABEL_ADVISORY, ad)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it create hyperlink to all advisories or just one hyperlink?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we want to add links for all the advisories in this cell, this method does not work. =HYPERLINK
does not support multiple links in one cell. we need to use userEnteredValue
in batch update request.
xref: https://stackoverflow.com/questions/77310503/how-to-add-multiple-hyperlinks-in-a-single-cell-in-google-sheets-using-python
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
I found the same:
- Adding hyperlinks by formula is limited to only one.
- Multiple links can be added manually by
Ctrl/Cmd + K
or by the api script.
fb5482f
to
5057c95
Compare
5057c95
to
79d5b5b
Compare
@@ -94,7 +94,8 @@ def create_test_report(self): | |||
# update advisory info | |||
ad_cell_value = "" | |||
for k, v in self._cs.get_advisories().items(): | |||
ad_cell_value += f"{k}: {util.get_advisory_link(v)}\n" | |||
ad_link = {util.get_advisory_link(v)} | |||
ad_cell_value += f"{k}: {self._report._to_hyperlink(ad_link, ad_link)}\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Multiple =HYPERLINK
in the same cell does not work as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You will need to use a different solution. See suggestions in #525 (comment).
The same applies also to master branch. See #524 (comment)
The changes were already merged to master with #524 and need to be fixed. |
it's not an issue on master, only one MR will be updated to the cell |
Hello @rioliu-rh , the values are possible. If the amount of merge-requests changes, there will be a problem. The code worksheet.py#L95 suggest that more merge-requests are expected. We should cover the scenario to avoid potential bugs. |
JIRA: https://issues.redhat.com/browse/OCPERT-108
Could you please take a look?