magento2 – Magento 2 Data Migration map two source fields in one destination field

I use Mirasvit Helpdesk for tickets menagement.

In Magento 1.9 ticket are marked as archiverd or spam in two bolean fields on m_helpdesk_ticket table.

In Magento 2 they change this beavior and just one fiel named “folder” is used.

This field can have three values:

  • 1 (inbox)
  • 2 (archive)
  • 3 (spam)

I use the following to manage the change for archived tickets:

        <move>
            <field>m_helpdesk_ticket.is_archived</field>
            <to>mst_helpdesk_ticket.folder</to>
        </move>
        <transform>
            <field>m_helpdesk_ticket.is_archived</field>
            <handler class="MigrationHandlerConvert">
                <param name="map" value="(0:1;1:2)" />
            </handler>
        </transform>

but i wold like to find a way to put tickets in spam folder if they ar marcked as spam.

If I use the same way one fild will override the other.

Ther is a way to map the spam field with somthing like

if m_helpdesk_ticket.is_spam = 1

    <move>
        <field>m_helpdesk_ticket.is_spam</field>
        <to>mst_helpdesk_ticket.folder</to>
    </move>
    <transform>
        <field>m_helpdesk_ticket.is_spam</field>
        <handler class="MigrationHandlerConvert">
            <param name="map" value="(1:3)" />
        </handler>
    </transform>

else

    <ignore>
        <field>m_helpdesk_ticket.is_spam</field>
    </ignore>

and a way to prioritize fields?