wolfgangimig / itol

JOA based issue tracker for Microsoft Outlook
23 stars 6 forks source link

incorrect operation of the "Show" button #47

Open Sledav opened 8 years ago

Sledav commented 8 years ago

When I enter the Issue ID, and press the button "Show", Addin does not show the Issue. Before click: 2016-05-21_091755 After click 2016-05-21_091813 The Issue is exist 2016-05-21_091858

Please? fix it.

Sledav commented 8 years ago

I found an error. I replaced all occurrences of "[R-" with "[#" (#44) . When I cancelled my changes, it works fine. Can You fix it?

wolfgangimig commented 8 years ago

In IssueServiceImpl.js, line 1683, relies on a prefix length of 3 letters before the issue number. If you want to use a 2 letter prefix, you have to edit this line:

function injectIssueIdIntoMailSubject(subject, iss) {
...
    else {
    var p = subject.indexOf("[#");
    if (p >= 0) {
        var q = subject.indexOf("]", p + 2); /// ----- line 1683: replace p+3 with p+2
        if (q >= 0) {
            ret = subject.substring(0, p);
            ret += subject.substring(q + 1);
        }
    }
}
Sledav commented 8 years ago

I changed it, but AddIn doesn't work correctly. It inserting "[R-" instead "[#". See my files IssueServiceImpl.js and log file. FILES.zip

wolfgangimig commented 8 years ago

You're right. The modification above is not sufficient for showing existing issues. Unfortunately, this functionality uses a hard-coded prefix internally. To workaround this, go through the following steps.

Sledav commented 8 years ago

Thanks, now it's work.