It's all about the answers!

Ask a question

coditional script is working in V3 and same script is not working on RTC v4.


mrp singer (1021315) | asked Feb 22 '13, 9:59 a.m.

Hi Team

Finally, come to this stage and waiting for suggestion / help / information.
I have RTC v3, having script based condition is working and same script is not working  for same scenario. Based on enumeration value specific attribute is going to be mandatory.
Pls find the sample script
-----------------------------------------------------------------------
dojo.provide("org.example.workitems.providers.play");
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.play", null, {
   matches: function(workItem, configuration) {
       var witype = workItem.getValue(WorkItemAttributes.TYPE);
      var wipriority= workItem.getValue(WorkItemAttributes.PRIORITY);
    if (witype === "com.ibm.workitem.workItemType.Task") {
  if (wipriority === "priority.literal.l4") {
     // Priority is High
            return true;
         } else {
            return false;
         }
      } else {
         return false;
      }
   }
});
})();
----------------------------------------------------------------
all neccessary steps has been followed and enable to run script on the v4 Server. Do i need to use specific syntax for v4 in .js file? Kindly lemme know , if you anybody come across this kind of behavior.

Many thanks
MRP

One answer



permanent link
Ralph Schoon (63.1k33646) | answered Feb 22 '13, 10:41 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
 Hi MRP, can you be more specific on what is not working? Are there any hints in the logs? For mor information about logs and debugging please look into https://jazz.net/library/article/1093 lab 5 there are example scripts. 

Comments
Ralph Schoon commented Feb 22 '13, 10:44 a.m. | edited Feb 22 '13, 10:58 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

One thing that comes into mind is missing dependencies to the required attributes. 

Your answer


Register or to post your answer.


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.