It's all about the answers!

Ask a question

Read-only attributes based on the state


VK L (8177157159) | asked Jun 22 '12, 7:28 a.m.
Hi All,
            Is it possible to make attributes read-only based on state using Operation advisor plugins? If yes, please share some code snippet or ideas.

Thanks.

5 answers



permanent link
Dinesh Kumar B (4.1k413) | answered Jun 22 '12, 7:36 a.m.
JAZZ DEVELOPER
with 4.0, the newly added Operation Behaviors
    Read-Only Attributes For Type and State and
    Read-Only Attributes For Condition

for an earlier version you can use the workaround based on read-only presentations
   https://jazz.net/library/article/808/

hope it helps.

permanent link
VK L (8177157159) | answered Jun 26 '12, 8:30 a.m.
Hi Dinesh,
                  Thanks for the link. I tried it out, and facing few problems. The problem is that
When i change from "created" to "Request for build" state, for e.g. my attribute presentation does not appear unless i save the state change. However, if its set same(read-only = true or false) for 2 continuous states - it works.
Since presentation is not changing automatically, i am not able to make fields mandatory and all needed changes are appearing 1 state later.

Please advise.

Thanks.

permanent link
VK L (8177157159) | answered Jun 26 '12, 8:32 a.m.
This is mainly in case of:
State 1 :  Read-only=False
State 2:  Read-only=true

So, when transitioning from state1 to state2 - the presentation is not refreshing automatically unless i save state2. Due to this, the mandatory fields that i want to fill in state2 are getting missed out.

permanent link
Dinesh Kumar B (4.1k413) | answered Jun 29 '12, 7:12 a.m.
JAZZ DEVELOPER
Requirement such as : say you have createdby to be set in created state and transition to request for build, createdby should be read-only can be addressed. 

i am sorry but I dint understand the part where you say "the mandatory fields that i want to fill in state2 are getting missed out" - the mandatory fields in State2 will show up once you enter that state.  so if you want say buildduedate to be filled in State2, you can use Operation Advisor -> Required Attributes and set buildduedate as required in State2.  This will stop you from going to State3 unless value for buildduedate is filled in State2

To what I understand, transitions start after the desired action is chosen and saved.  Only when you enter that state, the corresponding features will show up.  The behavior you see with Read-Only is same you would see with Required Attributes and same as any other State based activities. 

If  you are looking for a dynamic change in the presentation elements based on the state transition action chosen, at the moment I dont see any functionality that can help you with this.  This will be difficult as well since you can have multiple actions leading to different states from one given state. 

However, if you need something to be checked before a transition happens, you can use Validators. 

permanent link
VK L (8177157159) | answered Jun 29 '12, 11:10 a.m.
Hi Dinesh,
                   The requirement to change the presentation based on state is very much required. Now because, the presentation is not refreshing from read-only to editable (true to false), the control is not available for me to enter a value in it. The pre-condition of required attributes is working - but since the attribute presentation is not appearing, i am unable to give a value in it and hence the condition fails

Thanks.

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.