Calculated Value for attributes with contributor type
I should to calculate the Owner By field .
I have developed the calculated value that returns Creator as icontributor .
I can see my Calculated Value on attribute definition screen like option of drop down of Calculate value for attributes that have been defined as contributors .
I define the dependency from Filed Against attribute .
When I set my Calculated value to custom contributor attribute it gets the name of creator by the moment the Filed Against attribute has been changed , but after the save process the value of the custom contributor attribute becomes to be "Unidentified" .
If I set my Calculated value to Owned By attribute with the same dependency it also gets the right value before saving , but on save process I get the next error : "Error running operation 'Saving Work Item'
java.lang.NullPointerException
java.lang.NullPointerException"
Please advice .
I have developed the calculated value that returns Creator as icontributor .
I can see my Calculated Value on attribute definition screen like option of drop down of Calculate value for attributes that have been defined as contributors .
I define the dependency from Filed Against attribute .
When I set my Calculated value to custom contributor attribute it gets the name of creator by the moment the Filed Against attribute has been changed , but after the save process the value of the custom contributor attribute becomes to be "Unidentified" .
If I set my Calculated value to Owned By attribute with the same dependency it also gets the right value before saving , but on save process I get the next error : "Error running operation 'Saving Work Item'
java.lang.NullPointerException
java.lang.NullPointerException"
Please advice .
Accepted answer
As answered before, there is no real good way to do that in JavaScript, because you can't get at the information at all. You can only put in the user UUID's into the configuration or hard code it in the script.
The only way to implement this is using Java based providers: https://rsjazz.wordpress.com/2013/06/26/attribute-customization-java-based-value-providers-conditions-and-validators/
Or using a follow up action/participant.
The only way to implement this is using Java based providers: https://rsjazz.wordpress.com/2013/06/26/attribute-customization-java-based-value-providers-conditions-and-validators/
Or using a follow up action/participant.
Comments
RaIph a lot of thanks for your reply .
How can I get the user UUID's ?
See the spy tool in Process Enactment Workshop for the Rational solution for Collaborative Lifecycle Management Lab 5 to print them.
If you understand how the UUID looks like, you can likely get it from the URL to a user profile.