<commit_before><form id="change-form" method="GET" action="<?php echo $this->url('flightzilla', array('controller' => 'ticket', 'action' => 'modify'))?>">
    <?php
    if (empty($this->aTickets) === true) {
        $this->aTickets = array();
    }

    $sUser = $this->oResourceManager->getResource($this->oResourceManager->getResourceByLogin($this->layout()->sCurrentUser))->getEmail();
    if (empty($this->user) !== true) {
        $sUser = $this->oResourceManager->getResource($this->oResourceManager->getResourceByEmail($this->user))->getEmail();
    }


    foreach ($this->aTickets as $oTicket):
    /* @var $oTicket \Flightzilla\Model\Ticket\Type\Bug */

        $bReassign = (empty($this->user) !== true and $sUser !== $oTicket->getAssignee() and $this->dropAction !== \Flightzilla\Model\Ticket\Source\AbstractWriter::TICKET_RESOLVE);
    ?>
    <blockquote>
    <?php
        $this->oTask = $oTicket;
        echo sprintf('<p>%s</p>', $this->render('flightzilla/index/partial/bug-line.phtml'));

        if (empty($this->dropAction) !== true):
    ?>
        <p>You're going to <em><?php echo $this->dropAction; ?></em> the ticket</p>
    <?php
        endif;
    ?>
        <ul>
            <?php
            if (empty($this->dropAction) !== true):
                if ($this->dropAction === \Flightzilla\Model\Ticket\Source\AbstractWriter::TICKET_ASSIGN): ?>
                    <li>
                        <div class="control-group">
                            <label class="control-label" for="timeEstimation">Estimation</label>
                            <div class="controls">
                                <input type="text" id="timeEstimation" value="<?php echo $oTicket->getEstimation(); ?>" name="estimation[<?php echo $oTicket->id();?>][]" />
                            </div>

                            <label for="assignee">Assign to user:</label>
                            <input type="text" id="assignee" value="<?php echo $sUser; ?>" name="assigned[<?php echo $oTicket->id();?>][]" />
                            <input type="hidden" value="setAssigned" name="modify[<?php echo $oTicket->id();?>][]" />
                        </div>
                    </li>
                <?php elseif ($this->dropAction === \Flightzilla\Model\Ticket\Source\AbstractWriter::TICKET_RESOLVE or $this->dropAction === \Flightzilla\Model\Ticket\Source\AbstractWriter::TICKET_CONFIRM): ?>
                    <li>
                        <div class="control-group">
                            <?php if ($oTicket->getStatus() === \Flightzilla\Model\Ticket\Type\Bug::STATUS_ASSIGNED): ?>
                                <label class="control-label" for="timeWorked">Worked</label>
                                <div class="controls">
                                    <input type="text" id="timeWorked" value="<?php echo $oTicket->getTimeSinceLastActivity(); ?>" name="worked[<?php echo $oTicket->id();?>][]" />
                                </div>
                            <?php endif; ?>

                            <?php if ($this->dropAction === \Flightzilla\Model\Ticket\Source\AbstractWriter::TICKET_RESOLVE): ?>
                                <input type="hidden" value="setResolved" name="modify[<?php echo $oTicket->id();?>][]" />
                            <?php elseif ($this->dropAction === \Flightzilla\Model\Ticket\Source\AbstractWriter::TICKET_CONFIRM):?>
                                <input type="hidden" value="setConfirmed" name="modify[<?php echo $oTicket->id();?>][]" />
                            <?php endif; ?>

                            <?php if ($bReassign === true): ?>
                                <label for="assignee">Assign to user:</label>
                                <input type="text" id="assignee" value="<?php echo $sUser; ?>" name="assigned[<?php echo $oTicket->id();?>][]" />
                                <input type="hidden" value="setAssigned" name="modify[<?php echo $oTicket->id();?>][]" />
                            <?php endif; ?>
                        </div>
                    </li>
                <?php endif; ?>
                <li>
                    <label for="comment">Enter a comment:</label>
                    <?php if ($bReassign === true): ?>
                        <textarea id="comment" name="comment[<?php echo $oTicket->id();?>][]"></textarea>
                    <?php elseif ($this->dropAction === \Flightzilla\Model\Ticket\Source\AbstractWriter::TICKET_RESOLVE): ?>
                        <textarea id="comment" name="comment[<?php echo $oTicket->id();?>][]">Finished!</textarea>
                    <?php elseif ($oTicket->getStatus() === \Flightzilla\Model\Ticket\Type\Bug::STATUS_REOPENED): ?>
                        <textarea id="comment" name="comment[<?php echo $oTicket->id();?>][]"></textarea>
                    <?php elseif ($this->dropAction === \Flightzilla\Model\Ticket\Source\AbstractWriter::TICKET_CONFIRM):?>
                        <textarea id="comment" name="comment[<?php echo $oTicket->id();?>][]">Paused!</textarea>
                    <?php endif; ?>
                    <input type="hidden" value="setComment" name="modify[<?php echo $oTicket->id();?>][]" />
                </li>
            <?php endif; ?>

            <?php if ($this->dropAction !== \Flightzilla\Model\Ticket\Source\AbstractWriter::TICKET_ASSIGN and $oTicket->hasFlag(\Flightzilla\Model\Ticket\Type\Bug::FLAG_TESTING) === false): ?>
            <li>
                <label class="checkbox">
                    <input type="checkbox" value="setTestingRequest" name="modify[<?php echo $oTicket->id();?>][]" />
                    Check, if testing of the changes is requested
                </label>
            </li>
            <?php elseif ($oTicket->isFailed() === true and $oTicket->hasFlag(\Flightzilla\Model\Ticket\Type\Bug::FLAG_TESTING, \Flightzilla\Model\Ticket\Source\Bugzilla::BUG_FLAG_GRANTED) === false): ?>
            <li>
                <label class="checkbox">
                    <input type="checkbox" value="reTest" name="modify[<?php echo $oTicket->id();?>][]" />
                    Check, if the changes should be tested again
                </label>
            </li>
            <?php endif; ?>

            <?php if ($oTicket->isMergeable() === true): ?>
            <li>
                <label class="checkbox">
                    <input type="checkbox" value="setMerged" name="modify[<?php echo $oTicket->id();?>][]" />
                    Check, if the changes have been merged into the master-branch/trunk
                </label>
            </li>
            <?php endif;?>

            <?php if ($oTicket->hasFlag(\Flightzilla\Model\Ticket\Type\Bug::FLAG_TESTSERVER, '?') === true): ?>
            <li>
                <label class="checkbox">
                    <input type="checkbox" value="setStaged" name="modify[<?php echo $oTicket->id();?>][]" />
                    Check, if the changes have been deployed to the test-system
                </label>
            </li>
            <?php elseif ($oTicket->hasFlag(\Flightzilla\Model\Ticket\Type\Bug::FLAG_TESTSERVER) === false or (empty($this->dropAction) !== true and $this->dropAction !== \Flightzilla\Model\Ticket\Source\AbstractWriter::TICKET_ASSIGN)): ?>
            <li>
                <label class="checkbox">
                    <input type="checkbox" value="setUpdateTestserver" name="modify[<?php echo $oTicket->id();?>][]" />
                    Check, if the changes should be deployed to the test-system
                </label>
            </li>
            <?php endif;?>

            <?php if ($oTicket->hasFlag(\Flightzilla\Model\Ticket\Type\Bug::FLAG_DBCHANGE, '?') === true): ?>
            <li>
                <label class="checkbox">
                    <input type="checkbox" value="setDbChanged" name="modify[<?php echo $oTicket->id();?>][]" />
                    Check, if the Database-Changes have been deployed to production
                </label>
            </li>
            <?php endif;?>
        </ul>
    </blockquote>
    <?php
    endforeach;
    ?>
    <hr />
    <p class="pull right">
        <input type="submit" value="Change selected tickets" class="btn btn-primary btn-large" />
    </p><commit_msg>allow estimation on confirmation<commit_after><form id="change-form" method="GET" action="<?php echo $this->url('flightzilla', array('controller' => 'ticket', 'action' => 'modify'))?>">
    <?php
    if (empty($this->aTickets) === true) {
        $this->aTickets = array();
    }

    $sUser = $this->oResourceManager->getResource($this->oResourceManager->getResourceByLogin($this->layout()->sCurrentUser))->getEmail();
    if (empty($this->user) !== true) {
        $sUser = $this->oResourceManager->getResource($this->oResourceManager->getResourceByEmail($this->user))->getEmail();
    }


    foreach ($this->aTickets as $oTicket):
    /* @var $oTicket \Flightzilla\Model\Ticket\Type\Bug */

        $bReassign = (empty($this->user) !== true and $sUser !== $oTicket->getAssignee() and $this->dropAction !== \Flightzilla\Model\Ticket\Source\AbstractWriter::TICKET_RESOLVE);
    ?>
    <blockquote>
    <?php
        $this->oTask = $oTicket;
        echo sprintf('<p>%s</p>', $this->render('flightzilla/index/partial/bug-line.phtml'));

        if (empty($this->dropAction) !== true):
    ?>
        <p>You're going to <em><?php echo $this->dropAction; ?></em> the ticket</p>
    <?php
        endif;
    ?>
        <ul>
            <?php
            if (empty($this->dropAction) !== true):
                if ($this->dropAction === \Flightzilla\Model\Ticket\Source\AbstractWriter::TICKET_ASSIGN): ?>
                    <li>
                        <div class="control-group">
                            <label class="control-label" for="timeEstimation">Estimation</label>
                            <div class="controls">
                                <input type="text" id="timeEstimation" value="<?php echo $oTicket->getEstimation(); ?>" name="estimation[<?php echo $oTicket->id();?>][]" />
                            </div>

                            <label for="assignee">Assign to user:</label>
                            <input type="text" id="assignee" value="<?php echo $sUser; ?>" name="assigned[<?php echo $oTicket->id();?>][]" />
                            <input type="hidden" value="setAssigned" name="modify[<?php echo $oTicket->id();?>][]" />
                        </div>
                    </li>
                <?php elseif ($this->dropAction === \Flightzilla\Model\Ticket\Source\AbstractWriter::TICKET_RESOLVE or $this->dropAction === \Flightzilla\Model\Ticket\Source\AbstractWriter::TICKET_CONFIRM): ?>
                    <li>
                        <div class="control-group">
                            <?php if ($oTicket->getStatus() === \Flightzilla\Model\Ticket\Type\Bug::STATUS_ASSIGNED): ?>
                                <label class="control-label" for="timeWorked">Worked</label>
                                <div class="controls">
                                    <input type="text" id="timeWorked" value="<?php echo $oTicket->getTimeSinceLastActivity(); ?>" name="worked[<?php echo $oTicket->id();?>][]" />
                                </div>
                            <?php elseif ($oTicket->isEstimated() === false or $oTicket->getStatus() === \Flightzilla\Model\Ticket\Type\Bug::STATUS_UNCONFIRMED): ?>
                                <label class="control-label" for="timeEstimation">Estimation</label>
                                <div class="controls">
                                    <input type="text" id="timeEstimation" value="<?php echo $oTicket->getEstimation(); ?>" name="estimation[<?php echo $oTicket->id();?>][]" />
                                </div>
                            <?php endif; ?>

                            <?php if ($this->dropAction === \Flightzilla\Model\Ticket\Source\AbstractWriter::TICKET_RESOLVE): ?>
                                <input type="hidden" value="setResolved" name="modify[<?php echo $oTicket->id();?>][]" />
                            <?php elseif ($this->dropAction === \Flightzilla\Model\Ticket\Source\AbstractWriter::TICKET_CONFIRM):?>
                                <input type="hidden" value="setConfirmed" name="modify[<?php echo $oTicket->id();?>][]" />
                            <?php endif; ?>

                            <?php if ($bReassign === true): ?>
                                <label for="assignee">Assign to user:</label>
                                <input type="text" id="assignee" value="<?php echo $sUser; ?>" name="assigned[<?php echo $oTicket->id();?>][]" />
                                <input type="hidden" value="setAssigned" name="modify[<?php echo $oTicket->id();?>][]" />
                            <?php endif; ?>
                        </div>
                    </li>
                <?php endif; ?>
                <li>
                    <label for="comment">Enter a comment:</label>
                    <?php if ($bReassign === true): ?>
                        <textarea id="comment" name="comment[<?php echo $oTicket->id();?>][]"></textarea>
                    <?php elseif ($this->dropAction === \Flightzilla\Model\Ticket\Source\AbstractWriter::TICKET_RESOLVE): ?>
                        <textarea id="comment" name="comment[<?php echo $oTicket->id();?>][]">Finished!</textarea>
                    <?php elseif ($oTicket->getStatus() === \Flightzilla\Model\Ticket\Type\Bug::STATUS_REOPENED): ?>
                        <textarea id="comment" name="comment[<?php echo $oTicket->id();?>][]"></textarea>
                    <?php elseif ($this->dropAction === \Flightzilla\Model\Ticket\Source\AbstractWriter::TICKET_CONFIRM):?>
                        <textarea id="comment" name="comment[<?php echo $oTicket->id();?>][]">Paused!</textarea>
                    <?php endif; ?>
                    <input type="hidden" value="setComment" name="modify[<?php echo $oTicket->id();?>][]" />
                </li>
            <?php endif; ?>

            <?php if (empty($this->dropAction) === true or $this->dropAction === \Flightzilla\Model\Ticket\Source\AbstractWriter::TICKET_RESOLVE): ?>
                <?php if ($oTicket->hasFlag(\Flightzilla\Model\Ticket\Type\Bug::FLAG_TESTING) === false): ?>
                <li>
                    <label class="checkbox">
                        <input type="checkbox" value="setTestingRequest" name="modify[<?php echo $oTicket->id();?>][]" />
                        Check, if testing of the changes is requested
                    </label>
                </li>
                <?php elseif ($oTicket->isFailed() === true and $oTicket->hasFlag(\Flightzilla\Model\Ticket\Type\Bug::FLAG_TESTING, \Flightzilla\Model\Ticket\Source\Bugzilla::BUG_FLAG_GRANTED) === false): ?>
                <li>
                    <label class="checkbox">
                        <input type="checkbox" value="reTest" name="modify[<?php echo $oTicket->id();?>][]" />
                        Check, if the changes should be tested again
                    </label>
                </li>
                <?php endif; ?>

                <?php if ($oTicket->isMergeable() === true): ?>
                <li>
                    <label class="checkbox">
                        <input type="checkbox" value="setMerged" name="modify[<?php echo $oTicket->id();?>][]" />
                        Check, if the changes have been merged into the master-branch/trunk
                    </label>
                </li>
                <?php endif;?>

                <?php if ($oTicket->hasFlag(\Flightzilla\Model\Ticket\Type\Bug::FLAG_TESTSERVER, '?') === true): ?>
                <li>
                    <label class="checkbox">
                        <input type="checkbox" value="setStaged" name="modify[<?php echo $oTicket->id();?>][]" />
                        Check, if the changes have been deployed to the test-system
                    </label>
                </li>
                <?php elseif ($oTicket->hasFlag(\Flightzilla\Model\Ticket\Type\Bug::FLAG_TESTSERVER) === false): ?>
                <li>
                    <label class="checkbox">
                        <input type="checkbox" value="setUpdateTestserver" name="modify[<?php echo $oTicket->id();?>][]" />
                        Check, if the changes should be deployed to the test-system
                    </label>
                </li>
                <?php endif;?>

                <?php if ($oTicket->hasFlag(\Flightzilla\Model\Ticket\Type\Bug::FLAG_DBCHANGE, '?') === true): ?>
                <li>
                    <label class="checkbox">
                        <input type="checkbox" value="setDbChanged" name="modify[<?php echo $oTicket->id();?>][]" />
                        Check, if the Database-Changes have been deployed to production
                    </label>
                </li>
                <?php endif;?>
            <?php endif;?>
        </ul>
    </blockquote>
    <?php
    endforeach;
    ?>
    <hr />
    <p class="pull right">
        <input type="submit" value="Change selected tickets" class="btn btn-primary btn-large" />
    </p>
{'fraction_non_alphanumeric': 0.17482273625479483, 'fraction_numerical': 0.0, 'mean_word_length': 1.8282380013149244, 'pattern_counts': {'":': 0, '<': 295, '<?xml version=': 0, '>': 434, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4906338', 'n_tokens_mistral': 4960, 'n_tokens_neox': 4706, 'n_words': 872}