Hi All,
We have a requirement like
When a User Story enters state 'X' , all sub-tasks (defect) associated with the User Story should be automatically moved to state 'x' if the conditions "Cause" = "Performance" or "PA value" > 0 are satisfied. Where 'Cause' and 'PA value' are custom fields associated to defect.
Kindly let us know how to achieve this. Hope to hear from you soon.
Thanks in Advance,
Venkat
Or script runner... there is loads of sample code that does what you want.
yeah, plus look at the built-in scripts, plus lots of code here in AAC.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI venkat,
you can also do it using Java Script.Here's the code,
jQuery(document).ready(function($) {
JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e,context) {
checkCondition();
});
checkCondition();
function checkCondition(){
if($('#CauseId').val() == "performance" || $('#PAId').val()>0){
$.get("/rest/api/2/issue/{issueIdOrKey}", function(response) {
Read the response get all the subtask(defect) of the issue from the response,
read the issue's state from the response and put into a local variable.
});
for(loop for all subtask with defect){
$.post("/rest/api/2/issue/{subtaskissueIdOrKey}/transitions","fields required in json format", function(response) {});
}
}
}
});
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You should check out JJupin for that. As a matter of fact, we have a tutorial that might be of interest to you here: http://confluence.kepler-rominfo.com/display/JJUP20/Recipe+-+Autotransitioning+subtasks . It explains how to automatically start progress on all subtasks when starting progress on the parent subtask.
In a similar faschin you can add a SIL Listener that will check your condition every time the issue is updated and autotransition the subtasks if necessary.
HTH
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.