Menu

Read only field in definied status

Peter, U
3 days ago
2 days ago
  • Peter, U

    Peter, U - 3 days ago

    Hello,
    I'd like to set the UserRequest:Description field to read_only, after when the ticket created. I've found the read_only method (GetAttributeFlags) but it is for the whole lifecycle.
    It is possible to solve this problem?
    maybe if I update the php method?

    public function GetAttributeFlags($sAttCode, &$aReasons = array(), $sTargetState = '')
    {
    if ($sAttCode == 'description')
    {
    return(OPT_ATT_READONLY | parent::GetAttributeFlags($sAttCode, $aReasons, $sTargetState));
    }
    return parent::GetAttributeFlags($sAttCode, $aReasons, $sTargetState);
    }
    but i don't have the parent status in the method:(

    thanks in advance

     
  • Jeffrey Bostoen

    Jeffrey Bostoen - 2 days ago

    Any reason you don't just use the "lifecycle" states and flags?

     
  • Peter, U

    Peter, U - 2 days ago

    I don't know those functions, but i'll check , thank you
    Do you mean:
    <lifecycle>
    <stimuli>
    <states>
    <state id=".....">
    <flags>
    <attribute id="description">
    <read_only>
    </read_only></attribute>
    ?</flags></state></states></stimuli></lifecycle>

     

    Last edit: Peter, U 2 days ago
  • Vincent @ Combodo

    Nearly

    <lifecycle>
       <states>
          <state id=".....">
             <flags>
                <attribute id="description">
                    <read_only/>
                 </attribute>
              </flags>
          </state>
      </states>
    </lifecycle>
    
     
  • Peter, U

    Peter, U - 2 days ago

    thank you

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.