[RTC] Is there a way to create a setValue scritpt for a contributor list?
Is there a way to create a setValue scritpt for a contributor list?
I want to narrow down to logged-in user as selection candidates
This script does not change the list
===============================================================
dojo.provide("com.panasonic.jp.workitem.scripts.common.contributor_mine");
dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes");
dojo.require("com.ibm.team.repository.web.client.session.Session");
(function() {
var WorkItemAttributes= com.ibm.team.workitem.api.common.WorkItemAttributes;
var getAuthenticatedContributor = com.ibm.team.repository.web.client.session.getAuthenticatedContributor;
dojo.declare("com.panasonic.jp.workitem.scripts.common.contributor_mine", null, {
getValueSet: function(attributeId, workItem, configuration) {
var loggedInUser = [];
loggedInUser.push(getAuthenticatedContributor().itemId); //user's uuid
return loggedInUser;
}
});
})();
===================================================================
One answer
See here:
Creating a Java-based value provider takes more work but is more powerful. Be sure to check the bottom of this wiki, which has some helpful hints. See "Providing new customizations implemented in Java"
https://jazz.net/wiki/bin/view/Main/AttributeCustomization#Value_sets
Mr Schoon also has great examples of this kind of customization, which helped me to create a working Java based attribute customization.
https://rsjazz.wordpress.com/2013/06/26/attribute-customization-java-based-value-providers-conditions-and-validators/
Comments
1 vote
1 vote