Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Potential Workaround: vary attribute read-only by state?

Goal: allow an attribute to be read only in some states and editable in others.

Solution Example using a timestamp attribute: Fixed Date.

    1. Create a new attribute, it is not read only. Name = Fixed Date Id = com.ibm.team.workitem.attribute.fixeddate.
    2. Create a new attribute, it is not read only. Name = Internal FD, Id = com.ibm.team.workitem.attribute.internalfd.
    3. Add both fields, next to each other on the Editor Presentation for the WI type.
    a. For the Internal FD attribute, add with Label of Fixed Date.
    b. For the Fixed Date attribute, add with Read Only option True.
    c. For the Fixed Date attribute, click the Hide in Workflow States Edit button and select the states you want the user to be able to directly, i.e. not via plugin automation, change the value of Fixed Date and click OK.
    d. For the Internal FD attribute, click the Hide in Workflow States Edit button and select the states you want the user to not be able to directly change the value of Fixed Date and click OK.
    e. Create Precondition Plugin code that also is aware of the transitions in which Fixed Date is allowed to be changed, in those transitions, update the value of Fixed Date with the value of Internal FD assuming it passes all condition checks.


Other than overloading the project area with two fields instead of one. Will this workaround work? Does anyone see an issue with this approach?

0 votes


Be the first one to answer this question!

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Jul 15 '11, 11:36 a.m.

Question was seen: 6,111 times

Last updated: Jul 15 '11, 11:36 a.m.

Confirmation Cancel Confirm