Changeset 1768


Ignore:
Timestamp:
Dec 4, 2012, 10:34:30 AM (10 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #437: Rules for comparing 'sampling date' and 'RNA later' date should be the same

Location:
extensions/net.sf.basedb.reggie/trunk/resources
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/resources/persinfo.jsp

    r1767 r1768  
    453453  {
    454454    var samplingTimestamp = Dates.parseString(frm.samplingDate.value + ' ' + frm.samplingTime.value, 'yyyyMMdd Hmm');
    455     if (samplingTimestamp && rnaLaterTimestamp.getDate() != samplingTimestamp.getDate())
    456     {
    457       setInputStatus('rnaLaterDate', 'Sampling and RNA later dates are different', 'warning');
     455    if (samplingTimestamp)
     456    {
     457      if (rnaLaterTimestamp.getDate() != samplingTimestamp.getDate())
     458      {
     459        setInputStatus('rnaLaterDate', 'Sampling and RNA later dates are different', 'warning');
     460      }
     461      else if (rnaLaterTimestamp.getTime() < samplingTimestamp.getTime())
     462      {
     463        setInputStatus('rnaLaterDate', 'RNA later time is before Sampling time', 'warning');
     464      }
    458465    }
    459466  }
  • extensions/net.sf.basedb.reggie/trunk/resources/specimentube.jsp

    r1726 r1768  
    613613      if (samplingTimestamp)
    614614      {
    615         if (rnaLaterTimestamp.getDate() == samplingTimestamp.getDate() && rnaLaterTimestamp.getTime()<samplingTimestamp.getTime())
    616         {
    617           setInputStatus('rnaLaterDate', 'RNA-later date+time must later then Sampling date+time','invalid');
    618           return;
    619         }
    620615        if (rnaLaterTimestamp.getDate() != samplingTimestamp.getDate())
    621616        {
    622617          setInputStatus('rnaLaterDate', 'Sampling and RNA later dates are different', 'invalid');
     618          return;
     619        }
     620        if (rnaLaterTimestamp.getTime() < samplingTimestamp.getTime())
     621        {
     622          setInputStatus('rnaLaterDate', 'RNA later time must be later than Sampling time','invalid');
    623623          return;
    624624        }
Note: See TracChangeset for help on using the changeset viewer.