Does this sound familiar?
Our end users/UAT testers/backseat project managers want to know what’s in the latest release of the app.
– Clueless Project Manager – 2022
You’ve already sent out an email containing all the fixes, changes, new additions, but still, they ask. They’re in ADO, they’re in Slack, they’re in Robert’s inbox that he meticulously sorts and filters, so everything is in its place, but he can’t be arsed to open it…what’s the point Bob? Why are you the way you are?
Don’t be like Bob.
With the introduction of custom pages in Model Driven Apps I thought, there must be a way I can leverage this and have a consistent publication of all releases across multiple environments.
Just so happens I found a way that worked for me, SharePoint lists. Everyone has access to SharePoint and the data is innocuous, so security shouldn’t be an issue.
What I did.
I created a SharePoint List in a public SharePoint, 3 columns.
Title | Notes | App Version |
In my existing Model Driven App, I added a new Custom Page from the App Designer and just chose a basic template, Header, Footer, and Main containers, you do you though.
Connected to the List i created earlier, dropped in a gallery and voila! We have all the release notes in one place.
Simple, yet effective.
So we have a basic page that all the notes can come into, what else should we do?
First off I wanted a way for only admins to be able to add release notes, so we can leverage the security profile of the logged in user using the systemuserroles_association from the Users table.
In the App onStart function we ClearCollect the user roles for the logged in user and then set a variable isAdmin that checks the collection if the System Administrator role exists, if so we get a 1 else a 0.
ClearCollect( colUserRoles, (LookUp( Users, domainname = User().Email ).'Security Roles (systemuserroles_association)').Name ); Set(isAdmin, CountRows( Filter( colUserRoles, Name = "System Administrator" ) ));
I then use this value to set the visibility of the Add New function in the page, also the edit and delete functions of the gallery item.
Because we are not heathens, collect your items onStart.
ClearCollect( colNotes, ShowColumns( 'Release Notes_1', "Title", "Notes", "AppVersion" ) )
Next a drop down on the page that is filtered to show the app versions and defaulted to show the latest release.
// ITEMS Distinct( ShowColumns( colNotes, "AppVersion" ), AppVersion ) // DefaultSelectedItems Last(colNotes)
Filter our gallery to show what version we select.
Filter( 'Release Notes_1', 'App Version' = cmbVersionSelector.Selected.Result )
Now how you want to display your release notes is up to you, you can insert a multiline text field, but you can’t really have bullet points to format your changes.
You can have a HTML Element, but you will have to format the text in SharePoint.
You could even display a RTE element and set it to View.
Personally, I like the ease of the RTE component, I can copy a bulleted list from word, excel, ADO and paste it into the SharePoint list directly and it shows up nicely formatted. Point is, you do what is easiest and more appealing to you.
Finally, getting data into your release notes, you can go the route where we create new notes in the Custom page like i showed in the video, you can add them directly to the SharePoint list, you could even look to automate it from your dev board.
From the Page itself is a simple patch statement, this is mine.
Patch( 'Release Notes_1', Defaults('Release Notes_1'), { Title: inpNewTitle.Value, Notes: inpNewNote.Value, 'App Version': If( chbNewVersion.Checked, inpNewVersion.Value, cmbVersionSelection.Selected.Result ) } );
What I made for this PoC is not something I would hang in the Tate by any means but the core idea and functionality is there and simple.
Considerations.
- I haven’t gone over how to alert users of a latest version, be that A toast notification, a custom plugin that users must dismiss. Currently it is just…there. A future post…maybe.
- Datasource, for my POC I didn’t have access to an ADO release board, so I couldn’t test this with a connector, give it a go and write about it.
- Dev, UAT, Prod to show different versions, sure, you could implement some kind of version control via an option set where before the app is pushed to the next environment you select the destination and only show items that are marked for that environment.