New issue
Advanced search Search tips

Issue 911735 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Dec 19
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

Cannot update shifts on rota-ng

Project Member Reported by changwan@google.com, Dec 4

Issue description

Two problems:

1) When generating shifts,
I updated the shift but that was not reflected in what I can see in 'current shifts' section.

2) I cannot update the shifts from 'current shifts'.

olakar@, could you take a look?
 
Status: Started (was: Assigned)
Hi Changwan. 

Guess you've volunteered for the dogfood migration. Cool .. :)

I'll have a look.
Can't see that you've activated your rotations. 

You seem to be the owner of:

"Chrome on Android Stability Sheriff"
"WebView Bug Cop"

None of them have been activated from what I can see. 

If you do want to move your rotations over now and are fine with running into a few bugs I'm happy to add you to the dogfooders and work together with you to move your rotations over.
I intend to change "WebView Bug Cop" only.

I always felt that rotations.py is too complicated.
I thought that we're going to 

"Enable" is somewhat difficult to understand.
Supposedly, you can create shifts even before 'enable', then when you 'enable', the shifts are already there.
I was able to create some shifts. If I cannot edit it, I'm concerned that other people will receive incorrect notification about their rotations. So I cannot enable this right now.

> I thought that we're going to 
I thought that we're going to migrate to google internal version. But I guess it doesn't support external contributors..
All makes sense Changwan. 

Still interested in knowing what fails for you , I can see you've imported and/or generated some shifts. 

So when you press generate and then submit they don't show up in the current view? 

I tried it an seem to populate fine, this could be b/c of me being an admin in the service. 

- Does the submit give you an error?
- Does the reload of the page work after submit. 
- Do you get anything in the JS console? 


> - Does the submit give you an error?
No it didn't.

> - Does the reload of the page work after submit. 
Reload works, but still cannot update.

- Do you get anything in the JS console? 
Yes, I get this:

rotashiftcurrent.js:68 Uncaught (in promise) ReferenceError: fixComments is not defined
    at HTMLElement.sendJSON (rotashiftcurrent.js:68)
    at HTMLButtonElement.r.b (rotashiftcurrent.js:200)
    at M.handleEvent (parts.js:387)

Thx. a lot for digging into that Changwan. 

https://chromium-review.googlesource.com/c/infra/infra/+/1362792

Out for review. 

Pushed to https://rota-ng-staging.googleplex.com if you want to verify.
I just tried staging, here's my feedback:

1) 'Update shifts' in 'current shifts' section works. Thanks!
2) In the 'Generate shifts' section, you cannot update shifts after generation before submit.
3) The 'down' button in the 'Current shift' section' is not quite intuitive. I just realized that it dumps shifts starting from current rotation. Onhover help message would be helpful.
Thanks, verified that staging works correctly and also onhover help message worked!
I mean on staging, I've verifed that
1) shifts can be updated from 'generate shifts'.
2) onhover help message shows up.
changwan , again this feedback is great. 

The fix I pushed to staging wasn't fully finished so that's why I didn't update the bug yesterday. 

Anything else you find not intuitive there?
Documentation is coming but of-course better if it's not needed in the standard case. 

I'll push this fix together with some other fixes today.
This is just a nit, but when you press '-', the name just disappears.
I think this indicates an empty rotation or temporary unassignment,
it is not intuitive in a sense that the rotation still remains there.
Not sure, but having some message instead of 'empty slot' would be better.
For example: "(unassigned)" ?

In any case, I hope to see the changes go live soon. Thanks!

Project Member

Comment 14 by bugdroid1@chromium.org, Dec 6

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/32903632eecd5afe27640aba29378b28c96b9114

commit 32903632eecd5afe27640aba29378b28c96b9114
Author: Ola Karlsson <olakar@chromium.org>
Date: Thu Dec 06 22:51:12 2018

[rotang] Fixing the member select not considered on submit.

- The generate element now considers the select lists.
- Tooltips added to the Generated date/ShiftsToSchedule entries.
- Tooltip added to the arrow-down clear buttons on in the current shifts element.

Bug:  911735 
Change-Id: I4ca6f69ba4908ce6ebf4e7b6e015c68ab5594cb9
Reviewed-on: https://chromium-review.googlesource.com/c/1364850
Reviewed-by: Tiffany Zhang <zhangtiff@chromium.org>
Commit-Queue: Ola Karlsson <olakar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#19399}
[modify] https://crrev.com/32903632eecd5afe27640aba29378b28c96b9114/go/src/infra/appengine/rotang/cmd/app/static/src/rotashiftgenerate.js
[modify] https://crrev.com/32903632eecd5afe27640aba29378b28c96b9114/go/src/infra/appengine/rotang/cmd/app/static/src/rotashiftcurrent.js

One more thing - when you add a comment to the shifts, it worked, but got the following error message right next to 'Update Shifts' button:

googleapi: got HTTP response code 404 with body: Not Found


Also from Chrome's Console, I got the following error message:

Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': this name has already been used with this registry
    at Module.<anonymous> (https://rota-ng.appspot.com/static/dist/bundle.js:149:81068)
    at n (https://rota-ng.appspot.com/static/dist/bundle.js:1:110)
    at Object.<anonymous> (https://rota-ng.appspot.com/static/dist/bundle.js:149:80926)
    at n (https://rota-ng.appspot.com/static/dist/bundle.js:1:110)
    at https://rota-ng.appspot.com/static/dist/bundle.js:1:902
    at https://rota-ng.appspot.com/static/dist/bundle.js:1:911
/shiftsupdate:1


Failed to load resource: the server responded with a status of 500 ()


BTW, I've pressed 'Enable' button, but the rotation does not show up on the calendar yet. If it is a known issue, could you point me to it?
Hi Changwan.

Did you generate the shifts before or after you enabled? 
All the calendar write options switch on the enabled state. 

I'll clear up the documentation and also currently checking this out in the staging environment. There's a periodic Calendar <> Shift sync that should get the shifts with no calendar events sorted out.. 

Thx. again for testing things out. I'll create a separate bug for this.

Did you just create some shifts with the rotation.py tool? 

When the cron job comes by RotaNG will create the missing shifts in the calendar. 
Since the legacy and new entries don't line up in time, having 09:00 in RotaNG and Full Day (00:00 UTC) in rotation.py the shifts will not line up. 
This will give duplicate calendar entries. 

I disabled your rotation for now since it seem the calendar permissions now allow both rotation tools at the same time.
> Did you generate the shifts before or after you enabled? 
Hmm.. I'm not sure.

> Did you just create some shifts with the rotation.py tool? 
No, I didn't.

Actually, I've created a new calendar for the new rotations, as I'm currently not an owner of the previous calendar. The idea was to switch over by asking
people to use the new calendar entries.

How can we line up full day with RotaNG?

You gave me a bit of a scare yesterday when I was checking out your calendar, thought it was wiped somehow. 

After some digging I realized you had changed your calendar. During that process I also found the owner of the calendar to be the chromiumcalendar@gmail.com. 
I've got access to that account so added you to the calendar too .. 

I'll enable your configuration again and let's see if the entries show up.. 
Sorry if I created some calendar event spam for you.. Events looks like they've synced up.
Status: Verified (was: Started)
Thanks, I think all the issues have been fixed, so closing this bug.

Sign in to add a comment