AtlasOfLivingAustralia / biocollect

Biocollect front end application
https://biocollect.ala.org.au/
Other
10 stars 15 forks source link

Record generation logic not taking the latest form #1512

Open temi opened 1 year ago

temi commented 1 year ago

If there are more than one published form with different versions, the template picked for record generation is not always the latest form. The issue is with below code.

MetadataService
def getOutputDataModel(templateName) {
        List forms = ActivityForm.where {
            status != Status.DELETED
            publicationStatus == PublicationStatus.PUBLISHED
            sections { templateName == templateName}
        }.list()

        ActivityForm form = forms.max{it.version}
        .......
    }
temi commented 1 year ago

https://support.ehelp.edu.au/a/tickets/167350

temi commented 1 year ago

linked to #1511