#8285 gsoc19-c5: Add an area for user mentions notifications

v1.12.0
closed
gsoc19 (11)
General
2019-10-04
2019-05-08
No

Todo

An option to turn on/off notifications for user mentions to be added to the subscriptions tab. An endpoint can be implemented to save the user setting for sending notifications.

What is expected

Allura user can turn on/off user mention notifications. If the user has disabled the setting, notification emails will not be sent.

Related

Tickets: #8284

Discussion

    • status: open --> in-progress
     
  • Hi..

    I've added new checkbox to turn on/off user mention notifications via ss/8285. when we merge this we can update our other branch with new preference item.

    Thanks

     
    • status: in-progress --> review
     
  • Dave Brondsema

    Dave Brondsema - 2019-07-30
    • allow_umnotif and True or False is kinda confusing to me to read. How about bool(allow_umnotif) instead?
    • small grammar improvement: Send a notification via e-mail if my username is mentioned in somewhere remove "in" so it is just ... mentioned somewhere
    • we should add an audit log entry when the preference is changed (use h.auditlog_user)

    Suggestions for next steps / further work:

    • like you said - merge this branch with ss/8284 and check the preference
    • a script to update all existing users to set the notification preference (see Allura/allura/scripts/backfill_previous_login_details.py as an example of the general idea (although it accidentally has pagesize=2 that shouldn't be there).
    • default new users to have the notification preference on
    • in the notification emails, have an unsubscribe link that goes to the subscriptions page and the preference form
     
  • Dave Brondsema

    Dave Brondsema - 2019-07-30
    • status: review --> in-progress
     
  • Hi.. Updated ss/8285 with suggested improvements. Meanwhile you review I will continue with next steps in other branch (ss/8284) and other followup tasks

     
  • Hi.. @brondsem is there any modifications further? Can I continue and merge with 8284?

    Thanks

     
  • Dave Brondsema

    Dave Brondsema - 2019-08-05

    ss/8285 looks fine

     
    👍
    1
  • Hi.. @brondsem next steps 1,2 and 3 done and upated ss/8285.

    Regarding 4
    We can easily add id to notification title
    <h2 id="notifcations">User notifications</h2>
    and change email's link to <link>#notifications it works properly when user is already logged. but when user is not logged # part is gone because # is not supported in query params. I tried %23 instead but didn't work.

    Do you have idea to solve this?

    Thanks

     
    • Dave Brondsema

      Dave Brondsema - 2019-08-06

      I think linking to #notifications is good enough. If they aren't logged in, and that part gets dropped its ok. Because I can't think of an obvious way to make that work.

       
      👍
      1
    • Dave Brondsema

      Dave Brondsema - 2019-08-07

      And changes for steps 1, 2 and 3 look good.

       
      👍
      1
  • Hi...
    Item 4 also added to ss/8285

    Thanks

     
    • status: in-progress --> review
     
  • Dave Brondsema

    Dave Brondsema - 2019-08-08

    Looks good, I've merged this and will close [#8284] also. What are you working on next then? This is the last of the tickets you initially made, but I'm thinking there should be some test coverage for this latest functionality added. Your project proposal also mentions documentation and formatting guide updates. Also I think [#8293] would be pretty nice.

     
    👍
    1

    Related

    Tickets: #8284
    Tickets: #8293

  • Dave Brondsema

    Dave Brondsema - 2019-08-08
    • status: review --> closed
     
  • Hi.. @brondsem

    I was recently checking [#8294] but it looks tricky because sounds it needs custom code mirror mode to add custom tokens and in our case we need to add custom token to existing mode. (gfm). If there is hard approach to do it we may check that in future

    Yeah formatting guide, feature blog post needs to be updated/created

    Could u advice for which part tests are required. As I can remember for some required parts I have added tests.

    Meanwhile I will check [#8293]

    Thanks

     

    Related

    Tickets: #8293
    Tickets: #8294

    • Dave Brondsema

      Dave Brondsema - 2019-08-12

      I agree [#8294] will be too much work for now.

      The recent tickets had test coverage for setting the preference. But no tests for the sending the notification. Can you add a test for the send_usermentions_notification task? I also am remembering now that the send_usermentions_notification task is only called in a few places so far, but would be good to do in all the places where a new artifact is created (new wiki page, new ticket, new blog post, new merge request). Maybe a new ticket for all that together.

       

      Related

      Tickets: #8294

  • Dave Brondsema

    Dave Brondsema - 2019-10-04
    • Milestone: unreleased --> v1.12.0
     

Log in to post a comment.