Discourse assign


(Sam Saffron) #1

The discourse assign plugin allows you to assign topics (both private and public) to staff members.


Add the following line to your container, in the plugin install section

   - cd /var/www/discourse/plugins && sudo -E -u discourse git clone https://github.com/discourse/discourse-assign


Discourse assign adds a “tag like” annotation on the topic list and topic header with the username of the assigned user.

It allows you to assign topics to users and list all of the assigned topics.

Site Settings

  • assigns public : out of the box all assignments are hidden from non-staff, if you want non-staff to be able to see who owns which topic, enable this setting.

  • unassign creates tracking post: out of the box when you unassign a topic a post is created in the stream to keep track of the fact it was unassigned, disable to remove the tracking post

  • assigns by staff mention if you would like mentions by a staff member of another staff member to assign a topic select this

  • assign self regex if you would like to use a magic phrase to assign stuff to yourself add a regex here

  • assign other regex if you would like to restrict it so only mentions with a particular phrase are assigned to others add something here

  • assigns user url path template to path that is used as a hyperlink for any user assigned tags.

  • unassign_on_close if a topic is closed it will automatically be silently unassigned

  • unassign_on_group_archive when a message is archived unassign it, once it moves back to inbox reassign it.

Listing assigned topics

There are 2 ways of viewing assigned topics,

  • In topic list format:

    • https://sitename.com/latest?assigned=username to view all assigned topics for a user
    • https://sitename.com/latest?assigned=* to view all assigned topics for all users
    • https://sitename.com/latest?assigned=me to view all assigned to current user
    • https://sitename.com/latest?assigned=nobody to view all unassigned
  • The user page activity there is an extra assigned tab visible to staff on activity and messages tabs

Future work

  • Keyboard shortcuts
  • Add a concept of “small whisper” so assignment info posts take up less space

Thank you to McNeel for sponsoring this work!

Using discourse as a community ticket system
Task manager within Discourse?
Mark as unread or save for later
Easiest way to pull other users in on a discussion non-publicly?
Modifying Staff Roles to go beyond Administrator and Moderator?
Color of tags in header not changed by Color Scheme
Using Discourse: Tracking tasks / TODO lists?
Noob questions (polls, youtube and plugins)
(rizka) #2

I am working on plugins’ Finnish locales.

There is an admin setting that says:

Does the sentence make sense to a native English speaker? Just a “yes” or “no” is enough. I just want to make sure it’s correct. :slight_smile: I certainly didn’t understand it, but I looked at this topic and the code and I now know what the setting does. I would say “path to link all assignments for an user”.

Anyway, I sent a pull request.

(Alan Tan) #3

@sam I think we shouldn’t backfill assign for topics that have been closed/solved? Also, the user should probably be un-assigned once the topic is closed.

(Tobias Eigen) #4

This is sweet! Nice job. :lollipop:

Have you considered combining this with the solved plugin to allow filtering by open vs solved topics, for everyone and by username? That would go a long way to enabling us to dispense with a separate task tracker which we’d love to do.

(Matt Palmer) #5

Nope, it makes no sense to me (although I’m Australian, so calling me a “native English speaker” might be pushing it… maaaaaaate!)

There’s also a spelling mistake in there, too. Fun times.

(David Taylor) #6

After the work I did on discourse-solved yesterday, I don’t see any reason why this wouldn’t work:


(once the outstanding PR is merged)

(Joe Buhlig) #7

Is this a new way to install plugins or something specific to this one? I haven’t seen it done that way before.

(Sam Saffron) #8

Not new really, its ideal if you clone the repo as the discourse user as opposed to root

(Sam Saffron) #9

I corrected that and added a site setting for unassign_on_close

I also added a sophisticated setting for unassign_on_group_archive, that setting will unassign on archive but re-assign when topic goes back into inbox.

(Sam Saffron) #10

Hmm does:

"Assigned users link to the following path (use: {username} to subtitue username)"

Short of that I will need to call in the big guns and ask @codinghorror to do the copy here :slight_smile:


I think the following could be easier to understand

Path to users assigned topics (use: {username} to substitute username)”

(Erlend Sogge Heggen) #12

That one strikes me as quite odd. We frequently archive ongoing exchanges just to get it out of view and to point out that it’s up to the customer to resume the exchange. Won’t this just cause a lot “assigned/not assigned” noise?

I was thinking a better way would be to just put some identifier on archived topics in the ?assigned=username list, but I just realised we don’t show PMs there. How can I see my list of assigned PMs?

:new: feature request: Add a “Assign to me” button in the assignment modal. That way I can just do

  • Assign --> Assign to me

as opposed to

  • Assign --> click on form --> type in and enter my name --> Assign.

(Sam Saffron) #13

Nope, both assign and unassign is silent in that case

Regarding seeing assigned pms, you would use your user page

(Carlo Kok) #14

Doesn’t seem /users/me/messages/assigned shows private messages that are assigned to me.

(Sam Saffron) #15

hmmm it is working here, are you on latest … /users/sam/messages/assigned is absolutely showing latest for me.

Caveat, while I am early in dev here, always upgrade core first, I am improving core extensibility, so you usually need both core and plugin.

(Carlo Kok) #16

I am up to date (well I was this morning). Seems it does show for pure private messages, but not if they happen to include a group (like a support group).

(Sam Saffron) #17

Ahh I think I know the bug … let me fix it real quick :slight_smile:

(Sam Saffron) #18

OK, just checked in a fix (needs both core and plugin)

(Carlo Kok) #19

Works very well!

what’s the difference between:
/users/me/messages/assigned <<< shows my assigned messages
/users/me/activity/assigned <<< shows nothing when i’m logged in, shows a lot of stuff when I’m not logged in


(Sam Saffron) #20

/users/me/activity/assigned only shows assigned topics (non-messages)

I find that mixing lists of “private” messages and “publicish” topics is a recipe for disaster

showing lots of stuff is a bug will fix.