<commit_before><?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<object-views xmlns="http://axelor.com/xml/ns/object-views" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://axelor.com/xml/ns/object-views http://axelor.com/xml/ns/object-views/object-views_5.4.xsd">


	<grid name="ticket-grid" title="All tickets" model="com.axelor.apps.helpdesk.db.Ticket">
		<toolbar>
			<button name="takeChargeBtn" title="Assign to me" icon="fa-suitcase" onClick="com.axelor.apps.helpdesk.web.TicketController:assignToMeTicket"/>
		</toolbar>
		<field name="ticketSeq" width="120"/>
		<field name="subject"/>
		<field name="ticketType"/>
		<field name="startDateT"/>
		<field name="endDateT"/>
		<field name="deadlineDateT"/>
		<field name="assignedToUser"/>
		<field name="prioritySelect" widget="single-select"/>
		<field name="statusSelect"/>
		<field name="timerState" hidden="true"/>
		<field name="progressSelect" widget="SelectProgress"/>
		<button name="takeChargeBtn" icon="fa-suitcase"  hideIf="assignedToUser.id == _user.id" help="Take charge" onClick="com.axelor.apps.helpdesk.web.TicketController:assignToMeTicket" readonlyIf="statusSelect == 3"/>
		<button name="startTicketBtn" icon="fa-play" onClick="action-ticket-group-on-start" readonlyIf="timerState == true || statusSelect == 3"/>
		<button name="pauseBtn" icon="fa-pause" onClick="action-ticket-group-on-pause" readonlyIf="timerState == false || statusSelect == 3"/>
		<button name="validateTicketBtn" icon="fa-check" onClick="action-ticket-group-on-validate" readonlyIf="statusSelect == 3"/>
		<button name="finishTicketBtn" icon="fa-power-off" onClick="action-ticket-group-on-close" readonlyIf="statusSelect == 3"/>
	</grid>

	<form model="com.axelor.apps.helpdesk.db.Ticket" title="Ticket" name="ticket-form" onNew="action-ticket-group-on-new" onLoad="action-ticket-group-timer-process">
		<panel name="mainPanel" colSpan="12">
			<field name="statusSelect" colSpan="8" readonly="true" widget="NavSelect" showTitle="false" onChange="action-record-to-set-progress-select"/>
			<field name="slaPolicy.name" showTitle="false" hideIf="statusSelect >= slaPolicy.reachStageSelect" colSpan="4">
				<viewer><![CDATA[
					<h4 style="text-align: right;">
			        	<span class="label label-important" ng-if="record.slaPolicy">{{record.slaPolicy.name}}</span>
			        </h4>
				]]></viewer>
			</field>
			<field name="ticketSeq" showTitle="false">
				<viewer depends="ticketSeq">
					<![CDATA[
						<h3>
							<span  style="margin: 5px 0 !important; display: inline-table; line-height: initial;"><span x-translate>Ticket N° </span>{{record.ticketSeq}}</span>
						</h3>
					]]>
				</viewer>
			</field>
			<panel name="progressPanel" colSpan="6" itemSpan="12">
				<field name="progressSelect" widget="SelectProgress">
					<editor>
						<field name="progressSelect" colSpan="6" showTitle="false"/>
					</editor>
				</field>
			</panel>
			<field name="subject" colSpan="12"/>
			<field name="mailSubject"/>
			<field name="slaPolicy.reachStageSelect" hidden="true"/>
		</panel>

		<panel name="otherDetailsPanel" colSpan="12">
			<field name="project" if-module="axelor-project" onChange="action-ticket-record-value-on-customer-and-contact" form-view="helpdesk-project-form" grid-view="helpdesk-project-grid"/>
			<field name="customer" domain="self.isCustomer = true" form-view="partner-form" grid-view="partner-grid"/>
			<field name="contactPartner" onSelect="action-ticket-domain-on-contact-partner" form-view="partner-contact-form" grid-view="partner-contact-grid"/>
		</panel>

        <panel-tabs name="mainPanelTab">
		    <panel name="descriptionPanel" colSpan="12" title="Description">
			    <field name="description" showTitle="false" colSpan="12" widget="html"/>
		    </panel>

		    <panel name="timerPanel" title="Timer" showIf="id" hidden="true" sidebar="true" if="__config__.app.getApp('helpdesk').getManageTimer()">
			    <button name="startTimerBtn" title="Start" icon="fa-play" colSpan="4" hidden="true"
				    onClick="action-ticket-method-start-timer"/>
			    <button name="stopTimerBtn" title="Stop" icon="fa-pause" colSpan="4" hidden="true"
				    onClick="action-ticket-method-stop-timer"/>
			    <button name="cancelTimerBtn" title="Cancel" icon="fa-times-circle" colSpan="4"
				    hidden="true" onClick="action-ticket-method-cancel-timer" css="btn-danger"/>
			    <field name="$_totalTimerDuration" type="decimal" readonly="true"
				    title="Total duration (Hours)" colSpan="4"/>
				<field name="realTotalDuration" colSpan="4"/>
				<field name="timerState" hidden="true" colSpan="4"/>
		    </panel>
        </panel-tabs>

		<panel name="actionsPanel" sidebar="true">
			<button name="startTicketBtn" title="Start" icon="fa-play" hideIf="statusSelect > 0" onClick="save,action-ticket-group-on-start"/>
			<button name="validateTicketBtn" title="Resolve" icon="fa-check" hideIf="statusSelect > 1" onClick="save,action-ticket-group-on-validate"/>
			<button name="finishTicketBtn" title="Close" icon="fa-power-off" css="btn-danger" hideIf="statusSelect > 2" onClick="save,action-ticket-group-on-close"/>
		</panel>

		<panel name="characteristicsPanel" title="Characteristics" sidebar="true" canCollapse="true">
			<field name="ticketType" colSpan="12"/>
			<field name="slaPolicy" colSpan="12" hideIf="statusSelect >= slaPolicy.reachStageSelect" readonly="true"/>
			<field name="prioritySelect" colSpan="6" widget="single-select"/>
			<field name="deadlineDateT" colSpan="6"/>
			<field name="isSlaCompleted" hidden="true"/>
		</panel>
		<panel name="followupPanel" title="Follow-up" sidebar="true" canCollapse="true">
			<field name="assignedToUser" colSpan="6" form-view="user-form" grid-view="user-grid"/>
			<field name="responsibleUser" colSpan="6" form-view="user-form" grid-view="user-grid"/>
			<field name="lead" colSpan="6" form-view="lead-form" grid-view="lead-grid" if-module="axelor-crm" if="__config__.app.isApp('crm')"/>
		</panel>
		<panel name="datesPanel" title="Dates" sidebar="true" canCollapse="true">
			<field name="startDateT" colSpan="6" onChange="action-ticket-method-compute-from-start-date-time"/>
			<field name="endDateT" colSpan="6" onChange="action-ticket-method-compute-from-end-date-time"/>
			<field name="duration" colSpan="6" widget="duration" x-big="true" onChange="action-ticket-method-compute-from-duration"/>
		</panel>
		<panel name="attrsPanel">
			<field name="attrs" hidden="true"/>
		</panel>
		<panel-mail name="mailPanel">
	    	<mail-messages limit="6"/>
	    	<mail-followers/>
	  	</panel-mail>
	</form>

	<calendar name="ticket-calendar" model="com.axelor.apps.helpdesk.db.Ticket"
	eventStart="startDateT"
	eventStop="endDateT"
	title="All tickets"
	colorBy="assignedToUser">
		<field name="subject"/>
		<field name="statusSelect"/>
	</calendar>

	<kanban columnBy="statusSelect" sequenceBy="prioritySelect"  limit="10"
	 name="ticket-kanban" title="Tickets" model="com.axelor.apps.helpdesk.db.Ticket">
	 <field name="ticketSeq"/>
	 <field name="subject"/>
	 <field name="progressSelect"/>
	 <field name="project.name"/>
	 <field name="ticketType"/>
	 <hilite color="primary" if="prioritySelect == 1"/>
	 <hilite color="info" if="prioritySelect == 2"/>
	 <hilite color="warning" if="prioritySelect == 3"/>
	 <hilite color="danger" if="prioritySelect == 4"/>
	 <template>
	 <![CDATA[
     <h4>{{record.ticketSeq}}</h4>
     <div class="card-body">
    	<p>{{record.subject}}</p>
        <dl>
			<dt ng-show="record.progressSelect" x-translate>Progress</dt>
			<dd ng-if="record.progressSelect == 80 || record.progressSelect == 90 || record.progressSelect == 100"><div class="progress progress-striped progress-success">
            	<div class="bar" style="width: {{$fmt('progressSelect')}}%;"></div></div>
            </dd>
            <dd ng-if="record.progressSelect == 50 || record.progressSelect == 60 || record.progressSelect == 70"><div class="progress progress-striped progress-primary">
            	<div class="bar" style="width: {{$fmt('.progressSelect')}}%;"></div></div>
            </dd>
             <dd ng-if="record.progressSelect == 30 || record.progressSelect == 40"><div class="progress progress-striped progress-warning">
            	<div class="bar" style="width: {{$fmt('progressSelect')}}%;"></div></div>
            </dd>
             <dd ng-if="record.progressSelect == 10 || record.progressSelect == 20"><div class="progress progress-striped progress-danger">
            	<div class="bar" style="width: {{$fmt('progressSelect')}}%;"></div></div>
            </dd>
            <dt ng-show="record.project.name" x-translate>Project</dt><dd ng-show="record.project.name">{{record.project.name}}</dd>
            <dt ng-show="record.ticketType.name" x-translate>Ticket Type</dt><dd ng-show="record.ticketType.name">{{record.ticketType.name}}</dd>
        </dl>
 	 </div>
     ]]>
	 </template>
	 </kanban>

	<action-record name="action-ticket-record-value-on-customer-and-contact" model="com.axelor.apps.helpdesk.db.Ticket">
		<field name="customer" expr="eval: project.clientPartner"/>
		<field name="contactPartner" expr="eval: project.contactPartner"/>
	</action-record>

	<action-record name="action-ticket-record-set-start-status" model="com.axelor.apps.helpdesk.db.Ticket">
		<field name="statusSelect" expr="1" if="statusSelect == 0"/>
	</action-record>

	<action-record name="action-ticket-record-set-validate-status" model="com.axelor.apps.helpdesk.db.Ticket">
		<field name="statusSelect" expr="2" if="statusSelect &lt;= 1"/>
	</action-record>

	<action-record name="action-ticket-record-set-closed-status" model="com.axelor.apps.helpdesk.db.Ticket">
		<field name="statusSelect" expr="3" if="statusSelect &lt;= 2"/>
	</action-record>

	<action-record name="action-ticket-record-to-set-progress-select" model="com.axelor.apps.helpdesk.db.Ticket">
		<field name="progressSelect" expr="100" if="statusSelect == 2"/>
		<field name="progressSelect" expr="0" if="statusSelect != 2"/>
	</action-record><commit_msg>Anomaly RM#39551 : $fmt at wrong places<commit_after><?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<object-views xmlns="http://axelor.com/xml/ns/object-views" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://axelor.com/xml/ns/object-views http://axelor.com/xml/ns/object-views/object-views_5.4.xsd">


	<grid name="ticket-grid" title="All tickets" model="com.axelor.apps.helpdesk.db.Ticket">
		<toolbar>
			<button name="takeChargeBtn" title="Assign to me" icon="fa-suitcase" onClick="com.axelor.apps.helpdesk.web.TicketController:assignToMeTicket"/>
		</toolbar>
		<field name="ticketSeq" width="120"/>
		<field name="subject"/>
		<field name="ticketType"/>
		<field name="startDateT"/>
		<field name="endDateT"/>
		<field name="deadlineDateT"/>
		<field name="assignedToUser"/>
		<field name="prioritySelect" widget="single-select"/>
		<field name="statusSelect"/>
		<field name="timerState" hidden="true"/>
		<field name="progressSelect" widget="SelectProgress"/>
		<button name="takeChargeBtn" icon="fa-suitcase"  hideIf="assignedToUser.id == _user.id" help="Take charge" onClick="com.axelor.apps.helpdesk.web.TicketController:assignToMeTicket" readonlyIf="statusSelect == 3"/>
		<button name="startTicketBtn" icon="fa-play" onClick="action-ticket-group-on-start" readonlyIf="timerState == true || statusSelect == 3"/>
		<button name="pauseBtn" icon="fa-pause" onClick="action-ticket-group-on-pause" readonlyIf="timerState == false || statusSelect == 3"/>
		<button name="validateTicketBtn" icon="fa-check" onClick="action-ticket-group-on-validate" readonlyIf="statusSelect == 3"/>
		<button name="finishTicketBtn" icon="fa-power-off" onClick="action-ticket-group-on-close" readonlyIf="statusSelect == 3"/>
	</grid>

	<form model="com.axelor.apps.helpdesk.db.Ticket" title="Ticket" name="ticket-form" onNew="action-ticket-group-on-new" onLoad="action-ticket-group-timer-process">
		<panel name="mainPanel" colSpan="12">
			<field name="statusSelect" colSpan="8" readonly="true" widget="NavSelect" showTitle="false" onChange="action-record-to-set-progress-select"/>
			<field name="slaPolicy.name" showTitle="false" hideIf="statusSelect >= slaPolicy.reachStageSelect" colSpan="4">
				<viewer><![CDATA[
					<h4 style="text-align: right;">
			        	<span class="label label-important" ng-if="record.slaPolicy">{{record.slaPolicy.name}}</span>
			        </h4>
				]]></viewer>
			</field>
			<field name="ticketSeq" showTitle="false">
				<viewer depends="ticketSeq">
					<![CDATA[
						<h3>
							<span  style="margin: 5px 0 !important; display: inline-table; line-height: initial;"><span x-translate>Ticket N° </span>{{record.ticketSeq}}</span>
						</h3>
					]]>
				</viewer>
			</field>
			<panel name="progressPanel" colSpan="6" itemSpan="12">
				<field name="progressSelect" widget="SelectProgress">
					<editor>
						<field name="progressSelect" colSpan="6" showTitle="false"/>
					</editor>
				</field>
			</panel>
			<field name="subject" colSpan="12"/>
			<field name="mailSubject"/>
			<field name="slaPolicy.reachStageSelect" hidden="true"/>
		</panel>

		<panel name="otherDetailsPanel" colSpan="12">
			<field name="project" if-module="axelor-project" onChange="action-ticket-record-value-on-customer-and-contact" form-view="helpdesk-project-form" grid-view="helpdesk-project-grid"/>
			<field name="customer" domain="self.isCustomer = true" form-view="partner-form" grid-view="partner-grid"/>
			<field name="contactPartner" onSelect="action-ticket-domain-on-contact-partner" form-view="partner-contact-form" grid-view="partner-contact-grid"/>
		</panel>

        <panel-tabs name="mainPanelTab">
		    <panel name="descriptionPanel" colSpan="12" title="Description">
			    <field name="description" showTitle="false" colSpan="12" widget="html"/>
		    </panel>

		    <panel name="timerPanel" title="Timer" showIf="id" hidden="true" sidebar="true" if="__config__.app.getApp('helpdesk').getManageTimer()">
			    <button name="startTimerBtn" title="Start" icon="fa-play" colSpan="4" hidden="true"
				    onClick="action-ticket-method-start-timer"/>
			    <button name="stopTimerBtn" title="Stop" icon="fa-pause" colSpan="4" hidden="true"
				    onClick="action-ticket-method-stop-timer"/>
			    <button name="cancelTimerBtn" title="Cancel" icon="fa-times-circle" colSpan="4"
				    hidden="true" onClick="action-ticket-method-cancel-timer" css="btn-danger"/>
			    <field name="$_totalTimerDuration" type="decimal" readonly="true"
				    title="Total duration (Hours)" colSpan="4"/>
				<field name="realTotalDuration" colSpan="4"/>
				<field name="timerState" hidden="true" colSpan="4"/>
		    </panel>
        </panel-tabs>

		<panel name="actionsPanel" sidebar="true">
			<button name="startTicketBtn" title="Start" icon="fa-play" hideIf="statusSelect > 0" onClick="save,action-ticket-group-on-start"/>
			<button name="validateTicketBtn" title="Resolve" icon="fa-check" hideIf="statusSelect > 1" onClick="save,action-ticket-group-on-validate"/>
			<button name="finishTicketBtn" title="Close" icon="fa-power-off" css="btn-danger" hideIf="statusSelect > 2" onClick="save,action-ticket-group-on-close"/>
		</panel>

		<panel name="characteristicsPanel" title="Characteristics" sidebar="true" canCollapse="true">
			<field name="ticketType" colSpan="12"/>
			<field name="slaPolicy" colSpan="12" hideIf="statusSelect >= slaPolicy.reachStageSelect" readonly="true"/>
			<field name="prioritySelect" colSpan="6" widget="single-select"/>
			<field name="deadlineDateT" colSpan="6"/>
			<field name="isSlaCompleted" hidden="true"/>
		</panel>
		<panel name="followupPanel" title="Follow-up" sidebar="true" canCollapse="true">
			<field name="assignedToUser" colSpan="6" form-view="user-form" grid-view="user-grid"/>
			<field name="responsibleUser" colSpan="6" form-view="user-form" grid-view="user-grid"/>
			<field name="lead" colSpan="6" form-view="lead-form" grid-view="lead-grid" if-module="axelor-crm" if="__config__.app.isApp('crm')"/>
		</panel>
		<panel name="datesPanel" title="Dates" sidebar="true" canCollapse="true">
			<field name="startDateT" colSpan="6" onChange="action-ticket-method-compute-from-start-date-time"/>
			<field name="endDateT" colSpan="6" onChange="action-ticket-method-compute-from-end-date-time"/>
			<field name="duration" colSpan="6" widget="duration" x-big="true" onChange="action-ticket-method-compute-from-duration"/>
		</panel>
		<panel name="attrsPanel">
			<field name="attrs" hidden="true"/>
		</panel>
		<panel-mail name="mailPanel">
	    	<mail-messages limit="6"/>
	    	<mail-followers/>
	  	</panel-mail>
	</form>

	<calendar name="ticket-calendar" model="com.axelor.apps.helpdesk.db.Ticket"
	eventStart="startDateT"
	eventStop="endDateT"
	title="All tickets"
	colorBy="assignedToUser">
		<field name="subject"/>
		<field name="statusSelect"/>
	</calendar>

	<kanban columnBy="statusSelect" sequenceBy="prioritySelect"  limit="10"
	 name="ticket-kanban" title="Tickets" model="com.axelor.apps.helpdesk.db.Ticket">
	 <field name="ticketSeq"/>
	 <field name="subject"/>
	 <field name="progressSelect"/>
	 <field name="project.name"/>
	 <field name="ticketType"/>
	 <hilite color="primary" if="prioritySelect == 1"/>
	 <hilite color="info" if="prioritySelect == 2"/>
	 <hilite color="warning" if="prioritySelect == 3"/>
	 <hilite color="danger" if="prioritySelect == 4"/>
	 <template>
	 <![CDATA[
     <h4>{{record.ticketSeq}}</h4>
     <div class="card-body">
    	<p>{{record.subject}}</p>
        <dl>
			<dt ng-show="record.progressSelect" x-translate>Progress</dt>
			<dd ng-if="record.progressSelect == 80 || record.progressSelect == 90 || record.progressSelect == 100"><div class="progress progress-striped progress-success">
            	<div class="bar" style="width: {{record.progressSelect}}%;"></div></div>
            </dd>
            <dd ng-if="record.progressSelect == 50 || record.progressSelect == 60 || record.progressSelect == 70"><div class="progress progress-striped progress-primary">
            	<div class="bar" style="width: {{record.progressSelect}}%;"></div></div>
            </dd>
             <dd ng-if="record.progressSelect == 30 || record.progressSelect == 40"><div class="progress progress-striped progress-warning">
            	<div class="bar" style="width: {{record.progressSelect}}%;"></div></div>
            </dd>
             <dd ng-if="record.progressSelect == 10 || record.progressSelect == 20"><div class="progress progress-striped progress-danger">
            	<div class="bar" style="width: {{record.progressSelect}}%;"></div></div>
            </dd>
            <dt ng-show="record.project.name" x-translate>Project</dt><dd ng-show="record.project.name">{{record.project.name}}</dd>
            <dt ng-show="record.ticketType.name" x-translate>Ticket Type</dt><dd ng-show="record.ticketType.name">{{record.ticketType.name}}</dd>
        </dl>
 	 </div>
     ]]>
	 </template>
	 </kanban>

	<action-record name="action-ticket-record-value-on-customer-and-contact" model="com.axelor.apps.helpdesk.db.Ticket">
		<field name="customer" expr="eval: project.clientPartner"/>
		<field name="contactPartner" expr="eval: project.contactPartner"/>
	</action-record>

	<action-record name="action-ticket-record-set-start-status" model="com.axelor.apps.helpdesk.db.Ticket">
		<field name="statusSelect" expr="1" if="statusSelect == 0"/>
	</action-record>

	<action-record name="action-ticket-record-set-validate-status" model="com.axelor.apps.helpdesk.db.Ticket">
		<field name="statusSelect" expr="2" if="statusSelect &lt;= 1"/>
	</action-record>

	<action-record name="action-ticket-record-set-closed-status" model="com.axelor.apps.helpdesk.db.Ticket">
		<field name="statusSelect" expr="3" if="statusSelect &lt;= 2"/>
	</action-record>

	<action-record name="action-ticket-record-to-set-progress-select" model="com.axelor.apps.helpdesk.db.Ticket">
		<field name="progressSelect" expr="100" if="statusSelect == 2"/>
		<field name="progressSelect" expr="0" if="statusSelect != 2"/>
	</action-record>
{'fraction_non_alphanumeric': 0.19115818787607539, 'fraction_numerical': 0.010492814162812671, 'mean_word_length': 4.84253341080767, 'pattern_counts': {'":': 0, '<': 367, '<?xml version=': 2, '>': 377, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 12}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4147666', 'n_tokens_mistral': 7184, 'n_tokens_neox': 6412, 'n_words': 1070}