Actually, the logic in the import controller appears to make several assumptions about which fields are included in the imported text; I attempted multiple imports both with/without column names in first line, from clipboard and from csv file, using an export with default options (exporting all fields) and leaving the additional fields on the import page blank, and none of them resulted in a proper import.
As a user, the options on the import page are counter-intuitive, as that data is typically expected to already be in the import file. After briefly glancing at the license controller code (apologies if I’m mistaken), it appears that those fields (orderId, productId, userId, status, source) are ignored from the import data altogether. As those fields are not required, leaving them blank results in a “successful” import, but with malformed license key data.
If @haseeb0001 is open, I don’t mind putting together a PR to improve on the import functionality. My approach would be something along the lines of:
– Parse the import data to determine which columns are included.
– Add an option to the import page settings to specify if the manually-set options should act as:
(1) default values for entries with null values in those columns, or
(2) override values that take precedence over the column value in the import data
– Make any manual import settings the code requires for a valid import (and are ignored in the import file) required (though import data should be enough imo).
– Add a confirmation view showing the result of the import to allow the user a chance to review the imported licenses prior to committing the imported data to the db. An option to edit values on the review page could always be added down the road, potentially as a premium feature even.