internal > Feature (approved)

create person item table / #2358

Summary

v0.08
approved
Oct 10, 2006
100%
Oct 11, 2006 / pixtur
Apr 26, 2008 / guest
burger, pixtur
 

Attached files

Summary
deletediteminbookmarklist.gif
deletediteminbookmarklist.gif

115497 bytes / ID 3293 / Dec 8, 2006
Show Details
streber_bookmark_list.png
streber_bookmark_list.png

25466 bytes / ID 3455 / Dec 16, 2006
Show Details
 
Stores relation ship of items to persons:

NOTE: This is a very rough draft. Please add commentss on any aspects!

possibile purposes:

  • if item has been viewed of downloaded (or number of views)
  • if item has been editing by person?

From Monitor Task/Bugs we could add:
  • remember_unchanged - duration until a notification is been sent that item has not been modified (in seconds)
  • is_bookmark
  • notify_on_change - Sent instant mail on changes and comments.

Implementation Details:

This object should not be derived from DbProjectItem because it's not real data there is not right managment needed for it. The rows of this table can not be querried directly.

Fields

Type Name Comment
INTid primary key
INTperson
INTitem
BOOLviewed
INTview_count
DATETIMEviewed_last
INTnotify_if_unchangedduration until a notification is been sent that item has not been modified (in seconds)
BOOLis_bookmark
BOOLnotify_on_changeSent instant mail on changes and comments (item is monitored)

also see:


55 Comments

burger

Nov 9, 2006
version 2
Question
Hi Tom,

is it okay if I join you to handle this task?

It is really important for us so that it would be great if I could start with this task.

burger

burger

pixtur

binder

pixtur

pixtur

binder

pixtur

binder

guest

binder

burger

pixtur

burger

burger

burger

burger

burger

pixtur

burger

burger

Nov 23, 2006
Notify on change
And can I add a new entry ('notify on change') in the drop-down-list of e.g. the task list, too?

burger

Nov 25, 2006
Committed some changes
I committed some changes in relation to bookmarks.

It isn't 100% perfect (Sorry!!!), because:
  1. the 'Export as CSV' link isn't at the right position anymor
  2. if a e.g. is closed and it is shown in the bookmark list then it isn't strike through anymore
but I didn't find the reason.

Maybe somebody can check this?

P.S.: Sorry I forgot to make some comments at the svn. Normally I never forget this. So I'm really sorry!

madlyr

Dec 1, 2006
Bookmarks are great, nice work Burger! It is VERY usefull :-)
As I see it works good, although I founded some lacks ;-)
You can't bookmark milestone and comment.
You missed Milestone, but comment does not work.
Right button menu shows Mark as bookmark but doesn't submit action. Maybe it's part of bigger bug because edit menu doesn't work either.

madlyr

Dec 1, 2006
Submitted milestones as bookmarks and projectcolumn in My bookmarks
I submitted in rev. 211 some changes for bookmarks:
  • milestone could be bookmarked now
  • added column Project in My bookmarks list
  • Type column in My bookmarks shows task category name now

burger

Dec 7, 2006
version 2
Thanks for your help
Sorry for my late reply, but I wasn't at work the last 1,5 weeks.
And also sorry that I forgot to implement the bookmarks for milestones and comments. But I see that you solved this problem :-).

Maybe we should add the status of the item (project, task, ...), too? What do you think?
Because at the moment there is no visual difference between closed and open task ect..


burger

Dec 7, 2006
Discussion
I think about what to do with items in the bookmark list which get deleted?!

I had the situation that I had an task marked as bookmark and then I deleted this task. But this task is still shown in the bookmark list.

So what do you think. Should this task vanish into thin air or should it be marked as deleted?

I think it's better to keep it in the bookmark list and mark is as deleted. I think it's confusing if a bookmark suddenly disappears. Or?

burger

Dec 8, 2006
version 4
Suggestion
My suggestion for deleted items in the bookmarklist see screenshot.

madlyr

Dec 8, 2006
I agree...
icon is ok, and task should be visible but not accessible if rights are not enough to view deleted item.

burger

Dec 8, 2006
Comment
If you wouldn't have enough rights to see this item then you would never have the chance to mark it as bookmark. So it should be okay like this.

I changed your project-column code a little bit. Because if the item is a project then it's enough to have the name of the project once (name column) and not twice (project column). Is this okay for you?

madlyr

Dec 8, 2006
Reply to Comment - bookmarks are broken in rev 216
Rights: check if it's not a security hole, probably not :-).

After your changes in rev 216 (I work on rev 217 with merged my changes) bookmarks don't work propoerly.

I see only one last added bookmark and I see only columns Type and Status with data, other are empty.

burger

Dec 8, 2006
Uups ...
Sorry. I like take care about it immediately.

burger

Dec 8, 2006
Comment
The only thing I changed is that I added the State-column and items which states are >= STATUS_COMPLTED are striked-trough.

So can you maybe check if one of those causes the error? That would be very kind.
It's not very easy for me to find out the error because everything works fine on my computer.

burger

Dec 8, 2006
Found the error
Sorry for your inconvenience. I forgot to submit the db_items.inc.php. Therefore a new function (function getItemState()) wasn't found and this causes the error.

So sorry again.

madlyr

Dec 8, 2006
version 2
Reply to Found the error
NOP, sometimes it happens :-).
It works now perfectly.

I always use check for modifications menu of Tortoise and check modifications with svn repository to make sure I don't forget about any change.

madlyr

Dec 8, 2006
What should display column State?
I see new and empty column named State in bookmark list. What's this?

I suggest to change widths of columns - Name should be much wider.

burger

Dec 8, 2006
version 2
Explanation
State displays the state of the bookmark (deleted or 'alive') --> see screenshot.
I only didn't know a good german translation for 'state'.

I tried to change the column width but nothing happened. So I decided to continue with the implementation and to care about the layout later.





pixtur

Dec 10, 2006
version 7
wow, lots of stuff going on here...
Sorry for being absent for such a long time. I had (or still have) some personal problems and a lot of work. Anyways.

I saw your changes at bookmarks and viewed items. Very nice!

Some comments on your changes:
  • Please refactor ListBlock.render_trow() and make a custom version for bookmark list
  • I think there is too much orange in the pages. I suggest to only highlight new/updated items like it was done with the items changed since last logout. I don't think we need two highlight mechanisms, so the old check can be removed.
  • I think the labeling is a little bit awkward right now. Maybe we could replace "not viewed" with something like "changed/new/updated".
  • I added a new field to date_highlight_changes to Person. Together with the page function personAllItemsViewed this can be used to mark all items as viewed without flooding the item_person table. This should be initialized with "now" for new persons.
  • Why do you add the double id to the book-mark list? I just don't understand what this should be good for.
  • Why didn't you start a new file for the list_bookmarks?
  • I renamed isViewedByUser($auth->cur_user) into nowViewedByUser()
    • note that $auth->cur_user is the default value for the function, so I removed it from all calls.
  • Please do not use getCurTheme():
print "<td><img src='themes/".getCurTheme() ."/icons/delete.gif'></td>";

is better written as...

  echo '<td><img src="'. getThemeFile("icons/delete.gif") . '"></td>';

By this themes can be derived from Clean-Theme without having to copy all files. getCurTheme() is depreciated. Please do not use it anymore.

Since I wanted to update my own site I refactored some of your code a little bit. I hope this is ok for you. Have a close look at my changes in rev224.

Monitoring items

Since you already implemented so much, why not complete the group of feature by also finishing Monitor Task/Bugs ? I wrote some description there, what is still missing.


burger

Dec 15, 2006
version 2
Questions & Answers & Comments
Questions:
  1. What was the old highlight mechanism? Bold?
  2. Which labeling do you mean? At the 'My bookmarks' list or in the code?
  3. What do you mean with double id at the bookmark list?
Answers:
  1. I didn't have a special reason not to start a new file for the list_bookmarks. So if you want then we can change it.
Comments:
I already started to implement the notification mechanism if something changed (like you suggested at Monitor Task/Bugs).
My ideas:
  1. Function drop-down-list: 'Add notification' and 'Remove notification'
  2. Mail-Icon behind the selected items (no new list at the home view, because of clarity)
  3. New mail every time the particular item changes

pixtur

Dec 16, 2006
version 2
Comments..

Old highlight mechanism

  • In renderDateHtml() I compared all dates with $auth->cur_user->last_logout. If the item was modified after the last_logout, the date was rendered with the class isNew (bold orange). Since most list featured a modified date column, this was sufficient.
With your new changed I suggest to check each list row for "isChanged" and add the class like...

from render/render_list.inc.php

            if( $obj->isChangedForUser() ) {
				echo "<tr class='$style isChanged'>";
            }
            else {
				echo "<tr class='$style'>";
            }
		}

Then we can easily add all possible highlights to the styles.css without modifing the code. E.g. to render changed items in bookmark list different, we could add...

from styles.css

    table#bookmarks tr.isChanged a {
       font-weight:bold;
       color:#800;
    }

Labeling

Both. In the code and in the interface. I think we could write into the upcomming documentation, that "you can bookmark by monitoring items".


Double id

From your modified render_list code:

from render/render_list.inc.php

echo "<tr id={$this->id}_{$obj->id} class='$style not_viewed'>";

I removed the <tr> "id" because it wasn't necessary (or I didn't get its purpose).

list_bookmarks.inc.php

Please start a new file. That will keep the code a little bit more readable.

Questions:
I didn't understand this...

# Function drop-down-list: 'Add notification' and 'Remove notification'


I don't like the idea of using "toolicons" to display a state (e.g. deleted). This is very confusing, because, it suggests you can click on the Icon to delete it.

I did a quick Photoshop mock-up how I would love to have the bookmark list (see attachment).


Ideas



burger

Dec 16, 2006
Short comment
Sorry I don't have very much time. So only a short comment:
  • I like your Photoshop mock-up and if it's okay I will realize it like this.
  • I already added the comment column.
  • I already implemented the edit form for bookmarks.
But the code is not perfected yet to get committed.
I hope it's okay if you get the code next week, because I will finish work now and I cannot continue before next thursday?!

pixtur

Dec 16, 2006

burger

Dec 22, 2006
Committed some changes
Hi Tom,

I made some changes:
  1. new bookmark list (new, changed or removed columns)
  2. notification if item changed
  3. notification if item not changed
  4. edit form for bookmarks
I hope I haven't made an error in reasoning in the range of notification.

Notification on change:
  • Every time an monitored item changes an email is sent to the persons who are monitoring this item.
  • But no email is sent to the person who changes the item.
Notification on unchange:
  • Every time the user logs in there's a check if a notification mail on unchanged items should be send.
  • Every time the monitored item is changed the "base" date (notify_date) is modified.
Still to implement:
  • recognition of changes at Multiple ... / tasksComplete / tasksDelete ...
It would be great if you could check this.
I really hope that I didn't make any mistakes, because I'm on holiday till 07/01/04 or 07/01/05.
If there are bigger problems please try to contact me on Skype.

So, I wish you a merry christmas and a happy new year.
Try to relax a little bit ;).

pixtur

Dec 24, 2006
version 2
thanks for your work!
I just had a short glimpse at your changes, but since it so much, I probably will come with some more suggestions later.

So far anything but the following detail looks perfect:
  • I don't thing that sending the notification on unchanged items after login in is a good idea. because:
    1. We could highlight those items in the bookmark list of the user
    2. Sending the notification stuff takes time, and just after login is the worst point to let the user wait
    3. There already is a good place for this kind of information: The notification mail itself. I just would it implement like suggested in Monitor Task/Bugs:
  monitored by you [ignore all monitored]:
  - admin edited > adfjlkasdjf (to xyz)  [ignore]
  
  sleeping monitored items [ignore all sleeping]
  - task23423 (not touched since 34 days) [ignore]

The ignore-list would request a page like:
  • index.php?go=stopNotifyUnchanged&item=234
  • index.php?go=stopNotifyAllUnchanged
  • index.php?go=stopNotifyChange&item=234
  • index.php?go=stopNotifyAllChange
One Question:
  • what is public function outputNotifcationForPersonTXT($person) for?
Just tested the bookmarks a little bit:
Thanks again for this incredible work! I guess my wishes for happy x-mas, new year and vacation come a little bit too late...
I will try to relax with my parents, but since I will release a new demo at http://2006.tum-party.net/ I am a little bit under preasure... :)

burger

Jan 12, 2007
version 3
Comment
  1. I really don't know who implemented the public function outputNotifcationForPersonTXT($person) . I didn't.
  1. Can you please specify how this ignore list should look like and how it can be accessed?
  1. You suggest to highlight the unchanged items, but I have a own column for this. So what's better?
  1. I will include the notification on unchanged items in the already existing notification mail.

pixtur

Jan 13, 2007
(some) answeres
  • on 1.: ok, then remove the outputNotifcationForPersonTXT function.
  • on 2.: I don't think that there is something like an ignore list. It would simply..
    • remove the Bookmark or
    • disable reminder for a Bookmark
  • on 3. Sorry. I was wrong. The column list_bookmarks is just fine

Thanks for you work.

ps. Could you please move list_bookmarks into a separate file?

burger

Jan 18, 2007
Comment
I made some changes and committed them.
But I didn't add your second point.
I will do this tomorrow.

pixtur

Jan 19, 2007

pixtur

Jan 19, 2007
Very nice...
The code looks very good. I really like that you already use the DbProjectItem::getObjectById() .

Personal taste... I would write...

from mail.inc.php line 224

			if(!monitored_items){
				# do nothing
			}
			else{
				$changes_headline_html = "<h3>"

as..

			if(monitored_items){
				$changes_headline_html = "<h3>"



and...

we could already define

NOTIFY_1DAY etc. as... `define(PERIOD_1DAY, 246060)`. This would also make storing the notify-field as being stored in seconds more obvious...

Do not forget to remove class ListBlock_bookmarks extends ListBlock from list items. But probably this just not yet committed :)

Thank you! Seeing your help with streber really saves my day :)





burger

Jan 24, 2007
Problem with edit multiple
I would like to realise the edit multiple form for bookmarks but I really don't know how.
  1. Multiple forms? (--> but how can the submit work?)
  2. One form for all bookmarks? (--> like editTasksMultiple)
What do you think?

burger

Jan 25, 2007
Talked with Thomas (binder) ..
Thomas and me, we decided to solve it like at taskEditMultiple (to keep the functionality similar and not to confuse the user).

Therefore I will use the same functionality like the taskEditMultiple (with -- keep different -- etc.).
But I don't have the comment field, because I think it isn't possible with multiple items. or?

Is this solution okay for you?

burger

Jan 26, 2007
Committed some changes
I realised the itemMonitorEditMultiple like I described in the last comment.
Please check if everything is okay.

pixtur

Jan 31, 2007
Yes... This solution is quiet ok
I will check your code.

pixtur

Feb 25, 2007

guest

Apr 26, 2008
who delete a person??
I can't delete a person, why?....
 

Comment / Update