Some errors with tasks not being visible

While working on some new functionality, I created some tasks to keep track of what I still needed to do for that feature, and I noticed some of them wheren’t appearing when I went to the list. As I wasn’t specifically testing this at the time, I wasn’t overly sure on what the differences where with some of my tasks, so I have no idea what caused the issue. The results also varied based on what page you view it. Some of the results where shown on the main tasks page, but not on the tasks detail page and vice versa.

After having created a new, clean account and project, here are my findings:

  • Tasks created on the tickets page and assigned to myself work fine
  • Tasks created on the tasks page and assigned to myself throw an undeclared variable error when added via AJAX and upon refresh, it’s not there. This would imply there as a problem with the join, although it doesn’t throw a SQL error
  • The above fails to include the user ID the task is assigned to – Shouldn’t fail as it’s a left join although the default user ID is 0, which has no match!
  • Having corrected the above so the inserted row has the user ID, it still fails as before
  • At this point, everything in the database looks like it should (aka all the columns have the correct or valid values)
  • Tasks added from the tasks page are now added to the list correctly with AJAX and no longer have the undefined variable error – The problem was that when I saved the task, I used that same data to populate the new row, but this only contains the user ID, not the users name (Up until this morning, it just had the ID in the row, not the name, which is why it never happened before now). However it’s not visibl after refreshing or on any of the other views
  • After some more debugging with the raw SQL (easier to debug raw SQL then active record) in Navicat (better for debugging then PHP My Admin) I discovered that the problem wasn’t from the joins but from “SUM(times.duration) AS has_time”. As SUM is an aggregate function, it takes all the rows and aggregates them into one (which is why the first task was added without a problem)
  • The solution was to add a group by clause, grouping the results on the ID of the task, this would force each one to be returned seperately

Everything now works fine =) Even the sum of the times spent on each task, which originally caused the problem works as expected

Posted in Debug. No Comments »

New category – Debug

I’m suprised that I havn’t needed this category before now, but this is for all those werid problems I encounter which don’t have an immediately obvious solution. Entries in this section will contain a clearly defined set of steps taken to debug the error and how to fix it

Posted in Debug. No Comments »

What exactly should go on the dashboard

There are 3 main options for what can go on the dashboard, eachh of which has their own pros and cons

  1. Show the most recent activity accross all projects
  2. Break down activity based on type
  3. Break down activity based on project

I will no discuss each of these 3 options in detail:

Show recent activity accross all projects

With this method, there would be a reverse chronological list of activity accorss all your projects. It would essentially be a long list in the form “Person A done action B on Project C on the date D” with relevant links to the user, item and project. Although this would allow the user to see all activity accross all projects at a glance, it could also easily end up being quite a mess which would make it harder to quickly take in the information, which is the whole point of the dashboard screen, to quickly and easily see what’s going on.

It could possibly be structured in a table which would make it a little easier to see what’s going on, as the uer, project, date etc would be in columns, so it makes it much easier to scan. This could also be broken down by day instead of just being one long list.

Break down activity based on type

In this design, each differant item, such as tickets, tasks, files etc, would have it’s own section, either as a heading or a tab. This would then allow the user to check the activity only on items they’re interested in. So if theyonly want to see activity related to tickets, then they don’t have everything else cluttering the interface

Break down activity based on project

Similar to the above, but having  seperate tab/section for each project. This seems kind of redundant, as this information will be on the project overview page.

Thoughts?

So what are your thoughts on these options, or something completely differant? Do you even want a dashboard screen or just dive straight into your projects?

A few quick points on mistakes when designing dashboard screens taken from Consolidata which I will need to bear in mind

  • Clutter – the more items on a dashboard, the more likely it is that important information will be missed
  • Too many colours – the more colours, the less likely that important changes in colour will be missed. Issues with colour blindness need to be borne in mind
  • Relevancy – having more data that is not important detracts from the important data
  • Large graphics – many dashboards waste space by using large ‘dial-like’ images that take a lot of space but don’t give much informational value

Are messages really that important

The title of this post may be a bit misleading, especially as I’ve said in the past that communication is a key part of project management. The thing is, that was before I thought to add tickets, which has the same functionality as the messaging section and more, so really, there is no point in replicating the same functionality across 2 sections, as then some of the communication ould take place via messages and some via tickets.

As a result, I’m removing the messages section although this may cause cofusion with users unfamiliar with the term “tickets” so I may leave the messages tab in explaining the decision to leave it out, or just point to the tickets section.

First time setup

There is a great point made on the 37 Signals blog about designing the blank slate. Now although this post is over 6 years old, the point is still very valid. The whole point of a web application such as this one is to help you manage large amount of data, but when a user first starts to use the system, there is no data. There are no other users in the team, no clients, no projects, no tasks, milestones or files etc.

If a user logs in for the first time and all they see is a blank screen as there is no information, then they may not realise the full potential of the application. To tackle, this, I am implementing 3 methods to help manage this

  1. Making sure that on any page which has user defined data, it first checks if there is any data and if not, it will show some instructions on how to get started or use that partilular screen, so in the files section, it would show you how to add files, organize them etc. There may alos be a screenshot of how it would look once full populated
  2. Create a first time setup wizard which they will be taken to after registering. This will allow them to easily add users, clients and projects in bulk at the very beginning. Although it will be possible to skip this step and come back to it later should they wish
  3. Allow users to import a sample project which will give them a sandbox like environment with sample users, clients and projects populated with tasks, milestones, tickets etc

As the designer and developer behind the application, it is hard for me to appreciate how real users will interact with the system when it’s in it’s blank state as even when I enter the application in a blank state (which is a small amount of time in comparison to when it’s full of data) I still know how the application should be used. The only way to find out for real if the application will work well when in the blank state is to get real users to test it, which is what the now 190 beta testers will be doing next week

Security considerations when uploading files

The ability to upload, share and download files is key successfully collaboration on a project. As well as being able to just have the uploaded files stored online, I want the users to be able to interact with them. This means if it’s an image file, it should be displayed within the application, instead of having to download it to view it. If it is some textual document (or any ASCII encoded document) it should be possible to view it. If it’s a zip archive, it should be possible to view its contents etc.

Of course with added flexibility come complications, mainly in terms of security. In order to embed an image within a HTML page, that image needs to be within the web root, which means it can be accessed via URL from a browser. This in itself isn’t a security issue per se but it is a privacy issue, as a users uploaded images would be visible and accessible to anyone.

Things could get worse a whole lot quicker if we stored all uploaded files within the web root. If someone uploaded a PHP file (or any other executable file) then they could place malicious code in there, and then browse to it via URL.

So we need to either be very careful about what we allow users to upload, or not store it in the web root. The following is how I aim to tackle the problem.

  1. When a user upload a file (of any type) it is stored out of the web root
  2. When a user tries to view a file (either on the mail files page or viewing a single file) if it’s an image, a copy of the image with an encrypted file name is copied to a tmp directory within the web root
  3. Any page within the application references this temporary copy, which gets deleted every X minutes by a cron job
  4. To make things a little more secure, as well as encrypting the file names, it will not be possible to view the contents of the tmp directory via the browser

So the only way a user could view an image not belonging to them, is if they happen to “guess” the correct 32 character encrypted name of the file in the space of an X minute window before the contents of the temporary directory get wiped.

Oh, and this only applied to images, everything else can stay in the upload folder outside of the web root and still be accessed ok.

Now I know this method isn’t totally full proof so I will try to devise some additional authentication, maybe using some more .htaccess trickery… If anyone has any suggestions, then please add them in the comments.

Posted in Files. 2 Comments »

How to model time entries?

The following is more about how how time entries should be stored within the application and how they are linked to other parts of the system, not about the interface used for tracking time, that’s a post in itself.
Time can be tracked in one of 2 ways:

  1. Time can be tracked against a task, allowing you to add multiple time entries to the same item
  2. It can be tracked in isolation, meaning not linked to a task or other item in the system, other then a project. These will need an additional description of what’s done, so as to give the time entry some context

As time entries of the second type are isolated entries, you may have several entries for what is effectively the same “task” if it is done over several sessions. It must also be possible to do the same with time tracked on a task, but these would need to be linked, giving a total time for the task. Read the rest of this entry »

Posted in Times. No Comments »

An initial start on the files section

Today, I did some work on the files section of Project Trackr. There is nothing fancy at the moment, just the ability to upload a file, view a list of all files, view details of a single file (just a dump of the relevant database row) and the ability to download a file. At the minute, all this functionality is still in it’s infancy, but one thing I’ve added is the ability to download all your files in a single zip archive. This works, but it’s not really intuitive in it’s current form.
It suffers from the following problems
It includes all your files, this means it can be a pretty big zip file to download
There is no way to select which files to include and which to exclude
There is no hierarchy within the zip – Everything is in the top level

So we need to be able to select which files we want to include, so the obvious suggestion would be be list all the files and have a set of checkboxes to select the files you want. This still seems like a lot of work, and it get’s worse when you need to paginate the list of files, as you would either need a form submit to move to the next page or use AJAX to track the files being added in real time.

What are your thoughts? Is this sort of thing useful? Should it just include all files or let you select etc? Let me know your thoughts in the comments

Posted in Files. No Comments »