Attachment improvements

Hi list,

I’ve made some attachment improvements in our company’s RT 3.8 in the last
few years.
If you are interested in it I can try to create 4.0 compatible Plugins for
these features (now I could only send patches for 3.8.x files).

  1. Attachment forward: previously attached files are listed on Update.html
    and you can check them to attach to the outgoing mail. (I don’t understand
    why this kind of feature isn’t in vanilla RT. Everybody downloads and then
    reuploads attachments if he or she wants to send it to an email address?).

  2. Unique attachment session: RT temporary stores attachments
    in $session{‘Attachments’} and deletes this on Display.html, Update.html,
    Create.html, ModifyAll.html and Bulk.html. The problem is that if you start
    a comment, attach a file and you open a ticket or start another comment,
    etc.in another browser window or tab, your uploaded attachment will be
    deleted from session. So later when you submit your comment there won’t be
    your previously attached file. This is annoying for a lot of users that’s
    why I create unique session variable in every related page to store the
    attachments.
    Note: I think it is impossible to implement this with Callbacks only. It
    needs patching or overlaying some files.

  3. Multiple attach: there are flash solutions for multi-attach file but I
    don’t like flash. Fortunately in HTML5 you can create
    with multiple http://www.w3schools.com/html5/att_input_multiple.aspattribute.
    Modern browsers support it and allow users to select more than
    one file at once. I implement this feature on Update, Create and ModifyAll
    pages. Users like this more than I previously supposed and it was only a 20
    minute work to implement. :slight_smile:
    Note: this will be another reason for IE users to change their browser :slight_smile:

  4. Attachment coloring and ordering: you can define categories in
    SiteConfig and also colors for these categories. On Display page you can
    set category for every file with one click. Files get the color of their
    categories. You can also order attachments list by category (color),
    filename, creator, size and date. There is a predefined category “hidden”.
    With this you can hide an attachment.
    It’s not my favorite improvement but this is very useful for companies work
    on long projects with lot of files.

Bekeny
Docca OutSource IT Ltd.

Hi list,

Hello,

I’ve made some attachment improvements in our company’s RT 3.8 in the last
few years.
If you are interested in it I can try to create 4.0 compatible Plugins for
these features (now I could only send patches for 3.8.x files).

  1. Attachment forward: previously attached files are listed on Update.html
    and you can check them to attach to the outgoing mail. (I don’t understand
    why this kind of feature isn’t in vanilla RT. Everybody downloads and then
    reuploads attachments if he or she wants to send it to an email address?).

I think in cages we have something like this. It’s ok as Plugin and good plugin.

  1. Unique attachment session: RT temporary stores attachments
    in $session{‘Attachments’} and deletes this on Display.html, Update.html,
    Create.html, ModifyAll.html and Bulk.html. The problem is that if you start
    a comment, attach a file and you open a ticket or start another comment,
    etc.in another browser window or tab, your uploaded attachment will be
    deleted from session. So later when you submit your comment there won’t be
    your previously attached file. This is annoying for a lot of users that’s
    why I create unique session variable in every related page to store the
    attachments.
    Note: I think it is impossible to implement this with Callbacks only. It
    needs patching or overlaying some files.

This is implemented in the repo and aimed at 4.2.

  1. Multiple attach: there are flash solutions for multi-attach file but I
    don’t like flash. Fortunately in HTML5 you can create
    with multiple attribute. Modern browsers support it and allow users to
    select more than one file at once. I implement this feature on Update,
    Create and ModifyAll pages. Users like this more than I previously supposed
    and it was only a 20 minute work to implement. :slight_smile:
    Note: this will be another reason for IE users to change their browser :slight_smile:

What happens with browsers that don’t support this feature? If those
don’t have problems and just allow users to upload one file then we
can consider this for core. Do you care to send a patch against master
branch? Note that because of above change (2), code around attachments
upload is different, but actually it’s better as we concentrated it in
one place.

  1. Attachment coloring and ordering: you can define categories in SiteConfig
    and also colors for these categories. On Display page you can set category
    for every file with one click. Files get the color of their categories. You
    can also order attachments list by category (color), filename, creator, size
    and date. There is a predefined category “hidden”. With this you can hide an
    attachment.
    It’s not my favorite improvement but this is very useful for companies work
    on long projects with lot of files.

Sounds like useful @Plugin.

If you need new callbacks for any code then you can send patches.


Bekeny
Docca OutSource IT Ltd.


RT Training Sessions (http://bestpractical.com/services/training.html)

  • Boston — March 5 & 6, 2012

Best regards, Ruslan.

Hi,

can you please send your changes for 1. Attachment forward.
I also have to implement this for your company RT (3.8.6) within the
next weeks and would implement this in our internal RT plugin or would
release a separate plugin on github.com for this change if it would be
ok for you.

Thanks!

-ChrisAm 21.01.2012 15:52, schrieb B�LINT Bek�ny:

  1. Attachment forward: previously attached files are listed on
    Update.html and you can check them to attach to the outgoing mail. (I
    don’t understand why this kind of feature isn’t in vanilla RT. Everybody
    downloads and then reuploads attachments if he or she wants to send it
    to an email address?).

Hi Ruslan,

  1. Unique attachment session: RT temporary stores attachments
    in $session{‘Attachments’} and deletes this on Display.html, Update.html,
    Create.html, ModifyAll.html and Bulk.html. The problem is that if you
    start
    a comment, attach a file and you open a ticket or start another comment,
    etc.in another browser window or tab, your uploaded attachment will be
    deleted from session. So later when you submit your comment there won’t
    be
    your previously attached file. This is annoying for a lot of users that’s
    why I create unique session variable in every related page to store the
    attachments.
    Note: I think it is impossible to implement this with Callbacks only. It
    needs patching or overlaying some files.

This is implemented in the repo and aimed at 4.2.

Good news. In that case I won’t work on creating patches for this.

  1. Multiple attach: there are flash solutions for multi-attach file but
    I
    don’t like flash. Fortunately in HTML5 you can create
    with multiple attribute. Modern browsers support it and allow users to
    select more than one file at once. I implement this feature on Update,
    Create and ModifyAll pages. Users like this more than I previously
    supposed
    and it was only a 20 minute work to implement. :slight_smile:
    Note: this will be another reason for IE users to change their browser :slight_smile:

What happens with browsers that don’t support this feature? If those
don’t have problems and just allow users to upload one file then we
can consider this for core.

It is backward compatible so you can upload one file without any problem
with IE or older FF, Safari, Chrome, etc.

Do you care to send a patch against master branch?

Note that because of above change (2), code around attachments

upload is different, but actually it’s better as we concentrated it in
one place.

Patch for master branch is attached.
IMPORTANT: I’m unable to test it but I hope it works well on this branch.

  1. Attachment coloring and ordering: you can define categories in
    SiteConfig
    and also colors for these categories. On Display page you can set
    category
    for every file with one click. Files get the color of their categories.
    You
    can also order attachments list by category (color), filename, creator,
    size
    and date. There is a predefined category “hidden”. With this you can
    hide an
    attachment.
    It’s not my favorite improvement but this is very useful for companies
    work
    on long projects with lot of files.

Sounds like useful @Plugin.

If you need new callbacks for any code then you can send patches.

Thanks, I think it will help me a lot to create Plugins.

Bekeny
Docca OutSource IT Ltd.

0001-multiple-attribute-added-to-input-type-file.patch (1.16 KB)

0002-handle-multiple-files-attached.patch (6.29 KB)

Do you care to send a patch against master branch?

Note that because of above change (2), code around attachments
upload is different, but actually it’s better as we concentrated it in
one place.

Patch for master branch is attached.
IMPORTANT: I’m unable to test it but I hope it works well on this branch.

Slightly misguided you. Mentioned change is not yet on master, it’s in
4.2/web-attachs-processing branch. Took a look at the changes. Looks
good and simple.

Best regards, Ruslan.

Patch for master branch is attached.
IMPORTANT: I’m unable to test it but I hope it works well on this branch.

Slightly misguided you. Mentioned change is not yet on master, it’s in
4.2/web-attachs-processing branch. Took a look at the changes. Looks
good and simple.

I think patch for this branch is more simple because it is not require to
modify Create.html, etc. pages only the ProcessAttachments function in
Web.pm.
Should I create a patch for this branch also?

Bekeny
Docca OutSource IT Ltd.

Patch for master branch is attached.
IMPORTANT: I’m unable to test it but I hope it works well on this
branch.

Slightly misguided you. Mentioned change is not yet on master, it’s in
4.2/web-attachs-processing branch. Took a look at the changes. Looks
good and simple.

I think patch for this branch is more simple because it is not require to
modify Create.html, etc. pages only the ProcessAttachments function in
Web.pm.
Should I create a patch for this branch also?

If you have cycles and want to see this code merged then rebase your
changes over mentioned branch and generate pull request. This will
make our job much easier. If you don’t have cycles then create a
ticket in the bug tracker with reference to this thread.


Bekeny
Docca OutSource IT Ltd.

Best regards, Ruslan.

Hi Chris,

I attached the two Callback files for attachment forward.
I hope it will help you.

Bekeny
Docca OutSource IT Ltd.On Sun, Jan 22, 2012 at 3:57 PM, Christian Loos cloos@netsandbox.de wrote:

Hi,

can you please send your changes for 1. Attachment forward.
I also have to implement this for your company RT (3.8.6) within the
next weeks and would implement this in our internal RT plugin or would
release a separate plugin on github.com for this change if it would be
ok for you.

Thanks!

-Chris

Am 21.01.2012 15:52, schrieb BÁLINT Bekény:

  1. Attachment forward: previously attached files are listed on
    Update.html and you can check them to attach to the outgoing mail. (I
    don’t understand why this kind of feature isn’t in vanilla RT. Everybody
    downloads and then reuploads attachments if he or she wants to send it
    to an email address?).

AttachmentForward.tar.bz2 (1.3 KB)