The CreatorCon Call for Content is officially open! Get started here.

Adam Chapman
Tera Guru

Hello Everyone, 

I recently came up with a useful solution to help deployments move along a bit more seamlessly for my organization. Our team uses the Agile Development application to create and track work for our sprints. We also use Update Sets to build and move our work from lower environments up to Production. It has always been odd to me that there is no link or related list that tie Update Sets to Stories. The below solution is to solve for that. 

Considerations: Your deployment process may differ slightly or significantly from how our team does them. Below are the situations I needed to account for:

  • Our development happens in our Dev environment, but the Stories only live in our Production environment. Because of this, I could not just add a reference field to either table as the actual data is in two different instances.

  • We use the Stories Scrum view - List during the deployment process as a way to organize the update sets and sort them by the type of configuration item. This works well for the team so some of this process was built around still using that. 

  • Maybe not out of the ordinary, but we can have multiple update sets that are tied to a single story. In the case that we have multiple update sets, we also need to determine which to commit first. 

 


Solution: The solution here is pretty easy to implement - 

  1. On the sys_update_set table I added two fields - A string field called 'Story Number' and an int field called 'Deployment Order'
    find_real_file.png
  2. On the sys_relationship table, create a new record called 'Update Sets. The 'Applies to table' value will be Story[rm_story] and the 'Queries from table' value will be Update Set[sys_update_set].

    The code that creates the relationship:

     

    (function refineQuery(current, parent) {
    
    	//Get Story number
    	var storyNum = parent.getDisplayValue('number');
    	
    	//Query Update Set table for matching story number values
    	current.addEncodedQuery('state=complete^u_story_number=' + storyNum + '^ORDERBYu_deployment_order');
    
    })(current, parent);


    Form:

    find_real_file.png


  3. The last step is to add this relationship to your Story view - in our case the Scrum view. I chose to add a new Section to the form through the Form Configuration menu option. From there, select your new 'Update Sets' section and move your newly created relationship to 'selected'.
    find_real_file.png

Final Result:
find_real_file.png

 

Hopefully this is helpful for others. Let me know if there are any questions or recommendations!

Comments
Alex Wyckmans
Tera Contributor

Hi Adam,

 

On which instance do you fill in the STRY nr on the Update Set form, DEV of PROD? I suppose PROD because that information is not going to be transferred while deploying an update set from DEV to PROD.

 

This means that this info can only be added to the Update Set after it is previewed and committed on PROD, right?

 

Cheers,

Alex

GMunee
Tera Contributor

+ 1 to Alex's question.  And if that's true, what the point?

VagelieK
Tera Contributor

also interested in this.  I've been looking for a way to show progression of domain migration, and linkage between stories and update sets.  

Adam Chapman
Tera Guru

@Alex Wyckmans - I enter the Story Number (which only exists in Prod) into the new field on the Update Set form in Dev. The script in the sys_relationship record is what will populate that update set in the related list of the story. 

 

They don't need to be committed. When we grab the completed update sets from a lower environment via the Update Sources, they are loaded into the new environment and Previewed as part of that process. 

 

This is very specific to how we use the Agile Development module, so your mileage may vary as they say.

GMunee
Tera Contributor

So I understand.....

1. Create an update set in lower env.

2.  From the update set, tag the story.

3. Sys_relationship will make the relationship and tag the story in prod with the update set in Dev.  

 

Question:  Will this work when the update set goes from Dev env to Test env then to Prod env?

Adam Chapman
Tera Guru

@GMunee - Yes, the Story Number will be a field on the Update Set record, so it will travel wherever you move that to. 

GMunee
Tera Contributor

@Adam Chapman  Is there a way to make the story field a "reference type field" so that you can select the actual story in Prod?

Alex Wyckmans
Tera Contributor

Hi @Adam Chapman,

 

I'm still a big fan of your solution. Only I still have to figure out why the automatic update via the script in the sys_relationship table doesn't work.

 

But one tip I'd like to give you: in the detailed explanation you give for setting it all up, can't you include which steps should happen in which environment? Now it is still unclear whether it should be done in DEV or in PROD or in both.

 

Greetings from Belgium

ersureshbe
Giga Sage
Giga Sage

Hi, you can use the OOB UI action - 'Retrieve Story information' to retrieve the story information in the update set. It will help you to link the story with update set. You must follow the syntax of the update set name starts with story number.

shaikkhasim
Tera Contributor

Thanks, every one will understand

 

Alex Wyckmans
Tera Contributor

Hi @Adam,

 

You said in an earlier post the following:

AlexWyckmans_0-1670397617470.png

the Story Number will be a field on the Update Set record,

So for some unclear reason, this doesn't seem to work for me. Both fields are created and contain data but the transfer to a higher instance does not include that info.

Even when exporting the update set as XML you don't find the 2 fields in question and their information in the Update Set. Bizarre.

 

 

GMunee
Tera Contributor

Not working for me.  I followed steps to the T!

 

I have 3 envs.  Dev, Test, Prod.  I ran a test between Dev and Test.  

1.  Created Story in Test.

2.  Created Update Set in Dev.

3. Previewed update set in Test -> no dice.  Not seeing update set on the story

4. Committed update set in Test -> no dice.  Not seeing update set on the story

 

Thoughts?  @Adam Chapman 

Cdohert
Tera Contributor

@VagelieK  - did this ever work for you? Curious since I am looking for the exact use case ("....looking for a way to show progression of domain migration, and linkage between stories and update sets")!

 

@Adam Chapman - any updates or recommended solutions you've seen in your two years since posting? jw - 

valalves
Tera Contributor

subscribing to get updates as I'm also interested. @Adam Chapman 

CezaryBasta
Tera Guru

@GMunee @Cdohert @valalves If you are working with remote instances, you won't see your update set in the sys_update_set table on the top instance. Update sets retrieved from lower instances are saved within the sys_remote_update_set table. 

So create a relationship to that table and you will be all set 🙂

CezaryBasta_0-1707825302151.png

 

Thomas Berge
Tera Expert

Works for me but only if I go back into the update set once retrieved and re-enter the story number. It doesn't follow when update set is retrieved. 

Kristin SM
Tera Explorer

I was inspired by this but implemented sligthly differently to avoid customizing the OOTB update set table.
We already had a well implemented practice of entering story numbers into update set names following an initials prefix to identify the developer, so introducing a new field would create a possible source of error right from the start, and would require a change of habits for our devs. It would also not be "backwards compatible"; i.e. older update sets would need to be edited or not discovered by this logic.


Instead, I simply created a scripted relationship visible from Stories, i.e. a Related List viewing retrieved update sets where update set name contains story number. 

KristinSM_0-1742897116446.png

KristinSM_2-1742897243573.png

 

 


I also created a scripted relationship visible from Release, i.e. a Related List viewing retrieved update sets where update set name contains any story number related to that release. 

KristinSM_1-1742897189631.png

KristinSM_3-1742897327365.png

 

 

 


I purposely used retrieved update sets table, so that it's easy to see update sets related to a story whether they have already been committed to prod or not, and so the update sets would be visible in story/release without any new action needed to be taken. If we have stories that need to be tweaked after first attempt at going into prod, both older and newer update sets will be visible in the story as soon as they are retrieved into production. It's also backwards compatible, meaning when we look up older stories from before these related lists were implemented, as long as naming standard was followed by including story number in update set name, we can see all update sets connected to that story. 

I'm now brainstorming how to implement keeping track of application versions for custom apps, so we can track in Stories/Releases which application version is published as a result of the story

Version history
Last update:
‎03-25-2022 01:08 PM
Updated by: