Fetching jira r


#1

Hi,

Is there somebody who can tell me why this code is not working? I am trying to activate a daily workflow that fetches from all the projects the aggregated hours total. I wrote a script on my server to do that, but it looks like the delay in serving the results is triggering a null result in Ragic.

If i do a single project with a entry id (function test(id) then it works fine.

Any suggestions?

// filter jira list
 	var query = db.getAPIQuery("/project-management/1");

    // fetch results
	var results = query.getAPIResultList();
	
  
  
	for (var i = 0; i < results.length; i++) {
      	var res = 0.00;
		response.setMessage( results[i]);
        var entry = results[i];
        var field1 = entry.getFieldValue('1000071'); // project key
      
      	if(field1){
      
  		var res = util.getURL("http://someurl/ragic/jira/NC-jira.php?projectID="+field1);
    	response.setMessage(">> "+res);
        

        entry.setFieldValue('1000150', res);
        entry.save();      
        }
    }  
}

#2

Currently there’s a quota of 5 calls per script execution, the first 5 calls should work.


#3

Hi Jeff,

Will this limitation also apply to any Javascript that I write?
It seems like a 5-call quota might be quite limiting and I’m wondering if it is a common occurrence that this causes problems for Ragic clients?

Kind regards,
Andy


#4

Yes, this is applied to all Javascript calls, including daily workflow. We have not heard that this causes any problem with other clients, but we will be able to adjust the quota according to different user use cases.


#5

Thank you Jeff - that’s reassuring
Andy :slight_smile: