[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2022-11-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

Andrew Isherwood  changed:

   What|Removed |Added

 CC|bugzi...@warmlight.co.uk|

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-05-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

Joy Nelson  changed:

   What|Removed |Added

 CC||j...@bywatersolutions.com

--- Comment #30 from Joy Nelson  ---
does not apply cleanly to 19.11 not backported

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-05-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

Agustín Moyano  changed:

   What|Removed |Added

 Blocks|20936   |


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20936
[Bug 20936] Holds History for patrons in OPAC
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-05-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

--- Comment #29 from Martin Renvoize  ---
Nice work everyone!

Pushed to master for 20.05

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-05-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

Martin Renvoize  changed:

   What|Removed |Added

 Status|Passed QA   |Pushed to master
 Version(s)||20.05.00
released in||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-04-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

Agustín Moyano  changed:

   What|Removed |Added

 Blocks||25328


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25328
[Bug 25328] Date formatting from JS - Remove tz handling
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-04-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

--- Comment #28 from Jonathan Druart  
---
I still think we are doing messy stuff with the timezone. I may be wrong (don't
have the situation clear in mind right now) be I feel like the whole timezone
handling should be removed from the JS code.

If you think I am wrong, you should prove it to me with trivial and easy to
follow examples.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-04-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

Jonathan Druart  changed:

   What|Removed |Added

 Attachment #101910|0   |1
is obsolete||
 Attachment #102157|0   |1
is obsolete||

--- Comment #26 from Jonathan Druart  
---
Created attachment 104025
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104025=edit
Bug 24980: (RM follow-up) Only add timezone if passed a date-time

This patch prevents a timezone from being assigned to the js moment if
the input string is only at the full-date and not date-time resolution

To test:
1. Do not apply this patch
2. Set your system time zone to CET
3. Apply previous patch (It's just for test)
4. In your browser go to koha main page, open a console and type
$date('2020-03-25', {tz:
   'UTC'})
CHECK => you sould get '03/24/2020' (notice day is 24 instead of 25)
5. Apply this patch and reload the browser
6. repeat step 4
SUCCESS => now you get '03/25/2020' (day is correct)
7. Sing off

Signed-off-by: Martin Renvoize 
Signed-off-by: Agustin Moyano 

Signed-off-by: Jonathan Druart 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-04-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

--- Comment #27 from Jonathan Druart  
---
Created attachment 104026
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104026=edit
Bug 24980: (follow-up) return '' when date is null

Signed-off-by: Jonathan Druart 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-04-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

Jonathan Druart  changed:

   What|Removed |Added

 Status|In Discussion   |Passed QA

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-04-09 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

--- Comment #25 from Jonathan Druart  
---
So basically this first patch is for (maybe) later, and should not block other
bug reports?
And second patch should be moved somewhere else.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-04-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

--- Comment #24 from Agustín Moyano  ---
(In reply to Jonathan Druart from comment #23)
> (In reply to Jonathan Druart from comment #22)
> > (In reply to Agustín Moyano from comment #20)
> > > (In reply to Jonathan Druart from comment #18)
> > > > How do I test the timezone handling in real life? ie. without using the
> > > > console.
> > > 
> > > Actually there is no place (even bug 20936) that brings timestamp or
> > > datetime. If you want to try to see if it works with koha's configured
> > > timezone you should use the console without the tz option, then format a
> > > datetime with timezone. Later change koha's timezone, restart plack and
> > > reload the page and try to format the same datetime, it should change
> > > according to the new timestamp
> > > 
> > > If it works in the console, it should work on real life (it's the same
> > > function)
> > 
> > Do we need it then?
> 
> Changing status as we are waiting for an answer.

Yes, I think we do.. I'm sure at some point there's going to be a datatable
that brings a datetime or timestamp from the database.

If you'd like to test without console, you can locally modify the table in bug
20936 and display the timestamp column, that it's a timestamp as it's name
suggests.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-04-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

Jonathan Druart  changed:

   What|Removed |Added

 Status|Signed Off  |In Discussion

--- Comment #23 from Jonathan Druart  
---
(In reply to Jonathan Druart from comment #22)
> (In reply to Agustín Moyano from comment #20)
> > (In reply to Jonathan Druart from comment #18)
> > > How do I test the timezone handling in real life? ie. without using the
> > > console.
> > 
> > Actually there is no place (even bug 20936) that brings timestamp or
> > datetime. If you want to try to see if it works with koha's configured
> > timezone you should use the console without the tz option, then format a
> > datetime with timezone. Later change koha's timezone, restart plack and
> > reload the page and try to format the same datetime, it should change
> > according to the new timestamp
> > 
> > If it works in the console, it should work on real life (it's the same
> > function)
> 
> Do we need it then?

Changing status as we are waiting for an answer.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-04-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

--- Comment #22 from Jonathan Druart  
---
(In reply to Agustín Moyano from comment #20)
> (In reply to Jonathan Druart from comment #18)
> > How do I test the timezone handling in real life? ie. without using the
> > console.
> 
> Actually there is no place (even bug 20936) that brings timestamp or
> datetime. If you want to try to see if it works with koha's configured
> timezone you should use the console without the tz option, then format a
> datetime with timezone. Later change koha's timezone, restart plack and
> reload the page and try to format the same datetime, it should change
> according to the new timestamp
> 
> If it works in the console, it should work on real life (it's the same
> function)

Do we need it then?

(In reply to Agustín Moyano from comment #21)
> (In reply to Martin Renvoize from comment #19)
> > I initially liked that final patch.. but do we believe it's correct
> > consistency wise given that dt_from_string (which we're using in KohaDates
> > which with function is emulating) will return 'now' when passed 'undef'. ?
> 
> In my opinion, if the API's date is null, we shouldn't return current date.

I agree, this patch looks good to me.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-04-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

--- Comment #21 from Agustín Moyano  ---
(In reply to Martin Renvoize from comment #19)
> I initially liked that final patch.. but do we believe it's correct
> consistency wise given that dt_from_string (which we're using in KohaDates
> which with function is emulating) will return 'now' when passed 'undef'. ?

In my opinion, if the API's date is null, we shouldn't return current date.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-04-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

--- Comment #20 from Agustín Moyano  ---
(In reply to Jonathan Druart from comment #18)
> How do I test the timezone handling in real life? ie. without using the
> console.

Actually there is no place (even bug 20936) that brings timestamp or datetime.
If you want to try to see if it works with koha's configured timezone you
should use the console without the tz option, then format a datetime with
timezone. Later change koha's timezone, restart plack and reload the page and
try to format the same datetime, it should change according to the new
timestamp

If it works in the console, it should work on real life (it's the same
function)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-04-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

--- Comment #19 from Martin Renvoize  ---
I initially liked that final patch.. but do we believe it's correct consistency
wise given that dt_from_string (which we're using in KohaDates which with
function is emulating) will return 'now' when passed 'undef'. ?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-04-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

--- Comment #18 from Jonathan Druart  
---
How do I test the timezone handling in real life? ie. without using the
console.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-03-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

Agustín Moyano  changed:

   What|Removed |Added

 Status|Failed QA   |Signed Off

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-03-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

--- Comment #17 from Agustín Moyano  ---
Created attachment 102157
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=102157=edit
Bug 24980: (follow-up) return '' when date is null

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-03-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

--- Comment #16 from Jonathan Druart  
---
Yes, that was for bug 20936!

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-03-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

--- Comment #15 from Agustín Moyano  ---
(In reply to Agustín Moyano from comment #13)
> Hi Jonathan,
> 
> (In reply to Jonathan Druart from comment #11)
> > 0. Dates look great now! :)
> > 
> > 1. Why not having current holds in the table (behavior intranet-side,
> > members/holdshistory.pl)
> 
> Controller uses object.search, and places order by in dbic.. to replicate
> current behaviour in intranet I should one object.search for both current
> and old holds, merge and sort both arrays depending on search column... I
> decided to wait till requests and old_requests tables were merged to have
> current intranet behaviour 
> 
> > 
> > 2. Is there a plan to make existing intranet-side view using the REST API?
> > ie. only 1 code to maintain.
> > 
> 
> Once we can replicate current intranet behaviour, we can think on changing
> intranet-side
> 
> > 3. Why only 10 results displayed by default? Usually 20
> > 
> 
> ok, will change that
> 
> > 4. Why no way to modify the number of results displayed? Basically, why
> > DataTable does not display as other table? (like no page number, search box,
> > etc.)
> > Is that the OPAC style?
> > 
> 
> OPAC has no style for DataTables.. only intranet has. What you see in other
> tables in OPAC was coded outside DataTables. I thought it best to have a
> search box and page number, but I'm open to suggestions.
> 
> > 5. Not translatable strings:
> > 187 if(row.cancelation_date) return 'Canceled';
> > 188 if (data == 'F') return 'Fulfilled';
> > 189 if (data == 'W') return 'Waiting';
> > 190 if (data == 'T') return 'In Transit';
> > 191 return 'Pending';
> > 
> 
> Good catch.. will fix that
> 
> > 6. opac-holdsrecord.pl vs members/holdshistory.pl
> > Should not we use the same script names?
> 
> copied the name from opac-readingrecord, but it can be changed

Jonathan, I just realized this are comments mostly for bug 20936, not this
one.. I'll change what was suggested in point 7, and put this one in SO again.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-03-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

--- Comment #14 from Agustín Moyano  ---
(In reply to Jonathan Druart from comment #12)
> 7. Should not deal with that in js-date-format.inc?
>   (data&&$date(data))||'';

ok, it can be done

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-03-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

--- Comment #13 from Agustín Moyano  ---
Hi Jonathan,

(In reply to Jonathan Druart from comment #11)
> 0. Dates look great now! :)
> 
> 1. Why not having current holds in the table (behavior intranet-side,
> members/holdshistory.pl)

Controller uses object.search, and places order by in dbic.. to replicate
current behaviour in intranet I should one object.search for both current and
old holds, merge and sort both arrays depending on search column... I decided
to wait till requests and old_requests tables were merged to have current
intranet behaviour 

> 
> 2. Is there a plan to make existing intranet-side view using the REST API?
> ie. only 1 code to maintain.
> 

Once we can replicate current intranet behaviour, we can think on changing
intranet-side

> 3. Why only 10 results displayed by default? Usually 20
> 

ok, will change that

> 4. Why no way to modify the number of results displayed? Basically, why
> DataTable does not display as other table? (like no page number, search box,
> etc.)
> Is that the OPAC style?
> 

OPAC has no style for DataTables.. only intranet has. What you see in other
tables in OPAC was coded outside DataTables. I thought it best to have a search
box and page number, but I'm open to suggestions.

> 5. Not translatable strings:
> 187 if(row.cancelation_date) return 'Canceled';
> 188 if (data == 'F') return 'Fulfilled';
> 189 if (data == 'W') return 'Waiting';
> 190 if (data == 'T') return 'In Transit';
> 191 return 'Pending';
> 

Good catch.. will fix that

> 6. opac-holdsrecord.pl vs members/holdshistory.pl
> Should not we use the same script names?

copied the name from opac-readingrecord, but it can be changed

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-03-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

--- Comment #12 from Jonathan Druart  
---
7. Should not deal with that in js-date-format.inc?
  (data&&$date(data))||'';

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-03-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

Jonathan Druart  changed:

   What|Removed |Added

 Status|Signed Off  |Failed QA

--- Comment #11 from Jonathan Druart  
---
0. Dates look great now! :)

1. Why not having current holds in the table (behavior intranet-side,
members/holdshistory.pl)

2. Is there a plan to make existing intranet-side view using the REST API?
ie. only 1 code to maintain.

3. Why only 10 results displayed by default? Usually 20

4. Why no way to modify the number of results displayed? Basically, why
DataTable does not display as other table? (like no page number, search box,
etc.)
Is that the OPAC style?

5. Not translatable strings:
187 if(row.cancelation_date) return 'Canceled';
188 if (data == 'F') return 'Fulfilled';
189 if (data == 'W') return 'Waiting';
190 if (data == 'T') return 'In Transit';
191 return 'Pending';

6. opac-holdsrecord.pl vs members/holdshistory.pl
Should not we use the same script names?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-03-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

Martin Renvoize  changed:

   What|Removed |Added

 Blocks|24765   |24999


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24765
[Bug 24765] Updated on date in Claims returned starts off as 01/01/1970
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24999
[Bug 24999] Date not correctly formatted in claims table
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-03-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

Martin Renvoize  changed:

   What|Removed |Added

 Blocks||24765


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24765
[Bug 24765] Updated on date in Claims returned starts off as 01/01/1970
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-03-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

--- Comment #10 from Martin Renvoize  ---
OK.. so my understanding of why we need to support timezone in this js function
at all is that we are effectively replacing the native toLocalDateString(). 
That function, in my understanding, does too things.. it converts Date
prototypes to a locale based formatted string and also ensures the output is in
the local timezone (if the original Date prototype has a timezone associated
with it upon creation).

Our function takes an RFC3339 formatted string, which is what the API returns.
These strings have timezones attached, if we used toLocalDateString to output
them, then we would get the timezone of the browser applied.. which may differ
from our koha instances configured timezone.. and thus the one that all our
templates currently output in.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-03-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

--- Comment #9 from Agustín Moyano  ---
(In reply to Jonathan Druart from comment #8)
> When should we deal with tz when displaying dates?
> 
> What are the different possibilities offered by js-date-format.inc?

Hi Jonathan, with this patch, js-date-format can detect if incoming date is
just date only, or something else.. 

So, this functions should be used to transform date and datetime to Koha's
defined format. If the first, it's just transformed to the corresponding
format, if the later it will also be transformed to the corresponding timezone.

With Martin's bug 24850, datetimes from database has timezone now, so I don't
believe we will have more cases, but maybe I'm not seeing the big picture.

Do you have any other case in mind?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-03-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

Jonathan Druart  changed:

   What|Removed |Added

 CC||jonathan.dru...@bugs.koha-c
   ||ommunity.org

--- Comment #8 from Jonathan Druart  
---
When should we deal with tz when displaying dates?

What are the different possibilities offered by js-date-format.inc?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-03-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

--- Comment #7 from Agustín Moyano  ---
(In reply to Agustín Moyano from comment #4)
> 4. In your browser go to koha main page, open a console and type
> $date('2020-03-25', {tz:
>'UTC'})

Don't know why it added an enter.. in console you should type like this

$date(''2020-03-25', {tz:'UTC'})

without that enter after "tz:"

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-03-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

Martin Renvoize  changed:

   What|Removed |Added

 CC||andrew.isherwood@ptfs-europ
   ||e.com,
   ||k...@bywatersolutions.com

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-03-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

Martin Renvoize  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

--- Comment #6 from Martin Renvoize  ---
Excellent, thanks Agustin.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-03-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

--- Comment #5 from Agustín Moyano  ---
(In reply to Martin Renvoize from comment #2)
> How does that look to you?

Great, it was just what I was looking for.. it just lacked the actual execution
of creationData function.. too much Perl I guess, hehe

Thanks!

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-03-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

--- Comment #4 from Agustín Moyano  ---
Created attachment 101910
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101910=edit
Bug 24980: (RM follow-up) Only add timezone if passed a date-time

This patch prevents a timezone from being assigned to the js moment if
the input string is only at the full-date and not date-time resolution

To test:
1. Do not apply this patch
2. Set your system time zone to CET
3. Apply previous patch (It's just for test)
4. In your browser go to koha main page, open a console and type
$date('2020-03-25', {tz:
   'UTC'})
CHECK => you sould get '03/24/2020' (notice day is 24 instead of 25)
5. Apply this patch and reload the browser
6. repeat step 4
SUCCESS => now you get '03/25/2020' (day is correct)
7. Sing off

Signed-off-by: Martin Renvoize 
Signed-off-by: Agustin Moyano 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-03-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

Agustín Moyano  changed:

   What|Removed |Added

 Attachment #101794|0   |1
is obsolete||

--- Comment #3 from Agustín Moyano  ---
Created attachment 101909
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101909=edit
[DO NOT PUSH] Bug 24980: This patch is only for test purposes

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-03-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

Martin Renvoize  changed:

   What|Removed |Added

   Severity|enhancement |major

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-03-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

Martin Renvoize  changed:

   What|Removed |Added

   Assignee|oleon...@myacpl.org |agustinmoy...@theke.io

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-03-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

--- Comment #1 from Martin Renvoize  ---
Created attachment 101794
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101794=edit
Bug 24980: (RM follow-up) Only add timezone if passed a date-time

This patch prevents a timezone from being assigned to the js moment if
the input string is only at the full-date and not date-time resolution

Signed-off-by: Martin Renvoize 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-03-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

Martin Renvoize  changed:

   What|Removed |Added

 CC||martin.renvoize@ptfs-europe
   ||.com
 Status|NEW |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24980] Date formatting from JS - use timezone only with dates with offset

2020-03-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24980

--- Comment #2 from Martin Renvoize  ---
How does that look to you?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/