open_social icon indicating copy to clipboard operation
open_social copied to clipboard

Issue #3276240 by belatrix, Agami4, Ressinel: Out of office fields

Open belatrix22 opened this issue 2 years ago • 7 comments

Dependent of https://github.com/goalgorilla/open_social/pull/3062

Problem

As a Employee I want to set an out of office status so my colleagues could see I'm on vacation and not gonna work for some time.

Solution

Create module social_out_of_office.

To edit form of profile add block of fields called 'Out of office'. Next fields should be added:

  • start date
  • end date
  • message
  • replacement

User interface changes If today's date is between set start and end date of out of office status:

  • on profile view page in view mode 'Statistic' under profile name will appear text with message and alternative contact person
  • on page /private-message/{private_message} near user name will be a message like this 'Jame Smith is out of office from 12.03.2022 to 13.04.2022. "Hi i'm on vacation. Not gonna answer you."'
  • after creating a message on page /private-message/create if one of members is out of office there will be same status message as above
  • after creating post or comment with mentioning person who is out of office there will be same status message as above

Issue tracker

  • https://www.drupal.org/project/social/issues/3276240
  • https://getopensocial.atlassian.net/browse/SSD-11

Theme issue tracker

  • https://www.drupal.org/project/socialblue/issues/3277605
  • PR https://git.drupalcode.org/project/socialblue/-/merge_requests/85

How to test

  • [ ] Apply theme patch https://git.drupalcode.org/project/socialblue/-/merge_requests/85.diff
  • [ ] Apply changes from PR https://github.com/goalgorilla/open_social/pull/3062
  • [ ] Enable module social_out_of_office
  • [ ] Go to the user_1 profile page and fill in fields in the Out of office section
  • [ ] Go to the user_1 profile page overview and you should see Out of office info in a sidebar
  • [ ] Login by user_2
  • [ ] Create a post or comment with mentions user_1, send a private message to user_1, comment on any content where user_1 is the author, and add a reply to a comment user_1 is the owner is
  • [ ] In all the above cases you should see a status message that user_1 is out of the office

Definition of done

Before merge

  • [ ] Code/peer review is completed
  • [ ] All commit messages are clear and clean. If applicable a rebase was performed
  • [ ] All automated tests are green
  • [ ] Functional/manual tests of the acceptance criteria are approved
  • [ ] All acceptance criteria were met
  • [ ] New features or changes to existing features are covered by tests, either unit (preferably) or behat
  • [ ] Update path is tested. New hook_updates should respect update order, right naming convention and consider hook_post_update code
  • [ ] Module can be safely uninstalled. Update/implement hook_uninstall and make sure that removed configuration or dependencies are removed/uninstalled
  • [ ] This pull request has all required labels (team/type/priority)
  • [ ] This pull request has a milestone
  • [ ] This pull request has an assignee (if applicable)
  • [ ] Any front end changes are tested on all major browsers
  • [ ] New UI elements, or changes on UI elements are approved by the design team
  • [ ] New features, or feature changes are approved by the product owner

After merge

  • [ ] Code is tested on all branches that it has been cherry-picked
  • [ ] Update hook number might need adjustment, make sure they have the correct order
  • [ ] The Drupal.org ticket(s) are updated according to this pull request status

Screenshots

51d53c5b4037ec86ea3b5f4c84b93c97

Release notes

TDB

Change Record

N/A

Translations

N/A

belatrix22 avatar Apr 29 '22 10:04 belatrix22

https://git.drupalcode.org/project/socialblue/-/merge_requests/81 connected to this merge request

belatrix22 avatar Apr 29 '22 10:04 belatrix22

Hi @belatrix22 Rebase/merge the latest main branch, please.

Ressinel avatar Jul 26 '22 08:07 Ressinel

Thanks for the PR :D 🚀

Some functional feedback:

  • [x] we need a installer_options.yml file for optional modules.

  • [x] The default message when OOO does not look like design, also doesn't really seem to work when a message is set

Screenshot 2022-08-03 at 09 44 16
  • [x] Seems we can add quite some markup, for a plain message that doesn't seem logical looking at the design.
Screenshot 2022-08-03 at 09 45 53
  • [x] Validation message and small description could be improved, we can check with Jessica but something in the lines of: The maximum length for the out of office message is 240 characters.
Screenshot 2022-08-03 at 09 47 58
  • [x] Errors when mentioning someone who is OOO in a comment on a post / node, also the message it self shows "is out of office from to ."
  • [x] Also same when sending a PM
Screenshot 2022-08-03 at 09 57 57 Screenshot 2022-08-03 at 09 57 08 Screenshot 2022-08-03 at 09 56 07
  • [x] I'm missing the requirement from: https://getopensocial.atlassian.net/browse/SSD-10 - to have a switcher

  • [x] If I have a PM started, with f.e. Michelle clark, and she sets herself to away, if I open the thread, the out of office is not shown. After cache clear it is. Seems like we need to add some correct cache tags that will be cleared once a user updates their OOO.

  • [x] I can add a start date which is later than the end date, maybe some validation would be nice

Screenshot 2022-08-03 at 10 11 27

ronaldtebrake avatar Aug 03 '22 08:08 ronaldtebrake

Also just to note, the PR from socialblue is not released or added as patch, so we need to make sure that we release it correctly with this extension. I noticed this was missed when working on the acceptance environment.

ronaldtebrake avatar Aug 03 '22 09:08 ronaldtebrake

Also just to note, the PR from socialblue is not released or added as patch, so we need to make sure that we release it correctly with this extension. I noticed this was missed when working on the acceptance environment.

@ronaldtebrake I will create a patch and attach it as a file on the d.org issue. Exactly that patch we will use in a new extension. Is it acceptable for you?

Ressinel avatar Aug 03 '22 13:08 Ressinel

Also just to note, the PR from socialblue is not released or added as patch, so we need to make sure that we release it correctly with this extension. I noticed this was missed when working on the acceptance environment.

@ronaldtebrake I will create a patch and attach it as a file on the d.org issue. Exactly that patch we will use in a new extension. Is it acceptable for you?

That sounds good, just to be sure we do still have some pending feedback on the CSS so it might be the PR in socialblue needs to be updated as well 🤞

ronaldtebrake avatar Aug 03 '22 13:08 ronaldtebrake

Tugboat has finished building the preview for this pull request!

Link:

  • https://pr2912-hg3hacsniji0v4hwm3eirkldk5tyropk.tugboatqa.com

Dashboard:

  • https://dashboard.tugboatqa.com/62e7df8d7e6c3f16da88db3f

open-social-tugboat avatar Aug 05 '22 12:08 open-social-tugboat

This module will be created as an external module. So we can close this PR.

Ressinel avatar Aug 29 '22 08:08 Ressinel