Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
In codebeamer v2.0.0.2,
I've added a choice field 'Tracker Type' (choiceList[6]) to a Task tracker 'Project Task' that will select from an options list and is mandatory in all status values
I've added a choice field 'Complaint' to Task tracker 'Project Task' that will point to another work item
I would like for the 'Complaint' field to be mandatory only if choiceList[6] == 'Complaints Investigation'
Scenario 1:
I've tried setting the 'Mandatory if:' field to "choiceList[6] == 'Complaints Investigation'" and the 'Mandatory in Status:' field to None.
This results in the 'Complaint' field NOT being mandatory for 'Project Task' items with "choiceList[6] == 'Complaints Investigation'" or other values of choiceList[6]
Scenario 2:
I've tried setting the 'Mandatory if:' field to "choiceList[6] == 'Complaints Investigation'" and the 'Mandatory in Status:' field to ALL but ['--', 'Blocked', 'Draft']
This results in the 'Complaint' field being mandatory for 'Project Task' items with choiceList[6] == any value
@Karol_Arorian Any chance you can help here?
Solved! Go to Solution.
I created a custom text field and computed the value as taskType to find out what the value was in codebeamer. Then I set the 'Mandatory if' value for the Complaints field to:
taskType == "[<Complaints Investigation(id=11, offset=11, labelId=1006)>]"
Worked like a champ!
I've also tried Scenario 1 with State Transition from Draft to Ready with:
Condition:
(choiceList[6] == 'Complaints Investigation' && complaint != "--") || choiceList[6] != 'Complaints Investigation'
Guard Condition:
Task Type is in "Compaints Investigation"
Compaint is not in "--"
Actions:
None
This results in the 'Complaint' field NOT being mandatory for 'Project Task' items with "choiceList[6] == 'Complaints Investigation'" or other values of choiceList[6]
'Task Type' field in tracker 'Project Task' is choiceList[6] with options of ['Dev', 'Complaints Investigation', 'Analysis']
If I set the 'Mandatory if' value in the 'Complaint' field in the same tracker to the following values, I get the result noted:
choiceList[6] eq choiceList[6] - Complaint field IS required
choiceList[6] eq "Complaints Investigation" - Complaint field IS NOT required
choiceList[6] eq choiceList[6]_$option[11] - Complaint field IS NOT required
choiceList[6] eq choiceList[6]_$option["Complaints Investigation"] - Complaint field IS NOT required
Does anyone have a solution to this issue?
I created a custom text field and computed the value as taskType to find out what the value was in codebeamer. Then I set the 'Mandatory if' value for the Complaints field to:
taskType == "[<Complaints Investigation(id=11, offset=11, labelId=1006)>]"
Worked like a champ!