It's all about the answers!

Ask a question

[closed] What is wrong with my JavaScript condition?


Gowra chandra varma (11136) | asked Jun 27 '12, 9:08 a.m.
closed Nov 05 '15, 2:25 a.m. by Ralph Schoon (63.1k33646)
Thanks for your response ! It's working fine with my requirement.

I have another query regarding read-only attributes condition. I created enumeration with name release_for (ID showing as "release") with values national,state and district. only when i select "national " (with ID "release_for.literal.l2") the dependent attributes will go read-only. I am using this script, but unable to achieve the goal.

Pls help me out with the script
***********************************************************************************
dojo.provide("org.example.workitems.providers.fundRelease");

dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes");

(function() {

var WorkItemAttributes= com.ibm.team.workitem.api.common.WorkItemAttributes;

dojo.declare("org.example.workitems.providers.fundRelease", null, {

    matches: function(attributeId, workItem, configuration) {

console.log("release");
        var release = workItem.getValue(WorkItemAttributes.RELEASE_FOR);
        console.log(release);
       
     if (release === "release_for.literal.l2")
       { console.log(result);
        return true ; }
    else
           {
              return false; }
}
});
})();

**************************************************************************************

Thank you
Varma K

Comments
Ralph Schoon commented Nov 04 '15, 10:07 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Please open new questions instead of adding more and more in threads that are already answered. Please alos accept answers that are correct and solve the problem.


Donald Nong commented Nov 05 '15, 12:20 a.m.

The post appears to be more than 3 years old. Note sure whether the user is still waiting for an answer. :-)


Ralph Schoon commented Nov 05 '15, 2:25 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Did not realize that. Will close it. I wonder why I got an e-mail notification in the first place.

The question has been closed for the following reason: "Problem is not reproducible or outdated" by rschoon Nov 05 '15, 2:25 a.m.