Skip to content
This repository has been archived by the owner on Jul 25, 2018. It is now read-only.

feat(ui): added custom role map to project, component and release #371

Merged
merged 2 commits into from May 10, 2017

Conversation

maxhbr
Copy link
Member

@maxhbr maxhbr commented Apr 13, 2017

This PR adds the following features:

  • displayed in details-view (as mailto-link) and edit view
  • keys can be configured in sw360-portlet: sw360.properties
  • edit-view: user can choose key out of drop down list and must enter valid email address per row
  • Moderation request generation for role-property
  • Diff display of properties of type map of set to set of strings
  • merge for properties of type map of set to set of strings

@@ -138,6 +149,38 @@ protected void dealWithStringMap(U field) {
}
}

protected void dealWithCustomMap(U field) {
Map<String,Set<String>> updateDocumentMap = (Map<String, Set<String>>) updateDocument.getFieldValue(field);
if(updateDocumentMap == null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This begs to be a call to CommonUtils.nullToEmptyMap(), doesn't it?
Same for actualDocumentMap.

@@ -0,0 +1,78 @@
/*
* Copyright (c) Bosch Software Innovations GmbH 2016.
Copy link
Contributor

Choose a reason for hiding this comment

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

You may want to extend copyright to year 2017. (Also applies to the two new jsp/jspf files.)

Copy link
Member Author

Choose a reason for hiding this comment

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

This code was created 2016.

@@ -145,8 +146,6 @@ else if (field == Release._Fields.MAINLINE_STATE)
return getMainlineStatefromString(value);
else if (field == Project._Fields.STATE)
return getProjectStateFromString(value);
else if (field == Project._Fields.CLEARING_STATE)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did you remove this?

Copy link
Member Author

Choose a reason for hiding this comment

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

You are right. This looks wrong.

Copy link
Contributor

@alexbrdn alexbrdn left a comment

Choose a reason for hiding this comment

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

Code looks good

@@ -332,6 +340,9 @@
PROJECT_TYPE = props.getProperty("project.type","[ \"Customer Project\", \"Internal Project\", \"Product\", \"Service\"]");
LICENSE_IDENTIFIERS = props.getProperty("license.identifiers", "[]");
COMPONENT_CATEGORIES = props.getProperty("component.categories", "[ \"framework\", \"SDK\", \"big-data\", \"build-management\", \"cloud\", \"content\", \"database\", \"graphics\", \"http\", \"javaee\", \"library\", \"mail\", \"mobile\", \"security\", \"testing\", \"virtual-machine\", \"web-framework\", \"xml\"]");
PROJECT_ROLES = props.getProperty("custommap.project.roles", "[ \"pre-sales consultant\", \"primary contact\"]");
Copy link
Contributor

@mcjaeger mcjaeger May 8, 2017

Choose a reason for hiding this comment

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

Hi, two suggestions: a) how about starting each role name with capital letter (as with the usual field labels, and b) is pre-sales consultant an intended role here? (just googleling for common project roles) and what would be primary contact (apart from project manager or responsible), how about- from googleling for common project roles, in case the Pre sales consultant was not on purpose.:

Stakeholder
Analyst
Contributor
Accountant
End user
Quality manager
Test manager
Technical writer
Key user

heydenreich and others added 2 commits May 10, 2017 15:22
* displayed in details-view (as mailto-link) and edit view
* keys can be configured in sw360-portlet: sw360.properties
* edit-view: user can choose key out of drop down list and must enter valid email address per row
* Moderation request generation for role-property
* Diff display of properties of type map of set to set of strings
* merge for properties of type map of set to set of strings

Signed-off-by: Maximilian Huber <external.maximilian.huber2@bosch-si.com>
@maxhbr
Copy link
Member Author

maxhbr commented May 10, 2017

@alex-evo @mcjaeger: the roles are now updated and the branch is rebased.

@mcjaeger mcjaeger merged commit a37363b into sw360:master May 10, 2017
@mcjaeger
Copy link
Contributor

not so important: actually sw360.properties with old values overwrites default values!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants