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

SWC-7173 #5586

Merged
merged 2 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@
import static org.sagebionetworks.web.client.utils.FutureUtils.getFuture;
import static org.sagebionetworks.web.client.widget.entity.browse.EntityFilter.CONTAINER;
import static org.sagebionetworks.web.client.widget.entity.browse.EntityFilter.PROJECT;
import static org.sagebionetworks.web.shared.WebConstants.FLAG_ISSUE_COLLECTOR_URL;
import static org.sagebionetworks.web.shared.WebConstants.FLAG_ISSUE_DESCRIPTION_PART_1;
import static org.sagebionetworks.web.shared.WebConstants.FLAG_ISSUE_DESCRIPTION_PART_2;
import static org.sagebionetworks.web.shared.WebConstants.FLAG_ISSUE_PRIORITY;
import static org.sagebionetworks.web.shared.WebConstants.REVIEW_DATA_REQUEST_COMPONENT_ID;

import com.google.common.util.concurrent.FluentFuture;
import com.google.common.util.concurrent.FutureCallback;
Expand Down Expand Up @@ -712,34 +707,9 @@ private void configureReportViolation() {
actionMenu.setActionListener(
Action.REPORT_VIOLATION,
(action, event) -> {
// report abuse via Jira issue collector
String userId = WebConstants.ANONYMOUS, email =
WebConstants.ANONYMOUS, displayName = WebConstants.ANONYMOUS, synId =
entity.getId();
UserProfile userProfile =
authenticationController.getCurrentUserProfile();
if (userProfile != null) {
userId = userProfile.getOwnerId();
displayName = DisplayUtils.getDisplayName(userProfile);
email = DisplayUtils.getPrimaryEmail(userProfile);
}

ginInjector
.getSynapseJSNIUtils()
.showJiraIssueCollector(
"", // summary
FLAG_ISSUE_DESCRIPTION_PART_1 +
gwt.getCurrentURL() +
FLAG_ISSUE_DESCRIPTION_PART_2,
FLAG_ISSUE_COLLECTOR_URL,
userId,
displayName,
email,
synId, // Synapse data object ID
REVIEW_DATA_REQUEST_COMPONENT_ID,
null, // AR ID
FLAG_ISSUE_PRIORITY
);
popupUtils.openInNewWindow(
WebConstants.PRIVACY_SECURITY_COMPLIANCE_HELP_CENTER_URL
);
}
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ public class WebConstants {

public static final String DOCS_BASE_URL = "https://help.synapse.org/";
public static final String DOCS_URL = DOCS_BASE_URL + "docs/";
public static final String PRIVACY_SECURITY_COMPLIANCE_HELP_CENTER_URL =
"https://sagebionetworks.jira.com/servicedesk/customer/portal/20";
public static final String PROVENANCE_API_URL =
DOCS_URL + "Provenance.1972470373.html";
public static final String SHARING_SETTINGS_URL =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5330,20 +5330,9 @@ public void testReportViolation() {

// Call under test - invocation
actionListenerCaptor.getValue().onAction(Action.REPORT_VIOLATION, null);
verify(mockJsniUtils)
.showJiraIssueCollector(
"", // summary
FLAG_ISSUE_DESCRIPTION_PART_1 +
url +
WebConstants.FLAG_ISSUE_DESCRIPTION_PART_2, // description
FLAG_ISSUE_COLLECTOR_URL,
ownerId,
DisplayUtils.getDisplayName(firstName, lastName, username),
email,
entityId, // Synapse data object ID
REVIEW_DATA_REQUEST_COMPONENT_ID,
null, // Access requirement ID
FLAG_ISSUE_PRIORITY
verify(mockPopupUtils)
.openInNewWindow(
WebConstants.PRIVACY_SECURITY_COMPLIANCE_HELP_CENTER_URL
);
}
}