It's all about the answers!

Ask a question

A value provider you configured on the attribute has filtered out the chosen value.


Susan Hanson (1.6k2201194) | asked Jul 26 '13, 9:45 a.m.
We are now getting an odd error in our project area:   Invalid value of attribute 'TargetRelease': A value provider you configured on the attribute has filtered out the chosen value.

We have an enumeration called that is used for the attribute TargetRelease and we have a value that is Archived (in 4.0.0.1).  We have a small subset of work items that still have the archived value, which displays just fine.

This morning, in advance of adding a validator for a totally different attribute, I enabled "Attribute Validation".  Since I didn't have any validators used by any of the work items, I didn't think it would be an issue.

I have 2 people now who report getting that error when attempting to add a comment and save on a work item with that archived enumeration value. (confirmed multiple clients including web client)

Is this expected?  I thought archiving an enumeration value would be fine for existing work items but just wouldn't be shown when attempting to set the value.  Or is this a bug?  Is there any way around this (other than un-archiving the release or not having attribute validation?

Susan


2 answers



permanent link
Dinesh Kumar B (4.1k413) | answered Jul 26 '13, 10:06 a.m.
JAZZ DEVELOPER
Attribute Validation by definition "Verifies that a work item can only be saved if all attribute values are valid."
 and
so the archived values for the enumeration wouldn't qualify for a valid value for the attribute anymore. 

So, I feel this is expected.  please feel free to correct me if got the requirement wrong.

Comments
Susan Hanson commented Jul 26 '13, 10:13 a.m.

Well ... we think of an archived enumeration as a valid value in existing work items but you then wouldn't be allowed to set that value to any new or existing work items that do not already have that value.

The scenario is basically we have an enumeration with our project codenames (Lexington, Concord) that is used until we ship the product release.  We then don't want anyone to set the project release target for anything new, but it is valid on any existing work items that were opened during that dev release cycle.  So to not show it in the dropdown, we archive it.  But as soon as we turn on attribute validation, it means that we can't even add a COMMENT to an older (and in theory Resolved) work item, which to me is not acceptable.

Susan


permanent link
Alvaro Riera (4021418) | answered Apr 01 '16, 7:51 a.m.
edited Apr 01 '16, 7:54 a.m.

Morning,

Almost 3 years... but i have the same issue.

I've solved it with a Validation Script that always returns "OK" linked to the enumeration.

Hope it can help someone else that have searched for a solution to the same error.

Something like this:

dojo.provide("org.ibm.team.workitem.validatorAlwaysTrue");
dojo.require("com.ibm.team.workitem.api.common.Status");

(function() {
var Status = com.ibm.team.workitem.api.common.Status;
var val = dojo.declare("org.ibm.team.workitem.validatorAlwaysTrue", null, {

    validate: function(attributeId, workItem, configuration) {
                try
                {       

                                return Status.OK_STATUS; 
                }
                catch(err)
                {
                               console.log(err.message);
                }
    }
});
})()

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.