View Issue Details

IDProjectCategoryView StatusLast Update
0011080mantisbtadministrationpublic2019-06-28 17:40
Reporteratrol Assigned Tocommunity  
PrioritynormalSeverityfeatureReproducibilityhave not tried
Status closedResolutionfixed 
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

Additional Information

This feature is supported by a plugin

Download, discuss and get support on https://github.com/mantisbt-plugins/Holidays

TagsNo tags attached.
Attached Files
Holidays090.zip (5,020 bytes)
Holidays091.zip (5,261 bytes)
Holidays092.zip (7,789 bytes)
Holidays093.zip (8,104 bytes)
Holidays094.zip (8,126 bytes)
Holidays095.zip (8,192 bytes)
Holidays096.zip (8,331 bytes)
Holidays097.zip (9,549 bytes)
Holidays098.zip (10,715 bytes)

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

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   ~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: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: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

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

cas

cas

2013-01-08 10:02

reporter   ~0034737

Last edited: 2013-01-08 11:03

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

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

@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-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...

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

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)
clan_destina

clan_destina

2018-03-04 11:08

reporter   ~0059076

Hi @cas did you create a git repo for this? I like to contribute

cas

cas

2018-03-05 07:57

reporter   ~0059087

Clan_destina,
No I have not but feel free to create one.

c2pil

c2pil

2019-06-07 12:30

reporter   ~0062225

Hello,

I tried to install version 2.01 on Mantis 2.21 (latest as of today), and have an internal error that I will debug next week.

We would like to integrate this kind of functionnality to Mantis core so that this unofficial plugin does not have to be maintained anymore, especially the following :

  • Ability to define an absence with a start and end date ;
  • Disable mail notifications for an absent user.

Do you think it's feasible and a good idea ?

Thanks

atrol

atrol

2019-06-10 10:02

developer   ~0062230

@c2pil implementing this functionality in core would need database schema changes.
Database schema changes are not allowed in version 2.x.
I will discuss with other devs if we will change this rule, or if there would be a need to start Mantis 3.x development.
Not sure how/when this discusssion will end, so if you need this in short term, starting with a plugin is the better option.

dregad

dregad

2019-06-10 18:35

developer   ~0062234

I know I said over 6 years ago (0011080:0034740) that I'd be looking at this next week, turns out I never did... Sorry about that ;-)

Personally, I don't think we should implement this feature in core. A plugin can easily do the job, and considering that the basis already exists with @cas's work, then my recommendation would be to make sure we publish the necessary events so that it is not required for the plugin's users to keep patching Mantis to use it.

And move the code from zip files here, into a proper repository on GitHub's mantisbt-plugins organization.

c2pil

c2pil

2019-06-11 05:40

reporter   ~0062236

When do you think would be the start of a 3.x version, if it were to be decided that way ?

I will start from @cas's plugin to fit my needs, move everything in a GitHub repo and define some events in a PR if necessary.

dregad

dregad

2019-06-11 05:49

developer   ~0062237

When do you think would be the start of a 3.x version

No idea at this time.

I will start from @cas's plugin to fit my needs, move everything in a GitHub repo and define some events in a PR if necessary.

Thanks for your understanding and collaboration. Let us know if you need anything. Until then, you may find reading https://mantisbt.org/wiki/doku.php/mantisbt:plugins:start#hosting_a_new_plugin useful for the process to host the repo in mantisbt-plugins org.

Also, if it's not too much to ask, I would suggest, in the interest of keeping the original plugin's history, to initialize the repo with one commit per zip file attached here, and tag the respective versions. Or even better, maybe @cas has it under source control locally.

cas

cas

2019-06-11 05:51

reporter   ~0062238

@c2pil, so I can assume that you take over my Holidays plugin? That is good news, active mainetnance can only benefit the community.
Most importantly is that the relevant event signals are added to core which will allow the plugin easily to be activated in future releases.

c2pil

c2pil

2019-06-12 10:22

reporter   ~0062244

Here is the repository I initiated :
https://github.com/c2pil/Holidays

No further development at the moment, I will try to make it work on my machine first.

How does https://github.com/mantisbt-plugins work ?

dregad

dregad

2019-06-13 05:25

developer   ~0062246

How does https://github.com/mantisbt-plugins work ?

As mentioned in 0011080:0062237
*you may find reading https://mantisbt.org/wiki/doku.php/mantisbt:plugins:start#hosting_a_new_plugin useful for the process to host the repo in mantisbt-plugins

I've already created the plugin's team and sent you an invitation to join. Let me know when you've transferred ownership, so I can finalize.

c2pil

c2pil

2019-06-13 11:42

reporter   ~0062247

@dregad Thanks a lot, I didn't check the docs before asking, my bad..
I have to make sure the plugin fits all my needs before transferring ownership, I'll keep you informed !

dregad

dregad

2019-06-14 03:33

developer   ~0062256

Cheers.

For the record, even after transferring ownership of the repository, you would still retain push access to it.
I would recommend that you do it now, and tailor the plugin to your needs either in a feature branch in the main repo, or fork it and work in your clone. You can then send a pull request later on, whenever you're ready.

Raekh

Raekh

2019-06-24 09:39

reporter   ~0062308

I've been trying to implement this plugin in several versions of Mantis, without success. I think the problem is due to the javascript datepicker, as it looks for a function called "date_print_calendar" that is not found inside date_api.php. Have you guys been encountering the issue as well or did I do something wrong ?

c2pil

c2pil

2019-06-24 09:57

reporter   ~0062309

Last edited: 2019-06-24 11:09

@Raekh You can find here how I did it : https://github.com/c2pil/Holidays/blob/v2.21/pages/holiday_form.php.
I simply used the same code as in the bug_update page.php.

@dregad, I'm ready to transfer ownership of the repo, and even another one (Eannounce) if you wish. The invite you sent before expired or has been cancelled

dregad

dregad

2019-06-25 10:05

developer   ~0062315

The invite you sent before expired or has been cancelled

@c2pil as far as I can tell, you have successfully joined the org. That should let you transfer ownership of any repo.
Let me know if you face issues.

c2pil

c2pil

2019-06-28 04:50

reporter   ~0062333

@dregad Thanks, an invite was sent for another plugin. Could I join the Holidays plugin team to transfer ownership ?

dregad

dregad

2019-06-28 05:39

developer   ~0062336

Could I join the Holidays plugin team to transfer ownership ?

As member of the org, you should be able to transfer ownership of any repository, without being a member of a specific group.
Aynway, I added you to Plugin Holidays group.

c2pil

c2pil

2019-06-28 08:04

reporter   ~0062340

The Holidays plugin has been transferred

dregad

dregad

2019-06-28 08:58

developer   ~0062342

This plugin is now hosted in the mantisbt-plugins organization on GitHub :

https://github.com/mantisbt-plugins/Holidays

Many thanks to @c2pil for creating the repository and taking ownership of the plugin's maintenance.