If possible, reuse the "Documents/Media" pane from oa_discussion, so that there is a standardized UI for attachements. Right now that pane is rather oa_discussion-specific, so it'll need to be made unspecific to get reused. If that's not possible, than a similar pane should be made, so the UI at least appears consistent.

Comments

dsnopek’s picture

Status: Active » Closed (works as designed)

I've been trying to think how I could mimick the "Documents/Media" pane from oa_discussion... It does the following things:

  1. It links back to the reply where each document was added
  2. It shows the author of the document
  3. Shows attachments in Media Colorbox when clicked

First of all, I don't think that #3 makes sense for Tasks. For the most part people upload .DOC, .XLS, etc files when collaborating on work, which the Media Colorbox doesn't handle well at all (it just shows an icon and the file name). This could also be confusing for people who just want to actually download the file!

For #1 and #2: It would be rather difficult to implement those with Comment Alter - essentially it creates a new revision for every change and then links the comment to the revision. I'd have to loop through revisions, look for one where a file was added and then output the info.

All in all, I'm not sure how valuable that information will be to users - we've never had it in BucketB's Work Tracker for OA1. Once I get this issue in: #2106741: Improve diff for file attachments - users will be able to connect comments to the files that were attached same as they do in the old Work Tracker, which was always enough...

So, for now, I've committed 48372d7, which simply adds a pane in the right sidebar which lists the attached files with links to download them. This means users will look in the same place for attachements, but the information displayed will be a little different.

@mpotter: Please let me know what you think!

mpotter’s picture

Actually, in our use of issue tracking, the attachments are almost always images (design comps, wireframe images, etc). So retaining the lightbox functionality would still be useful.

#1 is not needed since there really isn't any kind of permalink for each comment like the Discussion replies have. But #2 would still be useful if there is any way. Seems like it still stores the name of the user who made a comment.

Certainly not release blockers though.

dsnopek’s picture

Well, it would be great if the lightbox did something better when the item wasn't an image, for example: showing an oversized icon representing the file type and including a "Download" link. However, that's something that even OA Discussion could use and building it could be done in a seperate issue. In fact, I'll make one: #2109439: Implement lightbox which does something awesome for non-images (for OA Discussion and Work Tracker)

Yeah, #2 would definitely be possible, just a pain to do. We'd be looping through each revision, finding the revision where a particular file was added and then showing the revision author. This isn't something we could in views, it'd have to be custom code.

Certainly not release blockers though.

I like the sound of that! :-) I'd prefer to launch with the simpler solution and only write the complex custom code after using it in practice for a while and seeing if it's worth it.

Thanks for taking a look at this right away!

dsnopek’s picture

Actually, I think I thought of a way that #2 could be done with views. :-) File Entities have an author - if we made a view of File Entities that are related to the Task, we could show the author for each one. I haven't tested this though and if it's not necessary for launch, I'd still rather hold off until the Work Tracker has had some real world use.

dsnopek’s picture

Since I was thinking about it so much, I did some experiments with creating such a view. We can continue working on this post launch here: #2109817: Implement more advanced "Documents/Media" pane