1 (edited by rbernier 2013-07-16 19:18:01)

Topic: Past Item Assignments in User History

There is one function that would be very useful to me, but I don't think GLPI does it out of the box -- the ability to view a user's item assignment history.

If I were to look at an item, like a computer, I can see in its history tab every user that has ever been assigned that computer. However, in the user's history tab, I can't see past item assignments.

I'm wondering what potential there is to create an additional history tab called "Past Assignments," that would only show assignment history?

What I'm basically looking at is a query like this one:

SELECT *
FROM glpi_logs
WHERE new_value="username"
OR old_value="username"
ORDER BY id DESC LIMIT 0,750

I think this would allow me to see all items being assigned and unassigned from a user in a linear fashion. Obviously where I have "username," I'd have to pull that value from another query on the glpi_users table, based on the user's id value -- which I'm assuming is stored in some php variable? I'm not well versed in PHP, but I can look at code and figure out what's going on.

Can somebody point me in the direction of what php file(s) contain the code to generate a history query? I think I'll tackle the additional tab another time--unless it's a simple feat -- which I doubt.

I'm using version 0.83.7

Thanks in advance for any help. I love this product smile

-Ryan

GLPI: 0.84.5, Ubuntu 12.04 LTS

2

Re: Past Item Assignments in User History

I've submitted a different rendition of this topic here:

http://www.glpi-project.org/forum/viewt … p?id=33226

I apologize if I should have tacked it onto this submission, but I felt it was different enough to merit it's own thread.

-Ryan

GLPI: 0.84.5, Ubuntu 12.04 LTS