[Costcontrol]Reset report Starting on is not started from 31st in Usage graph

RESOLVED DUPLICATE of bug 1078243

Status

Firefox OS
Gaia::Cost Control
--
major
RESOLVED DUPLICATE of bug 1078243
3 years ago
3 years ago

People

(Reporter: vsireesha246, Assigned: mai)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [LibGLA,TD103176,QE2, B])

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

3 years ago
Steps to reproduce:

1.Open Usage app and configure FTE
2.Click on Settings button
3.Reset report as Monthly and select Starting on 31st
4.click on Done and check the Usage graph

Actual:The graph is not starting from 31st
Expected:Graph should start from 31st
(Reporter)

Updated

3 years ago
Whiteboard: [LibGLA,TD103176,QE2, B]
(Reporter)

Comment 1

3 years ago
Hi Mai,

As per the code in datausage.js 
var NEVER_PERIOD = 30 * DAY; 
we are using 30 days in calculateUpperDate() function.

So we need to find the way for is the month having 30 or 31 days? and we might have to consider Feb month as well.

Thanks..
Sireesha
Flags: needinfo?(mri)
Hi Vivien, 

Could you please spare some time to look into this ? Thanks!
Flags: needinfo?(21)
(Assignee)

Updated

3 years ago
Assignee: nobody → mri
Flags: needinfo?(mri)
(Assignee)

Comment 3

3 years ago
Created attachment 8499414 [details] [review]
patch v1.0

Hi Salva,
would you mind reviewing the patch?
Regards Mai
Attachment #8499414 - Flags: review?(salva)
The patch is ready, removing ni to Vivien.
Flags: needinfo?(21)
Comment on attachment 8499414 [details] [review]
patch v1.0

I think we need to rethink this. What if you are in January, 31st. The period shown will be from December 31st to February 2nd? It makes no sense to me. Let's talk on Monday.
Attachment #8499414 - Flags: review?(salva)
(Reporter)

Comment 6

3 years ago
Created attachment 8500371 [details] [diff] [review]
Bug_1074052.patch

Hi Mai,

Would you please check this patch.

Thanks..
Sireesha
Attachment #8500371 - Flags: feedback?(mri)
(Assignee)

Comment 7

3 years ago
Comment on attachment 8500371 [details] [diff] [review]
Bug_1074052.patch

The patch does not works for all the use cases.
Attachment #8500371 - Flags: feedback?(mri)
(Reporter)

Comment 8

3 years ago
May be we can replace the if condition to check the given date is last day of that month,we can reset it.is there any such function to tell the date is last day of that month.
(Assignee)

Updated

3 years ago
Attachment #8499414 - Flags: review?(salva)
(Reporter)

Comment 9

3 years ago
Hi Mai,

Attachment 8499414 [details] patch i checked.
Some time if we select 29,30,31 will not work for monthly and sometime if i select starting on 1st it is considering from 2 months(or till the date) and the graph samples are more,so the line are shown more in number.

Thanks..
Sireesha
(Reporter)

Comment 10

3 years ago
Hi Mai,

I tested your updated patch and it works fine.

Thanks..
Siresha


(In reply to vsireesha246 from comment #9)
> Hi Mai,
> 
> Attachment 8499414 [details] patch i checked.
> Some time if we select 29,30,31 will not work for monthly and sometime if i
> select starting on 1st it is considering from 2 months(or till the date) and
> the graph samples are more,so the line are shown more in number.
> 
> Thanks..
> Sireesha
Attachment #8500371 - Flags: review?(21)
Attachment #8500371 - Flags: feedback?(tzhuang)
Hi Vivien, since Salvador is PTO until October.26, would you mind helping us review the patch ?

Hi Tu-Lin, could you also please provide your feedback on the patch ?

Thank you very much !
Hi Tim, would you mind providing some comments or helping us review this bug ?

Thanks!
Flags: needinfo?(timdream)
Comment on attachment 8500371 [details] [diff] [review]
Bug_1074052.patch

I cannot give feedback on it because I am not familiar with this part. 

But in general I think it need some comment to explain why it directly change newDate to 0 when it is 31. And I think we should let costcontrol owner to decide whether this change is reasonable.

Thanks
Attachment #8500371 - Flags: feedback?(tzhuang)
(In reply to Rachelle Yang [:ryang][ryang@mozilla.com] from comment #12)
> Hi Tim, would you mind providing some comments or helping us review this bug
> ?
> 
> Thanks!

Unfortunately I can't review this either according to module ownership rules.

https://wiki.mozilla.org/Modules/FirefoxOS#Usage
Flags: needinfo?(timdream)
Sorry guys, I'm closing this bug as dup of 1078243. This is not blocking (since I doubt about which company is setting the starting billing period in a risky date not present in all months), we are already waiting for UX input in the other bug and we need that specification. All the work about what to do when starting at the end of the month is just opinion so let's solve this in a proper way once and for all.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1078243
Attachment #8499414 - Flags: review?(salva)
Comment on attachment 8500371 [details] [diff] [review]
Bug_1074052.patch

Review of attachment 8500371 [details] [diff] [review]:
-----------------------------------------------------------------

Clearing review as it looks like it's being handled in another bug.
Attachment #8500371 - Flags: review?(21)
(Assignee)

Comment 17

3 years ago
Created attachment 8524383 [details]
patch for v2.0

The solution for v2.0 is on the patch for "Bug 1078243 - [Costcontrol] When the Starting day of the reset period is 31th, the app does not calculated correctly the end of the reset period."
Attachment #8500371 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.