Trying to make a workflow that will update the state of Ticket A when the state of Ticket B becomes a given state
Prerequsites:
One Dev project with HC.Release.State Field
One QA project with HC.QA.State Field
A Link Type (QA);
Outward = QA For
Inward = QA by
Direction = Aggregate
I have a Dev Project issue linked to a QA project issue with a QA link (QA -> Dev)
For the workflow I have:
rule Alert QA to Fix
{
for each Ticket in QA by {
Ticket.HC.QA.State = {Ready For QA};
}
}
Which does nothing
The Workflow is attached to both the Dev and QA project.
Can anyone spot what is going wrong?
One Dev project with HC.Release.State Field
One QA project with HC.QA.State Field
A Link Type (QA);
Outward = QA For
Inward = QA by
Direction = Aggregate
I have a Dev Project issue linked to a QA project issue with a QA link (QA -> Dev)
For the workflow I have:
rule Alert QA to Fix
when Issue.HC.Release.State.becomes({Complete - Ready For Testing})
for each Ticket in QA by {
Ticket.HC.QA.State = {Ready For QA};
}
}
Which does nothing
The Workflow is attached to both the Dev and QA project.
Can anyone spot what is going wrong?
Please sign in to leave a comment.
You can also add the debug output: message(Ticket.getId() + "") (will appear on the screen) or debug(Ticket.getId() + "") (find output in the logs/workflow.log).
Do you complete all references by Ctrl+Space? - Yes
Could you please attach the workflow zip? - Sure, see attached
You can also add the debug output: message(Ticket.getId() + "") (will appear on the screen) or debug(Ticket.getId() + "") (find output in the logs/workflow.log). - Added both inside the for loop:
rule Alert QA to Fix
for each Ticket in QA Ticket {
Ticket.HC.QA.State = {Ready for QA};
debug(Ticket.getId() + "");
message(Ticket.getId() + "");
}
}
No output is created logs/workflow.log and no message is displayed when I go through the use case. I guess the workflow rule is not reaching that point.
Thank you for your help, hope to hear from you soon.
Are you sure that the current issue has as least one 'QA by' link?
Added a message before the loop, nothing happens when I change the state. Other workflows applied to this project are working.
rule Alert QA to Fix
message(issue.getId() + "");
for each Ticket in QA Ticket {
Ticket.HC.QA.State = {Ready for QA};
message(Ticket.getId() + "");
}
}
Is this because the {Ready for QA} state is not present in the development project and the {Complete - Ready For Testing} state is not in the QA project?
I want a change in the development project ticket's state to affect the linked QA project ticket's state, is it necessary to have the same state bundle in each?
rule Alert QA to Fix 2
for each Ticket in QA Ticket {
Ticket.applyCommand("HC.QA.State Ready for QA");
}
}