Closed Bug 534045 Opened 10 years ago Closed 10 years ago

Invite Attendees dialog: icons are messed up in case of participation role NON-PARTICIPANT

Categories

(Calendar :: Dialogs, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: marcel, Assigned: bv1578)

References

Details

Attachments

(5 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3
Build Identifier: 1.0b2pre 20091209040234

The attachment shows that a "resource" i.e. meeting room invited to a meeting is not displayed properly in the attendees view (left most column). All possible icons are rendered instead of just the chair icon.

The relevant .ics section is 

ATTENDEE;CN=Meeting Room Boy kl;CUTYPE=RESOURCE;ROLE=NON-PARTICIPANT;PARTSTAT=ACCEPTED:mailto:boy.kl@employer.tld

According to rfc2445 4.2.3 CUTYPE=RESOURCE is a valid declaration.

Reproducible: Always
Sounds similar to Bug 529813.
Indeed, except that Bug 529813 says it's caused by a missing participation role. In my case it must be something else...
Component: Calendar Views → Dialogs
QA Contact: views → dialogs
I think this bug is slightly different from bug 529813 because here the attendee has a "NON-PARTICIPANT" role that Lightning handles from data point of view, but doesn't from the UI side (missing icon an related behavior of the interface) as reported here. Instead in bug 529813, the attendee doesn't have a role (I verified that |attendee.role| returns a null value) and in this case it seems the role should be a default value "REQ-PARTICIPANT" as reported on RFC 2445:
http://tools.ietf.org/html/rfc2445#section-4.2.16
(not completely sure of this because I've read only that section), so, the icon should be already defined.

In this patch I've added an icon to "calendar-event-dialog-attendees.png" file to show the "NON-PARTICIPANT" role case, but it's only for test because I've done a rough work copying and modifying the icon related to "OPT-PARTICIPANT", therefore the icon *must* be done by someone that know how to do this kind of work, that's not me ;-) (maybe my icon could stay there until someone do it in a different/better way).

The patch allows to toggle the icon by clicking on it in the attendee list and handles the event from a calendar with an attendee with "NON-PARTICIPANT" role.
Bellow two attachments with a screenshot and a calendar testcase (the same of bug 529813 but with the fourth attendee substituted with that one in comment #0).
Assignee: nobody → bv1578
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #417672 - Flags: review?(mschroeder)
Attached file Calendat testcase
the same sample ics calendar of bug 529813 but without the lines

ATTENDEE;PARTSTAT=ACCEPTED;RECEIVED-SEQUENCE=0;RECEIVED-DTSTAMP=20091118T0
 95832Z:mailto:44444@XXXX.org

substituted by:

ATTENDEE;CN=Meeting Room Boy
  kl;CUTYPE=RESOURCE;PARTSTAT=ACCEPTED;ROLE=NON-PARTICIPANT:mailto:boy.kl@employer.tld

(without wrap on the second line)
Forgot to include a dtd file. Sorry :-(.
Attachment #417672 - Attachment is obsolete: true
Attachment #417681 - Flags: review?(mschroeder)
Attachment #417672 - Flags: review?(mschroeder)
OS: Mac OS X → All
Hardware: x86 → All
Summary: Attendees view can't render resources properly → Invite Attendees dialog: icons are messed up in case of participation role NON-PARTICIPANT
I just wanted to add that the bug also exists in the event viewer dialog, so this should be reviewed, too.
After seeing the summary of this bug: it should be noted that the bug in the screenshot occurs on my installation with an attendee that has neither a PARTSTAT entry, nor an assigned ROLE.
Jdelic, see related Bug 529813. I think we need a more generic solution that doesn't break on missing participation role (Bug 529813) or unexpected participation role (like this bug).
so why not land the patch above changing it so that Lightning uses the new NON-PARTICIPANT icon for

  1. non-participants and
  2. unknown roles 

and additionally add some code that handles a completely absent ROLE-identifier as a REQ-PARTICIPANT as specified in RFC 2445? 

...or am I missing something? 

Btw., I would argue that this bug is blocking-1.0. as Outlook tends to create emails with a missing ROLE-identifier all the time in my experience. However, as I'm fairly new here, I'll leave the bug properties alone.
(In reply to comment #11)
> so why not land the patch above changing it so that Lightning uses the new
> NON-PARTICIPANT icon for
> 
>   1. non-participants and
>   2. unknown roles 
> 
> and additionally add some code that handles a completely absent ROLE-identifier
> as a REQ-PARTICIPANT as specified in RFC 2445? 
> 
> ...or am I missing something? 

I think your specific bug, as shown in your screenshot, is due to the absence of the PARTSTAT parameter because in that dialog there should be the status indication (ACCEPTED, DECLINED, NEEDS ACTION, TENTATIVE etc.). In this case, the default value should be "NEEDS ACTION" :
http://tools.ietf.org/html/rfc2445#section-4.2.12
"If not specified on a property that allows this parameter, the default
 value is NEEDS-ACTION."

Therefore, IMHO, again a different case from this bug  because the related icon exists (NEED ACTION) but the code doesn't handle the absence of the PARTSTAT parameter (similar to bug 529813). 
Reading rfc2445 it seems other cases should be considered for PARTSTAT parameter which depend on the event type "VEVENT", "VTODO" or "VJOURNAL" for which doesn't exist any icon (if I don't miss something because I'm fairly new here too ;-) e.g. status like "DELEGATED" or "COMPLETED" don't have a related status icon (but for sure they are less useful):
http://tinyurl.com/yekrdp6


About bug 529813, I verified that a simply patch like this one:

+   if (aAttendee && !aAttendee.role) {
+       aAttendee.role = "REQ-PARTICIPANT";
+   }

inside calendar-event-dialog-attendees.xml file, works with the ics calendar sample attached there, but obviously it needs further investigations (and it would need someone that knows Calendar code better than me ;-).
(In reply to comment #4)
> Created an attachment (id=417672) [details]
> proposal patch with an icon for the "NON-PARTICIPANT" case

Thanks Decathlon for the patch. However,

either I know too little about Calendaring, I'm missing something or the proposed patch tackles the problem from the wrong perspective.

http://tools.ietf.org/html/rfc2445#section-4.2.3 describes the various CUTYPEs. In my  case (this bug) it's a RESOURCE.
I believe that it's mainly the CUTYPE parameter that should drive the icon to be displayed and not the ROLE parameter (NON-PARTICIPANT, CHAIR, etc.). Hence, when the type is a resource one should not display an icon that depicts a person. I'm pretty sure there must be a resource icon around already?
This will be fixed by adding "-moz-image-region" in calendar-event-dialog.css in skin.

.role-icon {
    margin: 0 3px;
    list-style-image: url(chrome://calendar/skin/...png);
}
=>
.role-icon {
    margin: 0 3px;
    list-style-image: url(chrome://calendar/skin/...png);
    -moz-image-region: rect(0px 159px 16px 138px);
}
.role-icon[role="NON-PARTICIPANT"] {
    -moz-image-region: rect(14px 12px 28px 0px);
}

(The last "image-region" is just my idea, should be set as the correct one.)
Duplicate of this bug: 545096
Comment on attachment 417681 [details] [diff] [review]
 proposal patch with an icon for the "NON-PARTICIPANT" case -v2

r=philipp
Attachment #417681 - Flags: review?(mschroeder) → review+
marcel, we're happy to revise the icons in a different bug, Decathlon was just following the other icons we already have.

Tatsuya, your changes were also proposed in a different bug, I believe it was also mentioned in this bug.


Pushed to comm-central <http://hg.mozilla.org/comm-central/rev/05bf7f012f1a>

-> FIXED
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.0b2
Ok, fine. Since Bug 545096 was marked as a duplicate is it fixed, too?
Ahh, I see, sorry.
You need to log in before you can comment on or make changes to this bug.