Merge lp:~svwilliams/loco-team-portal/707123-add-child-task-from-update into lp:loco-team-portal

Proposed by Stephen V. Williams
Status: Merged
Merged at revision: 640
Proposed branch: lp:~svwilliams/loco-team-portal/707123-add-child-task-from-update
Merge into: lp:loco-team-portal
Diff against target: 75 lines (+12/-2)
3 files modified
loco_directory/meetings/urls.py (+1/-0)
loco_directory/meetings/views.py (+10/-2)
loco_directory/templates/meetings/agenda_item_update.html (+1/-0)
To merge this branch: bzr merge lp:~svwilliams/loco-team-portal/707123-add-child-task-from-update
Reviewer Review Type Date Requested Status
Michael Hall (community) Needs Fixing
Review via email: mp+82802@code.launchpad.net

Commit message

/templates/meeting/agenda_item_update.html - Added a link-button to update the take the user to add-item-add-child passing team meeting and agenda item
meeting/url.py - Added a url redirect linking the add-item-add-child to add-item-new
meeting/view.py - Added agenda-item-id to add-item new setting it to None automatically and set the parent id of the new agenda item if it is set

Description of the change

/templates/meeting/agenda_item_update.html - Added a link-button to update the take the user to add-item-add-child passing team meeting and agenda item
meeting/url.py - Added a url redirect linking the add-item-add-child to add-item-new
meeting/view.py - Added agenda-item-id to add-item new setting it to None automatically and set the parent id of the new agenda item if it is set

Does not save the update agenda item before going to the new agenda item. This may need to be done before this is pushed in or could be set as another bitsize bug ... up to the reviewer

To post a comment you must log in.
Revision history for this message
Michael Hall (mhall119) wrote :

On line 21 of the diff, attribute=none doesn't seem to belong. What is this for?

review: Needs Fixing
Revision history for this message
Adnane Belmadiaf (daker) wrote :

Hey Stephen, any update on this ?

Revision history for this message
Stephen V. Williams (svwilliams) wrote :

Hi Adnane,

I'll have to double check. I got behind on all of the stuff I was doing for
the portal with changing jobs and moving to Colorado. I'll check tonight
and get back with you ASAP. My recollection is I fixed the line, but I may
have forgotten to push to launchpad.

Thank you,
Stephen

*Stephen V. Williams*
Software Engineer

<http://plus.google.com/110344925712015359478/about>

On Mon, Nov 5, 2012 at 2:22 PM, Adnane Belmadiaf <email address hidden>wrote:

> Hey Stephen, any update on this ?
> --
>
> https://code.launchpad.net/~svwilliams/loco-team-portal/707123-add-child-task-from-update/+merge/82802
> You are the owner of
> lp:~svwilliams/loco-team-portal/707123-add-child-task-from-update.
>

Revision history for this message
Adnane Belmadiaf (daker) wrote :

Thanks Stephen i have merged this.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'loco_directory/meetings/urls.py'
--- loco_directory/meetings/urls.py 2011-03-16 18:35:53 +0000
+++ loco_directory/meetings/urls.py 2011-11-19 23:27:24 +0000
@@ -17,6 +17,7 @@
17 url(r'^add/$', 'meetings.views.team_meeting_select', name='team-meeting-select'),17 url(r'^add/$', 'meetings.views.team_meeting_select', name='team-meeting-select'),
1818
19 url(r'^team/(?P<team_meeting_id>\d+)/agenda/(?P<agenda_item_id>\d+)/delete/$', 'meetings.views.agenda_item_delete', name='agenda-item-delete'),19 url(r'^team/(?P<team_meeting_id>\d+)/agenda/(?P<agenda_item_id>\d+)/delete/$', 'meetings.views.agenda_item_delete', name='agenda-item-delete'),
20 url(r'^team/(?P<team_meeting_id>\d+)/agenda/(?P<agenda_item_id>\d+)/add-child/$', 'meetings.views.agenda_item_new', name='agenda-item-add-child'),
20 url(r'^team/(?P<team_meeting_id>\d+)/agenda/(?P<agenda_item_id>\d+)/update/$', 'meetings.views.agenda_item_update', name='agenda-item-update'),21 url(r'^team/(?P<team_meeting_id>\d+)/agenda/(?P<agenda_item_id>\d+)/update/$', 'meetings.views.agenda_item_update', name='agenda-item-update'),
21 url(r'^team/(?P<team_meeting_id>\d+)/agenda/add/$', 'meetings.views.agenda_item_new', name='agenda-item-new'),22 url(r'^team/(?P<team_meeting_id>\d+)/agenda/add/$', 'meetings.views.agenda_item_new', name='agenda-item-new'),
22 23
2324
=== modified file 'loco_directory/meetings/views.py'
--- loco_directory/meetings/views.py 2011-03-18 13:37:13 +0000
+++ loco_directory/meetings/views.py 2011-11-19 23:27:24 +0000
@@ -259,7 +259,7 @@
259 return redirect( team_meeting_object )259 return redirect( team_meeting_object )
260 else:260 else:
261 form = TeamMeetingForm(instance=team_meeting_object)261 form = TeamMeetingForm(instance=team_meeting_object)
262 262 attribute=none
263 context = {263 context = {
264 'form': form,264 'form': form,
265 }265 }
@@ -270,10 +270,11 @@
270 return redirect( team_meeting_object )270 return redirect( team_meeting_object )
271271
272@login_required272@login_required
273def agenda_item_new(request, team_meeting_id):273def agenda_item_new(request, team_meeting_id, agenda_item_id=None):
274 """274 """
275 new agenda item275 new agenda item
276 """276 """
277
277 team_meeting_object = get_object_or_404(TeamMeeting, pk=team_meeting_id)278 team_meeting_object = get_object_or_404(TeamMeeting, pk=team_meeting_id)
278 try:279 try:
279 user = UserProfile.objects.get(user=request.user)280 user = UserProfile.objects.get(user=request.user)
@@ -283,6 +284,11 @@
283 except UserProfile.DoesNotExist:284 except UserProfile.DoesNotExist:
284 agenda_item_object = AgendaItem(meeting=team_meeting_object, 285 agenda_item_object = AgendaItem(meeting=team_meeting_object,
285 created_date=datetime.datetime.now())286 created_date=datetime.datetime.now())
287
288 #coming from another agenda item we pass the agenda id to set it as the parent
289 if agenda_item_id != None:
290 agenda_item_object.parent = get_object_or_404(AgendaItem, pk=agenda_item_id)
291
286 is_member = False292 is_member = False
287 for team in team_meeting_object.teams.all():293 for team in team_meeting_object.teams.all():
288 if launchpad.is_team_member(request.user, team):294 if launchpad.is_team_member(request.user, team):
@@ -311,11 +317,13 @@
311 request.user.message_set.create(message='%s %s' % (_('You can not add a new agenda item for this team meeting.'), _('You are not a member of the team or on the LoCo Council.')))317 request.user.message_set.create(message='%s %s' % (_('You can not add a new agenda item for this team meeting.'), _('You are not a member of the team or on the LoCo Council.')))
312 return redirect( team_meeting_object )318 return redirect( team_meeting_object )
313319
320
314@login_required321@login_required
315def agenda_item_update(request, team_meeting_id, agenda_item_id):322def agenda_item_update(request, team_meeting_id, agenda_item_id):
316 """323 """
317 update agenda item324 update agenda item
318 """325 """
326
319 team_meeting_object = get_object_or_404(TeamMeeting, pk=team_meeting_id)327 team_meeting_object = get_object_or_404(TeamMeeting, pk=team_meeting_id)
320 agenda_item_object = get_object_or_404(AgendaItem, pk=agenda_item_id)328 agenda_item_object = get_object_or_404(AgendaItem, pk=agenda_item_id)
321 #check if user is admin or owner of a team329 #check if user is admin or owner of a team
322330
=== modified file 'loco_directory/templates/meetings/agenda_item_update.html'
--- loco_directory/templates/meetings/agenda_item_update.html 2011-10-05 00:50:53 +0000
+++ loco_directory/templates/meetings/agenda_item_update.html 2011-11-19 23:27:24 +0000
@@ -6,6 +6,7 @@
6{% block sub_nav_links %}6{% block sub_nav_links %}
7<a class="sub-nav-item" href="{% url team-meeting-detail team_meeting_object.first_team.lp_name team_meeting_object.id %}">{% trans "Back to Meeting Details" %}</a>7<a class="sub-nav-item" href="{% url team-meeting-detail team_meeting_object.first_team.lp_name team_meeting_object.id %}">{% trans "Back to Meeting Details" %}</a>
8<a class="sub-nav-item" href="{% url agenda-item-delete team_meeting_object.id agenda_item_object.id %}">{% trans "Delete Agenda Item" %}</a>8<a class="sub-nav-item" href="{% url agenda-item-delete team_meeting_object.id agenda_item_object.id %}">{% trans "Delete Agenda Item" %}</a>
9<a class="sub-nav-item" href="{% url agenda-item-add-child team_meeting_object.id agenda_item_object.id %}">{% trans "Add Child Item" %}</a>
9{% endblock %}10{% endblock %}
1011
11{% block extrahead %}{{ block.super }}12{% block extrahead %}{{ block.super }}

Subscribers

People subscribed via source and target branches