`/convert_to_ticket` and `/promote_to_incident` quick actions returns a 500 error
<!--- Please read this! Before opening a new issue, make sure to search for keywords in the issues filtered by the "regression" or "type::bug" label: - https://gitlab.com/gitlab-org/gitlab/issues?label_name%5B%5D=regression - https://gitlab.com/gitlab-org/gitlab/issues?label_name%5B%5D=type::bug and verify the issue you're about to submit isn't a duplicate. ---> ### Summary When using the `/convert_to_ticket` or `/promote_to_incident` [quick actions](https://docs.gitlab.com/user/project/quick_actions/#convert_to_ticket), users are returned with a 500 error, and the issue is not converted to a Service Desk ticket. This also applies when changing a work item type via the UI. ### Steps to reproduce 1. Create a project with Service Desk enabled 2. Create an issue in the project 3. Attempt to use the `/convert_to_ticket name@domain.com` on the ticket 4. You will be returned with a 500 error Checking the [logs](https://log.gprd.gitlab.net/app/r/s/KWNt9) (internal link) I can see the below exception: ```shell no implicit conversion of Symbol into Integer ``` #### Stacktrace <details> <summary>Stacktrace</summary> ``` "activesupport (7.2.3) lib/active_support/core_ext/enumerable.rb:150:in `block in pluck'" "activesupport (7.2.3) lib/active_support/core_ext/enumerable.rb:150:in `each'" "activesupport (7.2.3) lib/active_support/core_ext/enumerable.rb:150:in `map'" "activesupport (7.2.3) lib/active_support/core_ext/enumerable.rb:150:in `pluck'" "ee/app/services/work_items/callbacks/custom_fields.rb:19:in `after_save'" "app/services/issuable_base_service.rb:387:in `each'" "app/services/issuable_base_service.rb:387:in `block in transaction_update'" "<internal:kernel>:90:in `tap'" "app/services/issuable_base_service.rb:384:in `transaction_update'" "app/services/issues/update_service.rb:126:in `transaction_update'" "ee/app/services/ee/issues/update_service.rb:131:in `transaction_update'" "ee/app/services/ee/work_items/update_service.rb:50:in `transaction_update'" "app/services/issuable_base_service.rb:343:in `block in update'" "activerecord (7.2.3) lib/active_record/transactions.rb:418:in `block (2 levels) in with_transaction_returning_status'" "activerecord (7.2.3) lib/active_record/connection_adapters/abstract/transaction.rb:616:in `block in within_new_transaction'" "activesupport (7.2.3) lib/active_support/concurrency/null_lock.rb:9:in `synchronize'" "activerecord (7.2.3) lib/active_record/connection_adapters/abstract/transaction.rb:613:in `within_new_transaction'" "activerecord (7.2.3) lib/active_record/connection_adapters/abstract/database_statements.rb:361:in `transaction'" "lib/gitlab/database/load_balancing/connection_proxy.rb:127:in `public_send'" "lib/gitlab/database/load_balancing/connection_proxy.rb:127:in `block in write_using_load_balancer'" "lib/gitlab/database/load_balancing/load_balancer.rb:141:in `block in read_write'" "lib/gitlab/database/load_balancing/load_balancer.rb:236:in `retry_with_backoff'" "lib/gitlab/database/load_balancing/load_balancer.rb:131:in `read_write'" "lib/gitlab/database/load_balancing/connection_proxy.rb:126:in `write_using_load_balancer'" "lib/gitlab/database/load_balancing/connection_proxy.rb:78:in `transaction'" "activerecord (7.2.3) lib/active_record/transactions.rb:414:in `block in with_transaction_returning_status'" "lib/gitlab/database/load_balancing/setup.rb:57:in `block in setup_connection_proxy'" "activerecord (7.2.3) lib/active_record/transactions.rb:410:in `with_transaction_returning_status'" "app/services/issuable_base_service.rb:334:in `update'" "app/services/issues/update_service.rb:27:in `update'" "app/services/issues/update_service.rb:21:in `execute'" "ee/app/services/ee/issues/update_service.rb:23:in `execute'" "app/services/work_items/update_service.rb:17:in `execute'" "ee/app/services/ee/work_items/update_service.rb:15:in `execute'" "app/services/issues/convert_to_ticket_service.rb:41:in `update_target'" "app/services/issues/convert_to_ticket_service.rb:20:in `execute'" "lib/gitlab/quick_actions/issue_actions.rb:284:in `block (2 levels) in <module:IssueActions>'" "lib/gitlab/quick_actions/command_definition.rb:150:in `instance_exec'" "lib/gitlab/quick_actions/command_definition.rb:150:in `execute_block'" "lib/gitlab/quick_actions/command_definition.rb:74:in `execute'" "app/services/quick_actions/interpret_service.rb:229:in `block in extract_updates'" "app/services/quick_actions/interpret_service.rb:225:in `each'" "app/services/quick_actions/interpret_service.rb:225:in `extract_updates'" "app/services/quick_actions/interpret_service.rb:51:in `execute'" "ee/app/services/ee/quick_actions/interpret_service.rb:22:in `execute'" "app/services/quick_actions/interpret_service.rb:59:in `execute_with_original_text'" "app/services/notes/quick_actions_service.rb:46:in `execute'" "app/services/notes/create_service.rb:74:in `execute_quick_actions'" "app/services/notes/create_service.rb:26:in `execute'" "app/graphql/mutations/notes/create/base.rb:34:in `resolve'" ``` </details> ### Example Project ### What is the current *bug* behavior? `/convert_to_ticket` quick action does not work currently, and returns a 500 error. ### What is the expected *correct* behavior? `/convert_to_ticket` quick action should convert an issue to a Service Desk ticket. ### Relevant logs and/or screenshots ![image](/uploads/a72f5e8364435e22887a367915df36f8/image.png){width=900 height=582} ### Output of checks <!-- If you are reporting a bug on GitLab.com, uncomment below --> This bug happens on GitLab.com <!-- and uncomment below if you have /label privileges --> <!-- or follow up with an issue comment of `@gitlab-bot label ~"reproduced on GitLab.com"` if you do not --> #### Results of GitLab environment info <!-- Input any relevant GitLab environment information if needed. --> <details> <summary>Expand for output related to GitLab environment info</summary> <pre> (For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`) </pre> </details> #### Results of GitLab application Check <!-- Input any relevant GitLab application check information if needed. --> <details> <summary>Expand for output related to the GitLab application check</summary> <pre> (For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:check SANITIZE=true`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true`) (we will only investigate if the tests are passing) </pre> </details> ### Possible Workarounds If you are on GitLab.com, you can use the [/add_email](https://docs.gitlab.com/user/project/quick_actions/#add_email) quick action to add an external participant to the issue. The work item type will **remain as an Issue** with this approach. If you are on Self-Managed: - If you are on 18.10 or newer, you can use the [/add_email](https://docs.gitlab.com/user/project/quick_actions/#add_email) quick action to add an external participant to the issue. The work item type will **remain as an Issue** with this approach. - If you are on 13.8 to 18.9, you can opt to enable the `issue_email_participants` [feature flag](https://docs.gitlab.com/administration/feature_flags/). - **Note:** please be aware of the [risks of enabling features in development behind feature flags](https://docs.gitlab.com/administration/feature_flags/#risks-when-enabling-features-still-in-development) and the [support for features in different stages of development](https://docs.gitlab.com/policy/development_stages_support/). If you are on GitLab Dedicated, when your instance is upgraded to 18.10, you can use the [/add_email](https://docs.gitlab.com/user/project/quick_actions/#add_email) quick action to add an external participant to the issue. The work item type will **remain as an Issue** with this approach. ### Possible fixes <!-- If you can, link to the line of code that might be responsible for the problem. --> ### Patch release information for backports If the bug fix needs to be backported in a [patch release](https://handbook.gitlab.com/handbook/engineering/releases/patch-releases) to a version under [the maintenance policy](https://docs.gitlab.com/policy/maintenance/), please follow the steps on the [patch release runbook for GitLab engineers](https://gitlab.com/gitlab-org/release/docs/-/blob/master/general/patch/engineers.md). Refer to the [internal "Release Information" dashboard](https://dashboards.gitlab.net/d/delivery-release_info/delivery3a-release-information?orgId=1) for information about the next patch release, including the targeted versions, expected release date, and current status. #### High-severity bug remediation To remediate high-severity issues requiring an [internal release](https://handbook.gitlab.com/handbook/engineering/releases/internal-releases/) for single-tenant SaaS instances, refer to the [internal release process for engineers](https://gitlab.com/gitlab-org/release/docs/-/blob/master/general/internal-releases/engineers.md?ref_type=heads). <!-- If you don't have /label privileges, follow up with an issue comment of `@gitlab-bot label ~"type::bug"` -->
issue