Test Cycle Bug

Issue #222 resolved
Elizabeth Boehnke created an issue

Hello,

I have a test cycle list with 10 different lists cycling. I noticed today that while performing the test, if you choose days 1 - 9, you are able to navigate smoothly. However, if I select Day 10, then if I try to select any other day, I get a 404 page not found. When I looked at the URL, I noticed that when going back and forth for day 1 - 9, I would get a URL like .../qa/utc/perform/76/?day=9&next=/qa/unit/2/frequency/annual/

Then if I go to day 10 (url = .../qa/utc/perform/76/?day=10&next=/qa/unit/2/frequency/annual/ ) and try to go back to day 9, QATrackPlus attempts to access the following URL:

.../qa/utc/perform/76/?day=90&next=/qa/unit/2/frequency/annual/.

Since there isn't a Day 90, this of course gives an error. I'm wondering if there is something up with the Regex in the url definitions? Not sure, but I thought I'd let you know.

Thanks again for putting this project together,

Elizabeth

Comments (7)

  1. Randle Taylor

    Thanks Elizabeth...I was able to reproduce the problem. The issue is on line 673 of qa.js (don't remember now, but I guess I never anticipated 10 or more lists in a cycle.)

    That line needs to be replaced with var next = cur.replace(/day=(next|[0-9]+)/,"day="+day); You can patch it yourself in qatrack/static/js/qa.js (not the copy in qatrack/qa/static/js/) and it will be fixed in the next release.

  2. Elizabeth Boehnke reporter

    Thank you so much for looking into this. I went ahead and patched it myself with the exact code above, but it is still trying to access .../qa/utc/perform/76/?day=90&next=/qa/unit/2/frequency/annual/ instead of day=9, after I have selected Day 10. This only happens when going from Day 10 to another, lower day; not when switching among Days 1-9.

    In fact, now it's getting more interesting. Going back to Day 10 tries to access .../qa/utc/perform/76/?day=100&next=/qa/unit/2/frequency/annual/ (Ha! that would be a fun number of Test Cycles :-P ).

    I can, however, always navigate to Day 1 (.../qa/utc/perform/76/?day=next0&next=/qa/unit/2/frequency/annual/)

    Thanks again,

    Elizabeth

  3. Randle Taylor

    Are you running with DEBUG=True in your settings right now? If so then you need to patch qatrack/qa/static/js/qa.js as well. Also, do a hard refresh (Ctrl+Shift+R in Chrome) so that the cached copy of qa.js is thrown out and the modified copy will be loaded. I can't reproduce the issue with that fix in place.

  4. Log in to comment