-
Notifications
You must be signed in to change notification settings - Fork 5
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
Fixed issue #172 #182
Fixed issue #172 #182
Conversation
…gin-servicenow into MI-2984
[MI-2984] Fix issue mattermost#172
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #182 +/- ##
==========================================
+ Coverage 65.22% 66.79% +1.57%
==========================================
Files 16 16
Lines 1990 2027 +37
==========================================
+ Hits 1298 1354 +56
+ Misses 653 633 -20
- Partials 39 40 +1
☔ View full report in Codecov by Sentry. |
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.
Thanks for your work @ayusht2810
here I write some minor things I noticed from a first review:
- distance between buttons/labels in modal seems too small
-
add comments modal has cta button enabled before adding context inside the textarea (update state is correct)
-
Update-State modal raises in multiple devices at the same time, not only on the window that was triggered (it doesn't happen with the create incident modal)
Additionally I get I could understand that I lack permissions for subscriptions, but should they apply to create-incident? if so, should it apply for create incident from post dialog too? |
@trilopin regarding point |
[MI-3071] Fix review fixes for issue 172 of importing incident featur…
@trilopin fixed the review fixes |
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.
Just a handful of comments, but nothing blocking.
@@ -270,9 +270,13 @@ func (c *client) GetMe(userEmail string) (*serializer.ServiceNowUser, int, error | |||
} | |||
|
|||
func (c *client) CreateIncident(incident *serializer.IncidentPayload) (*serializer.IncidentResponse, int, error) { | |||
queryParams := url.Values{ | |||
constants.SysQueryParamDisplayValue: {"true"}, |
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.
Can you clarify what this does?
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.
this query param helps in retrieving the display values instead of their IDs for the fields
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.
Just a few non-blocking comments
onClick={handleClick} | ||
> | ||
<img | ||
src={`${Utils.getBaseUrls().publicFilesUrl}${Constants.SERVICENOW_ICON_URL}`} |
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.
We'll want to make sure we take into account the server's Site URL when contacting the plugin via HTTP. At the moment we are just parsing the browser's URL:
mattermost-plugin-servicenow/webapp/src/utils/index.tsx
Lines 18 to 23 in fefb220
const url = new URL(window.location.href); | |
const baseUrl = `${url.protocol}//${url.host}`; | |
const pluginUrl = `${baseUrl}/plugins/${pluginId}`; | |
const pluginApiBaseUrl = `${pluginUrl}/api/v1`; | |
const mattermostApiBaseUrl = `${baseUrl}/api/v4`; | |
const publicFilesUrl = `${pluginUrl}/public/`; |
HI @ayusht2810 I do have a coupe questions with the business logic on the "caller" field. From what I can tell...
If so...
|
…cident in the same channel in which it was created instead of bot dm
…sers (#58) * [MI-3182] Fix issue: ServiceNow icon not visible in app bar for new users * [MI-3182] Self review fix * [MI-3182] Review fix Co-authored-by: Manoj Malik <manoj@brightscout.com> --------- Co-authored-by: Manoj Malik <manoj@brightscout.com>
@DHaussermann The icon issue should be fixed now. Can you please confirm? |
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.
Tested and passed
Icon and all other know issues are now resolved.
LGTM!
@raghavaggarwal2308 Thanks for the effort on this. I have 2 related questions that do no block the PR.
|
|
|
@raghavaggarwal2308 sorry I missed the at mention for you ☝️ |
@DHaussermann The icon will be visible in the channel header when the app bar is disabled but the icon color will be changed. Please check the below screenshots. Let me know if you are unable to see the icon. |
@raghavaggarwal2308 Sorry. I was confused. For some unrelated reason the state of the app bar is not showing in my system console. In my screen above I thought the icon was somehow forcing the app bar on because the other 2 plugins are in the header. Yes, SN plugin works as expected and moves to the channel header when needed. I believe we can merge this now. |
@raghavaggarwal2308 please ping mw once we have this merged and packaged into a release for release testing. Is there unresolved code review conversations still to sort out? |
@mickmister Can you please merge this PR if nothing is pending? |
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 gave the PR another review. In general looks good 👍 Just a few comments for discussion
webapp/src/containers/createIncident/subscribeToNewIncident.tsx
Outdated
Show resolved
Hide resolved
webapp/src/containers/createIncident/subscribeToNewIncident.tsx
Outdated
Show resolved
Hide resolved
…cident modal) (#59) * [MI-3273] Rview fixes on ServiceNow PR mattermost#182 (Add create incident modal) * [MI-3273] Review fix * [MI-3273] Added logic to get the MM site URL from redux and pass it into getBaseUrl function * [MI-3273] Fix ci * [MI-3273] Review fix * [MI-3273] Fix failing testcases * [MI-3273] Review fixes
@mickmister FIxed the review comments mentioned by you |
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.
LGTM, just some thoughts for improvement
// eslint-disable-next-line import/no-unresolved | ||
import {BaseQueryApi} from '@reduxjs/toolkit/dist/query/baseQueryTypes'; |
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.
Is this type still useful if the import can't be resolved?
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.
@mickmister Yes, it's useful, we are using it as the type of parameter in handleBaseQuery
function.
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.
But if it can't be resolved, how does it work? Is it the case that your editor can resolve it, but for whatever reason resolver being used by eslint cannot find it?
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.
@mickmister Yes, it is being resolved by the editor but not by eslint.
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 wonder why that's the case. I would prefer we didn't have to do this, but it's pretty negligible in this case
@mickmister Fixed the review comments mentioned by you |
Merging due to @DHaussermann's approval above |
Summary
Screenshots
Ticket Link
Fixes #172