How can we access the database-enumeration values using javascript?
I have some database-enumerations which I'm trying to set their values automatically based on other attribute or enumerations values. The problem is that the enumeration is stored in the database and I can't retrieve or set the values.
Below is a script that gets the selected value from one database-enumeration and return a specific value that should be set into another database-enumeration, but it's not working. Not sure if I should use another way to work with the database-enumerations.
dojo.provide("com.example.GrowthPlatformContractOwnershipAutoPopulationFromServiceLineContractOwnership");
dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes"); (function() { dojo.declare("com.example.GrowthPlatformContractOwnershipAutoPopulationFromServiceLineContractOwnership", null, { getValue: function(attributeId, workItem, configuration) { try { var serviceLineContractOwnership = workItem.getLabel("ContractOwnership_List"); switch (serviceLineContractOwnership) { case "ADM Innovation": return "CAI"; break; default: return "Please Select"; } } catch(err) { var txt; txt="There was an error on this page.\n\n"; txt+="Error description: " + err.message + "\n\n"; txt+="Click OK to continue.\n\n"; alert(txt); } } }); })(); |
Be the first one to answer this question!
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.