Blogs Engineering

Making Imported Custom Fields Editable in Passman

Custom fields imported into Passman showed up but couldn't be edited. The merged fix stores a field type on import and backfills it for existing entries.

JavaScriptnextcloud/passmanAngularJSCSV importdata migration

A nine-year-old bug where imported data was visible but not editable.

Short answer

Custom fields imported into Passman, for example through the generic CSV importer, appeared when viewing a credential, but showed no values or types on the edit screen. The imported fields had no field_type. The fix has importers store one (text or password, based on the secret flag), and the edit controller backfills a valid type for already-stored fields that lack one. It was merged as PR #877 and closed issue #365.

The problem

Issue #365, opened in August 2017, described exporting passwords from Revelation, importing them with the generic CSV importer, and finding that custom fields "appear but with no values or types visible" on the edit screen.

The fix

Importers now set the type explicitly, for example:

'secret': isSecret,
'field_type': (isSecret === 1) ? 'password' : 'text'

The edit controller repairs existing data on load:

var applyMissingCustomFieldTypes = function (credential) {
    ...
    if (field.value !== null && angular.isObject(field.value) && field.value.filename !== undefined) {
        field.field_type = 'file';
    } else {
        field.field_type = (field.secret === true || field.secret === 1 || field.secret === '1') ? 'password' : 'text';
    }
    ...
};

By the numbers

  • Repository: nextcloud/passman, 829 stars (Nov 3, 2026), JavaScript, AGPL-3.0
  • Files changed: 5
  • Lines: +29 / -8
  • Commits: 1
  • Opened: Aug 21, 2026. Merged: Aug 24, 2026. Time to merge: 2 days, 22 hours
  • Review: approved and merged by the maintainer

How the review went

The maintainer approved and merged the PR without requesting changes.

FAQ

Do I need to re-import my data?

The edit controller backfills a missing field type when a credential is opened for editing, so existing imported fields become editable without re-importing.

Where can I read more?

See the pull request and the original issue.

The goal

Fixing the writer stops new bad data, and backfilling in the reader repairs the old. Doing both closes the bug for everyone, not just new imports.

Run the loop

Turn production signals into reviewed fixes.

Start a free trial and see how Prilog maps real incidents to code-level pull requests.