# Tickets 插件 🎟

**URL:** https://meta.discourse.org/t/tickets-plugin/97914
**Category:** Plugin
**Tags:** pavilion
**Created:** [2018年九月24日 07:57 UTC](https://meta.discourse.org/t/tickets-plugin/97914 "2018-09-24T07:57:31Z")
**Posts on this page:** 20
**Page:** 9

<div class="post-metadata">

### Author: ![robbyoconnor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/robbyoconnor/32/120330_2.png) [@robbyoconnor](https://meta.discourse.org/u/robbyoconnor)
#### Post date: [2022年四月29日 03:47 UTC](https://meta.discourse.org/t/tickets-plugin/97914/168 "2022-04-29T03:47:42Z")

</div>

标签过滤似乎给我带来了一个问题。如果这很重要的话，我在 [bb019aab5d](https://github.com/discourse/discourse/commits/bb019aab5d7c4947af35597e87d13f4d4e34cbf6)。堆栈跟踪如下。

> NoMethodError (undefined method `id' for #<Array:0x00007f2c08ca79f8>) app/controllers/tags_controller.rb:249:in `search’  
> app/controllers/application\_controller.rb:404:in `block in with_resolved_locale' app/controllers/application_controller.rb:404:in `with\_resolved\_locale’  
> lib/middleware/omniauth\_bypass\_middleware.rb:71:in `call' lib/content_security_policy/middleware.rb:12:in `call’  
> lib/middleware/anonymous\_cache.rb:368:in `call' config/initializers/100-quiet_logger.rb:23:in `call’  
> config/initializers/100-silence\_logger.rb:31:in `call' lib/middleware/enforce_hostname.rb:23:in `call’  
> lib/middleware/request\_tracker.rb:202:in `call’

> Backtrace

> plugins/discourse-tickets/plugin.rb:47:in `block in filter_allowed_tags' plugins/discourse-tickets/plugin.rb:47:in `select’  
> plugins/discourse-tickets/plugin.rb:47:in `filter_allowed_tags' app/controllers/tags_controller.rb:249:in `search’  
> actionpack (6.1.4.7) lib/action\_controller/metal/basic\_implicit\_render.rb:6:in `send_action' actionpack (6.1.4.7) lib/abstract_controller/base.rb:228:in `process\_action’  
> actionpack (6.1.4.7) lib/action\_controller/metal/rendering.rb:30:in `process_action' actionpack (6.1.4.7) lib/abstract_controller/callbacks.rb:42:in `block in process\_action’  
> activesupport (6.1.4.7) lib/active\_support/callbacks.rb:117:in `block in run_callbacks' app/controllers/application_controller.rb:404:in `block in with\_resolved\_locale’

> Env

> HTTP HOSTS: [forums.librehealth.io](http://forums.librehealth.io)

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [2022年四月29日 08:11 UTC](https://meta.discourse.org/t/tickets-plugin/97914/169 "2022-04-29T08:11:11Z")

</div>

Tickets 插件已报告一个问题，不幸的是，它目前被标记为 #plugin:broken-plugin。如果从 app.yml 中移除该插件并重新构建，应该可以使网站的其余部分正常使用标签。

（我已将这些帖子移至 Tickets 主题，以便更好地跟踪此问题 👍）

---

<div class="post-metadata">

### Author: ![robbyoconnor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/robbyoconnor/32/120330_2.png) [@robbyoconnor](https://meta.discourse.org/u/robbyoconnor)
#### Post date: [2022年四月29日 17:16 UTC](https://meta.discourse.org/t/tickets-plugin/97914/170 "2022-04-29T17:16:52Z")

</div>

@JammyDodger 我完全错过了——谢谢！

---

<div class="post-metadata">

### Author: ![Nick\_Chomey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nick_chomey/32/215378_2.png) [@Nick\_Chomey](https://meta.discourse.org/u/Nick_Chomey)
#### Post date: [2022年四月29日 17:53 UTC](https://meta.discourse.org/t/tickets-plugin/97914/171 "2022-04-29T17:53:54Z")

</div>

看到它被搁置真是令人失望——这肯定花费了大量心血，并且潜力巨大！我希望它将来能被重新启动……

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [2022年四月29日 18:32 UTC](https://meta.discourse.org/t/tickets-plugin/97914/172 "2022-04-29T18:32:33Z")

</div>

在讨论将 #plugin:broken-plugin 移至该主题时

> [@angus](#):
>
> 这将激励我修复它。

---

<div class="post-metadata">

### Author: ![jerry0](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jerry0/32/94523_2.png) [@jerry0](https://meta.discourse.org/u/jerry0)
#### Post date: [2022年五月4日 11:05 UTC](https://meta.discourse.org/t/tickets-plugin/97914/173 "2022-05-04T11:05:31Z")

</div>

我也发现了 TIckets 插件的问题，在尝试为任何 PM 添加标签时会导致“内部服务器错误”，已禁用该插件，恢复正常。

错误日志：

```plaintext
plugins/discourse-tickets/plugin.rb:47:in `block in filter_allowed_tags'

plugins/discourse-tickets/plugin.rb:47:in `select'

plugins/discourse-tickets/plugin.rb:47:in `filter_allowed_tags'

app/controllers/tags_controller.rb:249:in `search'

actionpack (7.0.2.4) lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'

actionpack (7.0.2.4) lib/abstract_controller/base.rb:214:in `process_action'

actionpack (7.0.2.4) lib/action_controller/metal/rendering.rb:53:in `process_action'

actionpack (7.0.2.4) lib/abstract_controller/callbacks.rb:234:in `block in process_action'

activesupport (7.0.2.4) lib/active_support/callbacks.rb:118:in `block in run_callbacks'

app/controllers/application_controller.rb:404:in `block in with_resolved_locale'

i18n (1.10.0) lib/i18n.rb:328:in `with_locale'

app/controllers/application_controller.rb:404:in `with_resolved_locale'

activesupport (7.0.2.4) lib/active_support/callbacks.rb:127:in `block in run_callbacks'

```

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [2022年五月6日 10:44 UTC](https://meta.discourse.org/t/tickets-plugin/97914/174 "2022-05-06T10:44:12Z")

</div>

@robbyoconnor @Nick_Chomey @jerry0 我已经推送了修复该插件问题的补丁

> <https://github.com/paviliondev/discourse-tickets/commit/8ab93ea507f941fce2b3b49d65266ab36877c194>
>
> See https://github.com/discourse/discourse/commit/e5fb884695f0aeac6269a0d48f74c8…e8c060446c

如果你们中的某位能够更新并回复确认修复，我会将这个插件移回 #Customization > Plugin 频道。

---

<div class="post-metadata">

### Author: ![Nick\_Chomey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nick_chomey/32/215378_2.png) [@Nick\_Chomey](https://meta.discourse.org/u/Nick_Chomey)
#### Post date: [2022年五月6日 13:02 UTC](https://meta.discourse.org/t/tickets-plugin/97914/175 "2022-05-06T13:02:44Z")

</div>

我很快就会测试它并汇报。

---

<div class="post-metadata">

### Author: ![Nick\_Chomey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nick_chomey/32/215378_2.png) [@Nick\_Chomey](https://meta.discourse.org/u/Nick_Chomey)
#### Post date: [2022年五月6日 18:44 UTC](https://meta.discourse.org/t/tickets-plugin/97914/176 "2022-05-06T18:44:39Z")

</div>

@angus

非常感谢您为此付出的努力！我真心希望它能尽快完成！

我已经进行了一些基本测试，它仍然存在我[在此处报告](https://meta.discourse.org/t/tickets-plugin/97914/158?u=nick_chomey)的大部分问题。

我不再收到“抱歉，发生错误”的弹出错误消息，但单击“Tickets”模块中的“Assign”按钮（在标签的右侧）没有任何反应，并且会产生之前在屏幕录像中显示的相同控制台错误。

我可以使用主题下方的“Assign”按钮分配一个主题，但“Tickets”和“Assign”似乎仍然没有相互通信。“Tickets Dashboard”中的“Assigned”列没有填充。

另外，我希望您在查看此问题时，也能关注一下许多人提出的请求——允许“Staff”以外的组使用“Tickets”。我稍微查看了一下代码，注意到有几个地方写着类似 `currentUser.staff`、`is_staff` 等。所以我猜想，要么

1. 放宽/删除该规定，
2. 添加另一个用户组（例如 TicketsTeam），我们可以自己创建和定义，或者
3. 在“Tickets”设置中添加某种自定义机制，允许我们定义哪些组可以访问“Tickets”。

显然 3 \> 2 \> 1，但无论您倾向于哪种方式，都将不胜感激！我也认为这将使“Tickets”更具广泛吸引力，从而使您之前的辛勤工作更有价值。

再次感谢！

---

<div class="post-metadata">

### Author: ![jerry0](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jerry0/32/94523_2.png) [@jerry0](https://meta.discourse.org/u/jerry0)
#### Post date: [2022年五月8日 12:19 UTC](https://meta.discourse.org/t/tickets-plugin/97914/177 "2022-05-08T12:19:30Z")

</div>

> [@angus](#):
>
> 如果你们中有人能更新并回复确认修复，我会把这个插件移回 #Customization > Plugin 板块。

你好 @angus —— 是的，这确实解决了标签的问题。

不过，我仍然认为这个插件是损坏的，因为它与 Assigned 插件的交互功能完全失效了。@Nick_Chomey 和我已经报告了这个问题，并且几个月来一直单独联系 Pavilion 寻求支持，但始终没有得到任何有用的回应。现在连工单分配给了谁都无法显示，这是一个相当严重的问题。

 ![image](https://global.discourse-cdn.com/meta/original/4X/5/7/d/57d4ad921ed3c2defed38c09d0af486853a3f396.png)

谢谢，希望这个问题还能得到修复。

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [2022年五月9日 09:18 UTC](https://meta.discourse.org/t/tickets-plugin/97914/178 "2022-05-09T09:18:54Z")

</div>

@Nick_Chomey @jerry0 我已更新此插件以支持 assign 插件的变更。

> <https://github.com/paviliondev/discourse-tickets/commit/619237348c1e370ca08e081eea14554d0121c9dc>

> [@jerry0](#):
>
> 我和 @Nick_Chomey 都已多次报告此问题（并单独联系 Pavilion 数月，但未收到任何有用的回复）

抱歉，如果我们错过了您的消息！您是如何尝试联系我们的？您是否[提交了错误报告](https://thepavilion.io/w/bug-report)（我没有看到关于 tickets 插件的任何报告）？您是否在某个地方给我发了消息？或者您是指本主题中您之前的帖子？

鉴于标签问题已确认修复，且我已解决了 assign 集成问题，我将把此话题移回 #customization:plugin。

---

<div class="post-metadata">

### Author: ![jerry0](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jerry0/32/94523_2.png) [@jerry0](https://meta.discourse.org/u/jerry0)
#### Post date: [2022年五月9日 09:26 UTC](https://meta.discourse.org/t/tickets-plugin/97914/179 "2022-05-09T09:26:56Z")

</div>

> [@angus](#):
>
> 抱歉，我们可能错过了您的消息！您是如何尝试联系我们的？

你好 Angus - 我非常感谢你为此付出的努力。这太棒了！！！（并且回答你的问题，我按照你在上面[你的帖子](https://meta.discourse.org/t/tickets-plugin/97914/157?u=jerry0)中的建议，给 @ellibereth 发了几次私信）。抱歉，我没有提交bug报告，但以后会注意的！！

---

<div class="post-metadata">

### Author: ![Nick\_Chomey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nick_chomey/32/215378_2.png) [@Nick\_Chomey](https://meta.discourse.org/u/Nick_Chomey)
#### Post date: [2022年五月9日 14:26 UTC](https://meta.discourse.org/t/tickets-plugin/97914/180 "2022-05-09T14:26:36Z")

</div>

@angus 感谢您为此付出的额外努力。当我访问 `site.com/admin/tickets` 时，我收到此错误：

 ![image](https://global.discourse-cdn.com/meta/original/4X/6/0/0/600210e00f4f3553607dd5527a707c0636c02386.png)

如果我勾选“将用户分配的路由重定向到工单仪表板”，该错误就会消失。

另外，我认为 @jerry0 指的是我们在过去 6 个月里在这里发布的各种标记回复……我认为那些已经足够了，因为您和您的团队已经多次承认了这些问题……

如果这里有一个非员工可以访问的工单机制，那么一群不相关的人就可以轻松地跟踪和管理公共任务…… 😉

对于像 Discourse 这样通常运行的去中心化社区来说，这是_ **非常** _需要的东西。使用单独的项目管理工具（站外摩擦、成本和过度杀伤）没有意义，并非所有问题都值得在 Github 上创建/跟踪（站外摩擦、非代码相关问题/任务等……），而且，显然，这样的任务需要的不仅仅是一个主题类别（因此有了这个插件）。

已经可以使用 Assign Plugin 将主题分配给非员工（例如特定组内的人员）——将其功能/访问权限扩展到 Tickets 插件似乎是自然而然的（而且，我怀疑，并不难）。我自己会做的，但我真的不知道 Discourse 开发是如何工作的……我需要几天时间才能弄清楚。

所以，我_ **真的** _希望您能快速查看一下我[之前的帖子](https://meta.discourse.org/t/tickets-plugin/97914/176?u=nick_chomey)中建议的修改 Tickets 的方法之一。关于这一点最后的想法——考虑到非员工无法访问 `site.com/admin`，也许工单仪表板可以/应该移至用户仪表板，就像分配仪表板一样，例如 `site.com/u/[username]/activity/tickets`。

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [2022年五月9日 14:58 UTC](https://meta.discourse.org/t/tickets-plugin/97914/181 "2022-05-09T14:58:50Z")

</div>

> [@Nick\_Chomey](#):
>
> I get this error when I go to `site.com/admin/tickets`  
> …  
> It goes away if I check `Redirect user assigned routes to ticket dashboard` .

所以，我只是想确认一下，如果启用了“门票重定向分配”，那么所有内容（包括分配集成）是否都按预期工作？我明天会查看问题本身。

> [@Nick\_Chomey](#):
>
> I poked around in the code a bit and noticed a few places where it says things like `currentUser.staff` , `is_staff` etc… So I’m guessing that it wouldn’t be too difficult to either
> 
> 1. relax/remove that stipulation,
> 2. add another userGroup (e.g. TicketsTeam) that we could create and define ourselves, or
> 3. add some sort of customization mechanism in the Tickets settings that allows us to define which groups have access to Tickets.

是的，我们可以考虑添加这个，但插件在添加此功能之前需要单元测试，所以这至少要几个月后才能实现。这个插件最需要解决的问题是加强现有功能，以便在出现兼容性问题（如最近的标签问题）时更容易解决。

这个插件之所以没有得到更多的关注，主要是因为我们时间不够。但你可以帮助我们解决这个问题。找一个有 Ruby on Rails 和 JavaScript 经验的开发者，或者愿意学习的开发者，让他们与我联系，我将作为这个插件的维护者指导他们。正如俗话所说，我总是愿意授人以渔。

> [@Nick\_Chomey](#):
>
> I poked around in the code a bit and noticed a few places where it says things like `currentUser.staff` , `is_staff` etc… So I’m guessing that it wouldn’t be too difficult to either

你是开发者吗？我很乐意帮助你开始 Discourse 开发，这样你就可以接管这个插件。从这里开始，一旦你完成了，我将为你安排一些涉及 Tickets Plugin 的入门任务。

> [@Learn how to start building stuff for Discourse if you're newbie (like myself)](https://meta.discourse.org/t/how-to-start-building-stuff-for-discourse-if-youre-newbie-like-myself/45954):
>
> There are a few ‘how to start’ guides for working with Discourse already and a wealth of useful info on meta, but I thought it might help to give an insight to the mental processes of starting from little, if any, prior coding experience to building substantial Discourse plugins. Discourse is written by experienced developers and has a large codebase. This can feel intimidating. This intimidation factor can be a significant barrier for novice developers. This is a kind of ‘psychological primer’…

> [@Learn how to build Discourse plugins by helping me](https://meta.discourse.org/t/learn-how-to-build-discourse-plugins-by-helping-me/87048?u=angus):
>
> If anyone wants to learn more about building Discourse plugins or just about Ruby on Rails and Ember.js, here’s a standing offer. I can train you, providing detailed personal direction on how to code; how Discourse works; how to think about your users; and how to think about product design in exchange for you working on tasks on the current task list for any of [my plugins](https://meta.discourse.org/u/angus/activity/topics). Why pay $5k for a General Assembly course when you can get personal coaching for free, and get the chance to work on co…

---

<div class="post-metadata">

### Author: ![Nick\_Chomey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nick_chomey/32/215378_2.png) [@Nick\_Chomey](https://meta.discourse.org/u/Nick_Chomey)
#### Post date: [2022年五月13日 02:54 UTC](https://meta.discourse.org/t/tickets-plugin/97914/182 "2022-05-13T02:54:40Z")

</div>

非常感谢您深思熟虑的回复！

我现在完全理解了，在您解释了插件需要解决的根本问题之后，我们才能继续推进。

我是一名相当新手级的“开发者”，主要专注于 WordPress（php、mysql、一点点 js），所以几个月前我很乐意接受指导，学习如何将此功能集成到插件中。但很遗憾，我现在真的没有时间了。我对 Discourse 的兴趣仅限于我为开源 CyberPanel Web 控制面板创建/迁移的新论坛。

开发者没有时间或技能/意愿进行社区管理，所以他基本上是独自一人。自从我 6 个月前介入并将所有内容——支持、文档等——迁移到 Discourse 以来，情况已经大有改善。最后一块拼图是某种工单管理系统，以便社区和开发者更好地跟踪需要完成的工作。

如果有人好奇，可以在这里查看：[https://community.cyberpanel.net/](https://community.cyberpanel.net/)

总之，我真心希望其他人能接受您慷慨的指导提议！

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [2022年五月13日 10:28 UTC](https://meta.discourse.org/t/tickets-plugin/97914/183 "2022-05-13T10:28:15Z")

</div>

既然 CyberPanel [是一家盈利性企业](https://cyberpanel.net/pricing/)，也许可以资助这项工作？ 我相信 Pavilion 会很乐意与其合作。

---

<div class="post-metadata">

### Author: ![piffy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/piffy/32/254198_2.png) [@piffy](https://meta.discourse.org/u/piffy)
#### Post date: [2022年九月7日 20:19 UTC](https://meta.discourse.org/t/tickets-plugin/97914/184 "2022-09-07T20:19:05Z")

</div>

我正在寻找一种方法来接收社区成员的反馈/建议，所有员工都可以查看，但其他非员工成员看不到。这看起来可以作为一种解决方案，但我不太清楚它在实践中是如何工作的。我的意思是用户会创建一个私信并将其标记为工单吗？

我也乐于接受关于其他适用于此目的的插件的建议。

---

<div class="post-metadata">

### Author: ![Marcell\_Csendes](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marcell_csendes/32/258562_2.png) [@Marcell\_Csendes](https://meta.discourse.org/u/Marcell_Csendes)
#### Post date: [2022年九月11日 17:02 UTC](https://meta.discourse.org/t/tickets-plugin/97914/185 "2022-09-11T17:02:03Z")

</div>

如何创建新工单？希望能有一些指南……

---

<div class="post-metadata">

### Author: ![eddie\_patently.com](https://avatars.discourse-cdn.com/v4/letter/e/bcef8e/32.png) [@eddie\_patently.com](https://meta.discourse.org/u/eddie_patently.com)
#### Post date: [2022年十一月25日 11:02 UTC](https://meta.discourse.org/t/tickets-plugin/97914/186 "2022-11-25T11:02:40Z")

</div>

在“Tickets”中，点击名为“Priority”的列标题，您期望列表按该列排序。它没有排序。它没有任何效果。

它将此添加到 URL：

`&order=priority`

但列表仍然是随机顺序。

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [2022年十一月25日 11:12 UTC](https://meta.discourse.org/t/tickets-plugin/97914/187 "2022-11-25T11:12:28Z")

</div>

您好，欢迎您 @eddie_patently.com 🙂

我已经将您的帖子移至 [Tickets Plugin 🎟](https://meta.discourse.org/t/tickets-plugin/97914) 主题，以便该插件的维护者了解您的问题。 👍

[上一頁](https://meta.discourse.org/t/tickets-plugin/97914.md?page=8)

[下一頁](https://meta.discourse.org/t/tickets-plugin/97914.md?page=10)
