It's not possible to edit/delete the attachments that where posted with an issue e.g. when the wrong screenshot has been uploaded. It's not possible to delete it or upload another one.
Editing an issue should work like editing a comment of an issue. This should work at least for the creator of the issue.

PS: I'll try it also with this issue. I will add the logo.

CommentFileSizeAuthor
drupal.org_.png3.99 KBwitus

Comments

aclight’s picture

Project: Project issue tracking » Drupal.org site moderators
Version: 5.x-2.2 »
Component: Issues » Other
Status: Active » Closed (works as designed)

This is the way drupal.org is configured, not directly due to the project issue module. Just be glad that you can edit comments--not everyone is in favor of that even.

witus’s picture

Project: Drupal.org site moderators » Project issue tracking
Version: » 5.x-2.2
Component: Other » Issues
Status: Closed (works as designed) » Active

Sorry, but I think there is a misunderstanding. This was not a change request for the drupal.org issue tracking DB. This issue appears in my test installations and i assume it has something in common with the module.

aclight’s picture

Do your users have the "edit own project issues" permission?

witus’s picture

Category: feature » bug
Status: Closed (works as designed) » Active

Yes the permission is set. I gave this permission temporary to all users - still the same behaviour.

Comment for comment #10:
So here is a comment for comment #10. I can add here a attachment and i can change the context for this thread afterwards completly only by editing this decriptional text. The following text has not directly something in common with the next comments until #9.

When I can edit comments completly, why i can't edit the issue?
- I'm the owner of the issue?
- I'm responsible for my issue?
- I'ld assume as long as there is no comment I could edit "My issue"?
- Why i can add/edit/delete the attachment in the comment ?
- How about "Don't make me think?" in web usability

dww’s picture

Status: Active » Closed (works as designed)

Pretty sure this is by design. Just like you can't go back and edit the issue metadata in the original post, we also go out of our way to prevent you from attaching new files. The idea is that you should always use followup comments to change things about an issue.

witus’s picture

I've got your point and I understand this handling on drupal.org. But in general it's not logic when I set the permission "edit own project issues" that I can only edit the description and not the attachments. Actually the attachments are also a part of the description. How do you think about that?

witus’s picture

Category: bug » feature
Status: Closed (works as designed) » Active

I'ld propose following code alignments to fit the module to the requirements for everyone concerning this issue:

1.) Add an additional permission "edit own project issues attachments' into the "project_issue_perm()" function

...
function project_issue_perm() {
  $perms = array(
    'create project issues',
    'access project issues',
    'edit own project issues',
    'edit own project issues attachments',
...

2.) Align the case if-clause in the project_issue_form_alter() function

...
 case 'project_issue_node_form':
      if (isset($form['attachments'])) {
        if (isset($form['project_info'])) {
...

to

...
 case 'project_issue_node_form':   	
      if (isset($form['attachments'])) {
        if (user_access('edit own project issues attachments')){
...
aclight’s picture

The whole point of an issue tracker is to track changes to an issue. If users go in and change the original issue, or the attachments, or the metadata, those changes aren't tracked and could potentially make follow up comments, if present, make no sense or be confusing. That's just how issue trackers tend to work. If you attach the wrong thing, just follow up in a comment with the right attachments.

If we add a "edit own project issues attachments" permissions then next someone will be asking us to add a "edit own project issues metadata" permission so that the metadata can be changed as well. I don't think either is a good idea. If you really want this for your own site you should be able to write a small module that implements hook_form_alter() and add the attachments form elements back to the issue node edit page, if you really want to.

Now, if you have a use case in mind that's different from "I attached the wrong file by mistake and want to fix it" please share. There's a possibility that this feature could be really helpful in a way that neither dww nor myself has thought of.

witus’s picture

Simple use case:
User A should review a appliation as a client. He has general knowledge in using internet applications but he is no developer, etc. He knows the issue tracking system and he likes it because it's nice, not quite complex and easy to use. He has already posted many issues. It's 5 min. before closing time and he want to submit the "last" issue before he leaves work.

There are currently following premesis for the last "issue":
1. He wants to get the bus home in the 6 minutes
2. In his image folder is the screenshot called "picture1.jpg" and a image "image1.jpg" with a private photo with his family. (Thats the way how he handles imags)

Following happens:
1. He defines the issue. No big thing for him... (in his mind: "hurry up")
2. Just attach the screenshot "image1.jpg" (in his mind: "hurry up - common upload a bit faster")
3. Selects the "Submit" button
4. Oh my god ! My familiy is in the issue tracking system
5. I need to delete it, oh that's not possible
5. Calls the administrator, who is not at his desk...
6. He misses the bus... ;-)
etc. etc.

dww’s picture

Status: Active » Closed (works as designed)

Sorry, that's not a different "use case", it's just another story about why someone might want to edit an existing issue instead of posting a followup...

I'm going to call this "by design" again. If you really want this functionality, hook_form_alter() is your friend. Knock yourself out. ;) But it's not going to change in the upstream project* codebase, at least not until there's a really compelling motivation for it.

witus’s picture

Category: bug » feature
Status: Active » Closed (works as designed)

Hello aclight and dww,

I really appreciate your feedback. There are no other use cases. It's only the case if someone adds a file that has nothing in common with the issue (people do mistakes). The editor is the "owner" of the issue and he is responsible for the post and he should be able to edit "his" issue if it's necessary.

I understand your points but in my opinion this is a simple additional feature that gives an added value for the module in follwoing points:
- The editing functionality of comments/issues is consistent (see also comment #4)
- It gives to the administrator the flexibility to choose if he activates the feature
- Enhancement of the usability for the users**

** How about this:
The user can edit the issue as long as there is no comment. That will correspond to your idea and it will give to module the added value that i've mentioned before.

That's all what could say concerning this.
I like the project modules! Great job! At least it's your decision.

aclight’s picture

** How about this:
The user can edit the issue as long as there is no comment. That will correspond to your idea and it will give to module the added value that i've mentioned before.

The problem with this is that some people (myself included) follow issues via email, and don't view the issues on the web site as much. Since new emails aren't sent out when issues *or* comments are edited, what you suggest won't be effective for people who follow via email.

witus’s picture

Ahh I understand! That means people who only follow issues via e-mail are not always up to date as user using the website => infomation gets lost for some users.

So there would be another feature request: "The e-mail communication channel needs to get synchronised with web communication channel"

What do you think about that?

greg.harvey’s picture

Suggestion for better way to handle this... http://drupal.org/node/360942