Difference between revisions of "Questionnaire getCountQASs"
(jrfconvert import) |
Cg huyphong (talk | contribs) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | [[Category: | + | [[Category:Questionnaire_Functions]] |
− | + | {{HelpFiles}} | |
====Questionnaire_getCountQASs==== | ====Questionnaire_getCountQASs==== | ||
Line 18: | Line 18: | ||
– includeTest: Are the test QASs counted? | – includeTest: Are the test QASs counted? | ||
− | – completed: | + | – completed (optional): Just count on the completed QASs counted or not. DDefault filter is to get all the RPQs regardless of its complete status |
− | – status: the status of QASs. | + | – status (optional): the status of QASs. Default filter is to get all the RPQs regardless of its status |
− | – startPeriod and endPeriod: the period that those QASs is completed (QAS's end_date) | + | – startPeriod and endPeriod: the period that those QASs is completed (QAS's end_date). Default filter is to get all the RPQs regardless of its end date |
'''Return type''' | '''Return type''' | ||
Line 30: | Line 30: | ||
'''Example''' | '''Example''' | ||
− | array end = getCurrentDateTime() | + | array end = getCurrentDateTime(); |
− | + | array start = {2005,6,15,0,0,0,0,33,40}; | |
− | With :false : Not include testtrue : rpq completed1 : rpq status normal | + | number a = Questionnaire_getCountQASs(654321,123456,false,true,1,start,end); |
+ | |||
+ | print(a); // 34 | ||
+ | |||
+ | With : | ||
+ | |||
+ | false : Not include testtrue : rpq completed1 : rpq status normal | ||
'''Note''' | '''Note''' |
Latest revision as of 04:49, 3 January 2012
Questionnaire_getCountQASs
- This script is used to get the number of QASs which belong to a specific group of a specific questionnaire
Syntax
number Questionnaire_getCountQASs(number projectQuestionnaireResourceId, number groupResourceId, bool includeTest [,bool completed] [, number status][, array startPeriod, array endPeriod])
Arguments
– projectQuestionnaireResourceId: the project questionnaire resource id
– groupResouceId: the group resource id, this parameter is required but I can use the constant called GROUP_RESOURCE_ID_ANY (value = -1) in case I have no group is used.
– includeTest: Are the test QASs counted?
– completed (optional): Just count on the completed QASs counted or not. DDefault filter is to get all the RPQs regardless of its complete status
– status (optional): the status of QASs. Default filter is to get all the RPQs regardless of its status
– startPeriod and endPeriod: the period that those QASs is completed (QAS's end_date). Default filter is to get all the RPQs regardless of its end date
Return type
Number
Example
array end = getCurrentDateTime();
array start = {2005,6,15,0,0,0,0,33,40};
number a = Questionnaire_getCountQASs(654321,123456,false,true,1,start,end);
print(a); // 34
With :
false : Not include testtrue : rpq completed1 : rpq status normal
Note
If the completed parameter was false, then the startPeriod and endPeriod parameters will be ignored.
Availability
Version 5.8