{"record":{"id":"cb56a6210698910a","repo":"instructure/canvas-lms","slug":"no-status-given-for-institutional-tag-tag-id","errorCode":null,"errorMessage":"No status given for institutional tag #{tag_id}","messagePattern":"No status given for institutional tag #(.+?)","errorType":"exception","errorClass":"ImportError","httpStatus":null,"severity":"error","filePath":"lib/sis/institutional_tag_importer.rb","lineNumber":47,"sourceCode":"\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        @categories_cache = {}\n      end\n\n      def add_institutional_tag(tag_id, category_id, name, description, status)\n        raise ImportError, \"No institutional_tag_id given for an institutional tag\" if tag_id.blank?\n        raise ImportError, \"No category_id given for institutional tag #{tag_id}\" if category_id.blank?\n        raise ImportError, \"No name given for institutional tag #{tag_id}\" if name.blank?\n        raise ImportError, \"No description given for institutional tag #{tag_id}\" if description.blank?\n        raise ImportError, \"No status given for institutional tag #{tag_id}\" if status.blank?\n        raise ImportError, \"Improper status \\\"#{status}\\\" for institutional tag #{tag_id}\" unless /\\A(active|deleted)/i.match?(status)\n        return if @batch.skip_deletes? && /deleted/i.match?(status)\n\n        category = @categories_cache[category_id]\n        category ||= InstitutionalTagCategory.find_by(root_account_id: @root_account.id, sis_source_id: category_id)\n        raise ImportError, \"Category with id \\\"#{category_id}\\\" didn't exist for institutional tag #{tag_id}\" unless category\n\n        @categories_cache[category_id] = category\n\n        tag = InstitutionalTag.find_by(root_account_id: @root_account.id, sis_source_id: tag_id)\n        tag ||= InstitutionalTag.new(category:,\n                                     root_account: @root_account,\n                                     sis_source_id: tag_id)\n\n        tag.name = name\n        tag.description = description\n        tag.sis_batch_id = @batch.id\n        tag.workflow_state = /deleted/i.match?(status) ? \"deleted\" : \"active\"","sourceCodeStart":29,"sourceCodeEnd":65,"githubUrl":"https://github.com/instructure/canvas-lms/blob/1c9f0bb8013ed69c4f2efe11fd483025469b7e6c/lib/sis/institutional_tag_importer.rb#L29-L65","documentation":"Validation guard in InstitutionalTagImporter::Work#add_institutional_tag raised when the status argument is blank. Status drives create/update/delete workflow state, so a blank status leaves the row indeterminable and it is rejected.","triggerScenarios":"Thrown at lib/sis/institutional_tag_importer.rb:47 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Include status (active/deleted) on each tag row","Fix and re-import the batch"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}