Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

put the band name at the end so the gig name gets more real estate #491

Merged
merged 2 commits into from
Jun 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/caldav.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def make_calfeed(the_title, the_events, the_language, the_uid):

def _make_summary(event):
""" makes the summary: the title, plus band name and status """
return f'{event.band.name}:{event.title} ({GigStatusChoices(event.status).label})'
return f'{event.title} ({GigStatusChoices(event.status).label}) - {event.band.name}'

def _make_description(event):
""" description is the details, plus the setlist """
Expand Down
4 changes: 2 additions & 2 deletions lib/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,14 @@ def test_calfeed_summary(self):
self.testgig.setlist = 'test set'
self.testgig.save()
cf = make_calfeed(b'flim-flam', self.band.gigs.all(),self.joeuser.preferences.language, self.joeuser.cal_feed_id)
self.assertIn(b'SUMMARY:test band:New Gig (Unconfirmed)\r\n',cf)
self.assertIn(b'SUMMARY:New Gig (Unconfirmed) - test band\r\n',cf)

def test_calfeed_translation(self):
self.testgig.details = 'test details'
self.testgig.setlist = 'test set'
self.testgig.save()
cf = make_calfeed(b'flim-flam', self.band.gigs.all(),'de', self.joeuser.cal_feed_id)
self.assertIn(b'SUMMARY:test band:New Gig (Nicht fixiert)\r\n',cf)
self.assertIn(b'SUMMARY:New Gig (Nicht fixiert) - test band\r\n',cf)


class CaldavFileTest(FSTestCase):
Expand Down
Loading