Menu

#2323 AttributeCaseLog field not sent on transition form

Unassigned
new
nobody
None
User Interface
Medium
3.2.1
defect
2025-05-07
2025-05-07
No

Hello,

I have a problem with AttributeCaseLog field within transition form. I need to allow user to fill some comment in Private log on transition.

I've added this into state flags:

<attribute id="private_log">
    <must_prompt/>
 </attribute>

Then I need to prefill value (title) to this private log, so I added method to prefill transition form:

<method id="PrefillTransitionForm" _delta="define">
          <static>false</static>
          <access>public</access>
          <type>Overload-DBObject</type>
          <arguments>
            <argument id="1">
              <type>reference</type>
              <mandatory>true</mandatory>
            </argument>
          </arguments>
          <code>
            <![CDATA[
              public function PrefillTransitionForm(&$aContextParam) {
                    if ($aContextParam['stimulus'] == 'ev_resolve') {
                         $oLog = $this->Get('private_log');
                          $oLog->AddLogEntry('<b>Test title</b><br/>');
                          $this->Set('private_log', $oLog);
                    }
              }
            ]]>
     </code>
 </method>

When I want to apply the transition, I see Private log field with my "Test title" prefilled.
Then I submit a form WITHOUT any change in prefilled Private log. Request has "undefined" value in "attr_private_log" and this value (undefined) is saved as comment in Private log.

When I do some change in the Private log field in transition form (add space or some other character), private log is sent correctly and comment is added with my title.

2 Attachments

Discussion


Log in to post a comment.

MongoDB Logo MongoDB