{"record":{"id":"ec557a37be88a308","repo":"instructure/canvas-lms","slug":"no-status-given-for-institutional-tag-category-sis-id","errorCode":null,"errorMessage":"No status given for institutional tag category #{sis_id}","messagePattern":"No status given for institutional tag category #(.+?)","errorType":"exception","errorClass":"ImportError","httpStatus":null,"severity":"error","filePath":"lib/sis/institutional_tag_category_importer.rb","lineNumber":44,"sourceCode":"      SisBatchRollBackData.bulk_insert_roll_back_data(importer.roll_back_data)\n      importer.success_count\n    end\n\n    class Work\n      attr_accessor :success_count, :roll_back_data\n\n      def initialize(batch, root_account, logger)\n        @batch = batch\n        @root_account = root_account\n        @logger = logger\n        @success_count = 0\n        @roll_back_data = []\n      end\n\n      def add_institutional_tag_category(sis_id, name, description, status)\n        raise ImportError, \"No category_id given for an institutional tag category\" if sis_id.blank?\n        raise ImportError, \"No name given for institutional tag category #{sis_id}\" if name.blank?\n        raise ImportError, \"No status given for institutional tag category #{sis_id}\" if status.blank?\n        raise ImportError, \"Improper status \\\"#{status}\\\" for institutional tag category #{sis_id}\" unless /\\A(active|deleted)/i.match?(status)\n        return if @batch.skip_deletes? && /deleted/i.match?(status)\n\n        category = InstitutionalTagCategory.find_by(root_account_id: @root_account.id, sis_source_id: sis_id)\n        category ||= InstitutionalTagCategory.new(account: @root_account,\n                                                  root_account: @root_account,\n                                                  sis_source_id: sis_id)\n\n        category.name = name\n        category.description = description\n        category.sis_batch_id = @batch.id\n        category.workflow_state = /deleted/i.match?(status) ? \"deleted\" : \"active\"\n\n        if category.save\n          data = SisBatchRollBackData.build_data(sis_batch: @batch, context: category)\n          @roll_back_data << data if data\n          @success_count += 1\n          maybe_write_roll_back_data","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/instructure/canvas-lms/blob/1c9f0bb8013ed69c4f2efe11fd483025469b7e6c/lib/sis/institutional_tag_category_importer.rb#L26-L62","documentation":"Raised by SisImports::InstitutionalTagCategoryImporter#add_institutional_tag_category when the status argument is blank. Status is required for institutional tag categories because it controls whether the record is created/updated (active) or soft-deleted; the importer refuses rows without it before any database lookup.","triggerScenarios":"Calling add_institutional_tag_category(sis_id, name, description, nil) or with '' for status; a CSV row in the institutional_tag_categories file with an empty status cell; a broken column mapping that drops the status value.","commonSituations":"Export pipelines that omit status for unchanged rows; CSVs trimmed or transformed by another tool that strips trailing empty columns; template drift where status was renamed so the import reads an absent header.","solutions":["Fill in the status cell ('active' or 'deleted') for the row whose sis_id appears in the message.","Verify the CSV header names and column order match the current SIS institutional tag category spec.","If the exporter omits status, default it to 'active' for new/updated rows before import.","Re-run the SIS import."],"exampleFix":"// before\nadd_institutional_tag_category('cat-1', 'Department Tags', 'desc', '')\n// after\nadd_institutional_tag_category('cat-1', 'Department Tags', 'desc', 'active')","handlingStrategy":"validation","validationCode":"raise ArgumentError, 'status is required' if status.blank?\nadd_institutional_tag_category(sis_id, name, description, status)","typeGuard":null,"tryCatchPattern":"begin\n  importer.add_institutional_tag_category(sis_id, name, description, status)\nrescue SisImports::ImportError => e\n  Rails.logger.warn(\"Skipping category #{sis_id}: #{e.message}\")\nend","preventionTips":["Never emit rows with an empty status column; default to 'active'.","Verify CSV headers against the current SIS spec after every exporter change.","Check for tools that strip trailing empty CSV columns."],"tags":["sis-import","validation","missing-field","ruby"],"backgroundTag":"empty-required-field","analyzedSha":"1c9f0bb8013ed69c4f2efe11fd483025469b7e6c","analyzedAt":"2026-09-15T20:33:18.891Z","contentChangedAt":"2026-09-15T20:33:18.891Z","schemaVersion":2},"datasetVersion":"2026-09-23T02:17:17.105Z"}