It's all about the answers!

Ask a question

work item attribute customization: call window.location from script


Milan Krivic (98010172140) | asked Oct 03 '14, 8:48 a.m.
 Hi,

is there possible to call some URL from JavaScript when calculating some values, or getting default values?

For example, I would like to call some URL when work item is created.

Is that possible?

Thanks,

Milan

2 answers



permanent link
Milan Krivic (98010172140) | answered Oct 09 '14, 5:01 a.m.
 Hi Eric,

I tried something like this:

dojo.provide("com.apisit.calc.greska.url");
dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes");
(function() {
var WorkItemAttributes = com.ibm.team.workitem.api.common.WorkItemAttributes;
    dojo.declare("com.apisit.calc.greska.url", null, {

    getValue: function(attribute, workItem, configuration) {
   
   
    var workFlowState = workItem.getValue(WorkItemAttributes.STATE);
   
    if(workFlowState==""){
    open_win();
   
    else
    {
    open_win();
    }
   
   
    function open_win()
    {
    window.open("http://www.google.hr", "_blank");
   

        }
    });
})();


but this doesn't work...
 I was looking at the post you sent me, but clearly I didn't find something like this...

Is this supported in anyway?

Comments
Eric Jodet commented Oct 09 '14, 5:27 a.m.
JAZZ DEVELOPER

 umm - I don't think it's supported

simply because some the scripts are run on the server side,

Eric


permanent link
Eric Jodet (6.3k5111120) | answered Oct 06 '14, 11:03 a.m.
JAZZ DEVELOPER
 Hello Milan,
this thread 
https://jazz.net/forum/questions/164172/calling-a-javascript-function-dojoajax-when-an-rtc-work-item-is-saved-in-a-certain-state?page=1&focusedAnswerId=164204#164204

contains useful links and information.

Hope it helps,
Eric

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.