annotation key was missed

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/gcube-ckan-datacatalog@139889 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2016-12-10 12:33:47 +00:00
parent 81174435c0
commit ca4f796b72
1 changed files with 6 additions and 3 deletions

View File

@ -208,16 +208,18 @@ public class GRSFNotificationService {
// add the new one and the annotation message
JSONObject newStatus = new JSONObject();
newStatus.put(STATUS_CUSTOM_FIELD_KEY, bean.getNewStatus().toString());
newStatus.put("key", STATUS_CUSTOM_FIELD_KEY);
newStatus.put("value", bean.getNewStatus().toString());
customFieldsAsJson.add(newStatus);
JSONObject newAnnotation = new JSONObject();
newAnnotation.put(ANNOTATION_KEY, Arrays.asList("date: " + DATE_FORMAT.format(new Date())
newAnnotation.put("key", ANNOTATION_KEY);
newAnnotation.put("value", "date: " + DATE_FORMAT.format(new Date())
+ ", admin: " + new LiferayUserManager().getUserByUsername(username).getFullname()
+ ", message: " + (bean.getAnnotation() != null ? bean.getAnnotation().replaceAll("\"", "") : "none")
+ ", old status: " + bean.getCurrentStatus().toString()
+ ", new status: " + bean.getNewStatus().toString()
));
);
customFieldsAsJson.add(newAnnotation);
// manage the tags
@ -238,6 +240,7 @@ public class GRSFNotificationService {
// add the new one
JSONObject newTag = new JSONObject();
newTag.put("name", bean.getNewStatus().toString());
newTag.put("display_name", bean.getNewStatus().toString());
tagsAsJson.add(newTag);
// manage the groups