Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

work item attribute customization: call window.location from script

 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

0 votes



2 answers

Permanent link
 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

1 vote


Permanent link
 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?

0 votes

Comments

 umm - I don't think it's supported

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

Eric

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,019
× 7,495
× 57
× 35

Question asked: Oct 03 '14, 8:48 a.m.

Question was seen: 6,712 times

Last updated: Oct 09 '14, 5:27 a.m.

Confirmation Cancel Confirm