View Issue Details

IDProjectCategoryView StatusLast Update
0011080mantisbtadministrationpublic2017-10-12 00:42
ReporteratrolAssigned To 
PrioritynormalSeverityfeatureReproducibilityhave not tried
Status acknowledgedResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0011080: Add a feature to reflect that a user is absent
Description

Suggestion: provide a "I am absent" check box in "My account" page

When someone wants to assign absent user this should be marked in a special way.
I suggest something like "(absent)" behind the name of the person.
Furthermore, if someone assigns absent users, this should generate mail to him.

When user logs in and is marked absent, he should be remembered that he is marked absent.

Luxury:
Not only checkbox for absence but also startdate and enddate of absence

TagsNo tags attached.

Relationships

has duplicate 0015339 closeddregad When a developer goes on Holiday... 
related to 0011178 acknowledged Provide ability to set up delegation of users 

Activities

JeromyK

JeromyK

2012-04-10 06:39

reporter   ~0031624

kick

This would be very helpful, because a the moment we just give the order to the users to manually "accept" the ticket, so the reporter has a feedback. Otherwise he donĀ“t know, if the ticket was even read.

cas

cas

2013-01-02 11:01

reporter   ~0034667

Last edited: 2013-01-02 17:34

View 2 revisions

as described in 0015339, this could be handled by the same plugin.
Currently there are not too many events available within user management but that is easy to address.

dregad

dregad

2013-01-02 17:35

developer   ~0034679

cas, if you feel like writing a plugin and need new events, feel free to request them (preferably with pull request or unified diff)

cas

cas

2013-01-03 08:03

reporter   ~0034689

Since we can use this functionality too, i will create the plugin. For the additional events I will supply an unified diff.

Hope to realize this plugin somewhere this month.

cas

cas

2013-01-04 06:35

reporter  

Holidays090.zip (5,020 bytes)
cas

cas

2013-01-04 06:35

reporter   ~0034697

attached an initial version,please test

dregad

dregad

2013-01-04 18:29

developer   ~0034702

That was a short month ;-)

Preliminary note: I have not actually tested the plugin itself, just took a quick look at with specific focus on the new events.

Some comments:

  • for consistency with existing events, I think the new ones would be better called EVENT_ACCOUNT_UPDATE_FORM and EVENT_ACCOUNT_DELETED
  • the formal definition for new events seems to be missing from your submission / documentation (-> changes to events_inc.php ?)
  • again for consistency, I think the "admin" account pages should issue the event signals as well
  • On the plugin's schema
    • I assume that user_id is a foreign key, and as such it seems strange that it should be autoincrement.
    • Similarly, user_backup is definitely a FK, so I suggest to name it backup_user_id instead.
    • If absent is just a yes/no flag, it should probably be defined as boolean (type 'L')

While we're at it, I think it may make sense to add a few additional events to MantisBT core to provide a more comprehensive set of hook points for future plugins revolving around user accounts management (e.g. creation, update, etc).

That's it for now.

cas

cas

2013-01-05 04:49

reporter   ~0034704

well it is not finished yet..........
For the events, I will rename them in order to follow convention.
As for the formal definition of new events, I decided to wait till i got all comments. For now, testers should just add the events manual and verify functionality. I will create the diff's with winmerge unless you suggest a better option (will also be testing UnxUtils).
Copying can be dangerous, user_id should not be auto_incrementing.
Will rename user_backup, that is an easy one.
Although for now absent is simply yes/no, i defined it as integer since it could be used for future additional functionality (like value 2 = absent regardless period).

cas

cas

2013-01-05 05:06

reporter  

Holidays091.zip (5,261 bytes)
cas

cas

2013-01-05 05:09

reporter   ~0034705

Added an updated version based upon initial comments.
Please remove old plugin in full including table from database and changes to mantis scripts.

ZoTyA1975

ZoTyA1975

2013-01-05 07:55

reporter   ~0034707

Parse error: syntax error, unexpected T_STRING, expecting ']' in /var/www/clients/client0/web16/web/plugins/Holidays/Holidays.php on line 63

In line 54 change
$mail[1] = $row['backup_user];

to

$mail[1] = $row['backup_user'];

cas

cas

2013-01-05 10:13

reporter   ~0034708

Thanks for reporting, fixed in next version.

cas

cas

2013-01-06 08:06

reporter  

Holidays092.zip (7,789 bytes)
cas

cas

2013-01-06 08:10

reporter   ~0034712

Added version 0.92 including patches for mantis (excluded events_inc.php though). These can be found in the DOC directory.
Apart from reported typo, added additional option for absence (period independent), build in check on valid backup user and incorporated standard manage_user pages.
For me this is final unless issues are reported.

cas

cas

2013-01-06 08:35

reporter   ~0034713

Last edited: 2013-01-06 08:51

View 3 revisions

Think I should use a different event in manage_user pages from account_page.
Handled in updated release 0.93.

cas

cas

2013-01-06 08:50

reporter  

Holidays093.zip (8,104 bytes)
cas

cas

2013-01-08 10:01

reporter  

Holidays094.zip (8,126 bytes)
cas

cas

2013-01-08 10:02

reporter   ~0034737

Last edited: 2013-01-08 11:03

View 2 revisions

A slight change in lay-out of the form used to define once holiday.
Currently awaiting feedback in order to make a final release (1.00)

yany

yany

2013-01-08 10:16

reporter   ~0034739

Unfortunately I can't test patches on our instance of Mantis (it's under heavy use and could cause troubles if something goes wrong with a patch), but I'm eagerly awaiting this feature in a release. Is there a target version for this feature?

dregad

dregad

2013-01-08 10:16

developer   ~0034740

I'll try to have a look later this week if I can manage

cas

cas

2013-01-08 11:04

reporter   ~0034742

@yany, implementing a new version seems to have more impact than applying intotal 4 patches.
As for a target version, we have to await feedback form Damien.

cas

cas

2013-01-09 06:42

reporter   ~0034744

Added a check @ system startup if user is authenticated

cas

cas

2013-01-09 06:42

reporter  

Holidays095.zip (8,192 bytes)
dregad

dregad

2013-01-09 10:35

developer   ~0034745

@yany

Unfortunately I can't test patches on our instance of Mantis

Considering that you are one of the requestors of this new feature, and it's due to your pressure that cas agreed to develop the plugin, I think it's the least you could do to actually perform some tests.

I fully understand you not wanting to do so on a Prod system, but it should not be too difficult to copy the DB and setup a test instance where you can play without disruption to normal activity, no ?

cas

cas

2013-01-09 11:04

reporter   ~0034747

I have moved this into our production environment.
Only comment sofar is that initial value of the dates is 1970.
This I have already addressed, it will be an empty field.

cas

cas

2013-01-14 09:10

reporter   ~0034789

Adjusted the update routine in case no dates are needed.

atrol

atrol

2013-01-14 17:08

developer   ~0034792

Last edited: 2013-01-14 17:09

View 2 revisions

@cas
Did you forget to upload your latest version?
I see no new attachment which is uploaded after after note 0011080:0034789 has been posted.

cas

cas

2013-01-15 07:29

reporter   ~0034793

Was hoping to have more feedback before releasing another version.
But it is attached now.
I do have a question here.
When selecting a backup user, i show a dropdownbox with developers only but the functionality is available to all. Should i show a dropdownlist with all users or what would be the best approach here? Making the functionality available to developers only, would mean to implement this functionality project dependent or to make it available to all that have a developer role somewhere in the system. Think the last option, would be the best.
Any comments?

cas

cas

2013-01-15 07:30

reporter  

Holidays096.zip (8,331 bytes)
atrol

atrol

2013-03-19 12:24

developer  

Holidays097.zip (9,549 bytes)
cas

cas

2013-03-29 08:53

reporter   ~0035994

As far as I am concerned, this issue can be closed.

JeromyK

JeromyK

2013-07-08 04:10

reporter   ~0037423

I have tested this plugin and it works like a charm! Maybe it's possible to complete it, so it can be implemented without patching the mantis-core-files manually?

Attached you will find my german translation file and a new english_lang-file (because you missed one string)

JeromyK

JeromyK

2013-07-08 04:37

reporter   ~0037424

And there was a problem in holidy_update.php (Path to account_page.php was wrong). I just replaced the last line:

//print_header_redirect( $script );
print_header_redirect( "../../../account_page.php" . "?user_id=" . $user_id );

atrol

atrol

2013-07-08 17:12

developer   ~0037429

A bit off topic, but we shouldn't introduce new technical debt in old branches:

dregad wrote at 0011080:0034702
While we're at it, I think it may make sense to add a few additional events to MantisBT core to provide a more comprehensive set of hook points for future plugins revolving around user accounts management (e.g. creation, update, etc).

The question is: Should we go on to trigger such kind of events on UI side (e.g. account_delete.php, manage_user_delete.php)?
Wouldn't it be better to use function user_delete in core/usere_api.php?

I think we should change this also for some of the existing events as they get not triggered by bulk operations ("View Issues" page) and by the SOAP API.

@cas @JeromyK , you get some error messages when checking the language files (run admin/test_langs.php)

JeromyK

JeromyK

2013-07-09 02:45

reporter   ~0037433

I agree, that it would be better to use existing events insteed of generating new ones for the same event.
My point was a practical one: We need the functionality to set absent in mantis and I couldn't find another plugin or function for that, so I implemented this plugin and gave the changes back (for others how want to do the same).

Thanks for the hint, I will test the files with test_langs.php and upload a patched version

JeromyK

JeromyK

2013-07-09 05:23

reporter   ~0037437

I attached Holidys98.zip with new lang-files and replaced holiday_update.php

@Admin
Please delete files strings_english.txt / string_german.txt / string_german_NEW.txt

atrol

atrol

2013-07-09 07:44

developer   ~0037438

JeromyK, you can help to make cas happy by updating also doc/changelog.txt and $this->version in Holidays.php

Still hoping that cas will use https://github.com/mantisbt-plugins to share his code instead of adding .zip-Files to issues.

JeromyK

JeromyK

2013-07-09 08:19

reporter   ~0037439

Done
Please delete file Holidays098.zip and rename the new file appropriate

Topic: Github
Would be nice. I think it's to complicate for a common user the search in forum, github, Wiki and issues for plugins...

atrol

atrol

2013-07-09 10:03

developer  

Holidays098.zip (10,715 bytes)
mmyers

mmyers

2013-09-17 11:25

reporter   ~0038048

Hi there,

We installed this plugin on our 1.2.15 Mantis installation and are getting the following message on users' "My Account" page, printed out before the footer and after the "Update User" button:

event_signal( 'EVENT_ACCOUNT_UPDATE_FORM');

And no Holiday settings show up. When I login as Administrator, however, and go to "Manage Users," I can select a user and their Holiday settings show up. Can you give some tips as to why the Holiday settings don't show up when the user is trying to access them through "My Account"?

atrol

atrol

2013-09-17 14:08

developer   ~0038049

This is caused by a wrong instruction in install.txt

This section
Add the following line :
event_signal( 'EVENT_ACCOUNT_UPDATE_FORM');
Just before :
<?php # Delete Account Form BEGIN ?>

should be replaced by
Add the following line :
<?php event_signal( 'EVENT_ACCOUNT_UPDATE_FORM'); ?>
Just before :
<?php # Delete Account Form BEGIN ?>

spacomp

spacomp

2013-11-13 07:04

reporter   ~0038542

Last edited: 2013-11-13 07:05

View 2 revisions

I have tried implementing the Holiday Plugin with all the settings as instructed in the Install.txt, also incorporated with the changes as proposed in the Note

0038049 By, atrol (developer)
2013-09-17 14:08

Post configuration of this plugin, a newly registered user is getting the following ERROR, when he/she follows the link triggered by Mantis upon self registration.

APPLICATION ERROR #200

A required parameter to this page (user_id) was not found.

Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section.

helfy022

helfy022

2017-10-10 19:46

reporter   ~0057926

Hello,

We are eager to enjoy the benefits of such a plug-in in our current configuration (MantisBT version 2.5.1). Is the plug-in noted here (or a similar one) available that can provide the noted out-of-office notification functionality?

Thanks very much,
Ryan.

cas

cas

2017-10-11 09:07

reporter   ~0057938

I have this plugin available for version2 of mantis, will release here shortly

cas

cas

2017-10-11 13:20

reporter   ~0057943

Heer is the initial version of this plugin. Have a go so I can release it shortly via Github



Holidays.201.zip (8,424 bytes)

Issue History

Date Modified Username Field Change
2009-10-26 09:44 atrol New Issue
2012-04-10 06:39 JeromyK Note Added: 0031624
2013-01-02 06:33 atrol Relationship added related to 0015339
2013-01-02 11:01 cas Note Added: 0034667
2013-01-02 17:34 dregad Note Edited: 0034667 View Revisions
2013-01-02 17:35 dregad Note Added: 0034679
2013-01-02 17:36 dregad Severity minor => feature
2013-01-02 17:36 dregad Status new => acknowledged
2013-01-02 17:36 dregad Category feature => administration
2013-01-03 08:03 cas Note Added: 0034689
2013-01-04 06:35 cas File Added: Holidays090.zip
2013-01-04 06:35 cas Note Added: 0034697
2013-01-04 18:29 dregad Note Added: 0034702
2013-01-05 04:49 cas Note Added: 0034704
2013-01-05 05:06 cas File Added: Holidays091.zip
2013-01-05 05:09 cas Note Added: 0034705
2013-01-05 07:55 ZoTyA1975 Note Added: 0034707
2013-01-05 10:13 cas Note Added: 0034708
2013-01-06 06:03 dregad Relationship replaced has duplicate 0015339
2013-01-06 08:06 cas File Added: Holidays092.zip
2013-01-06 08:10 cas Note Added: 0034712
2013-01-06 08:35 cas Note Added: 0034713
2013-01-06 08:50 cas File Added: Holidays093.zip
2013-01-06 08:50 cas Note Edited: 0034713 View Revisions
2013-01-06 08:51 cas Note Edited: 0034713 View Revisions
2013-01-08 10:01 cas File Added: Holidays094.zip
2013-01-08 10:02 cas Note Added: 0034737
2013-01-08 10:16 yany Note Added: 0034739
2013-01-08 10:16 dregad Note Added: 0034740
2013-01-08 11:03 cas Note Edited: 0034737 View Revisions
2013-01-08 11:04 cas Note Added: 0034742
2013-01-09 06:42 cas Note Added: 0034744
2013-01-09 06:42 cas File Added: Holidays095.zip
2013-01-09 10:35 dregad Note Added: 0034745
2013-01-09 11:04 cas Note Added: 0034747
2013-01-14 09:10 cas Note Added: 0034789
2013-01-14 17:08 atrol Note Added: 0034792
2013-01-14 17:09 atrol Note Edited: 0034792 View Revisions
2013-01-15 07:29 cas Note Added: 0034793
2013-01-15 07:30 cas File Added: Holidays096.zip
2013-03-19 04:43 dregad Relationship added related to 0011178
2013-03-19 12:24 atrol File Added: Holidays097.zip
2013-03-29 08:53 cas Note Added: 0035994
2013-07-08 04:10 JeromyK Note Added: 0037423
2013-07-08 04:11 JeromyK File Added: strings_english.txt
2013-07-08 04:11 JeromyK File Added: strings_german.txt
2013-07-08 04:37 JeromyK Note Added: 0037424
2013-07-08 04:43 JeromyK File Added: strings_german_NEW.txt
2013-07-08 17:12 atrol Note Added: 0037429
2013-07-09 02:45 JeromyK Note Added: 0037433
2013-07-09 05:21 JeromyK File Added: Holidays098.zip
2013-07-09 05:23 JeromyK Note Added: 0037437
2013-07-09 07:21 atrol File Deleted: strings_english.txt
2013-07-09 07:21 atrol File Deleted: strings_german.txt
2013-07-09 07:21 atrol File Deleted: strings_german_NEW.txt
2013-07-09 07:44 atrol Note Added: 0037438
2013-07-09 08:19 JeromyK Note Added: 0037439
2013-07-09 08:19 JeromyK File Added: Holidays098NEW.zip
2013-07-09 10:02 atrol File Deleted: Holidays098.zip
2013-07-09 10:02 atrol File Deleted: Holidays098NEW.zip
2013-07-09 10:03 atrol File Added: Holidays098.zip
2013-09-17 11:25 mmyers Note Added: 0038048
2013-09-17 14:08 atrol Note Added: 0038049
2013-11-13 07:04 spacomp Note Added: 0038542
2013-11-13 07:05 spacomp Note Edited: 0038542 View Revisions
2017-10-10 19:46 helfy022 Note Added: 0057926
2017-10-11 09:07 cas Note Added: 0057938
2017-10-11 13:20 cas File Added: Holidays.201.zip
2017-10-11 13:20 cas Note Added: 0057943