archimatetool / archi

Archi: ArchiMate Modelling Tool
https://www.archimatetool.com
MIT License
914 stars 267 forks source link

Label Expressions: <relationship>: expression only seems to work with relationships in View #970

Closed lavenderb closed 8 months ago

lavenderb commented 8 months ago

I'm not sure whether this is a bug or a conscious design restriction but

Version of Archi

5.0.2

Archi Plug-ins

Yes - all but not relevant

Operating System

Windows

Expected Behaviour

I would like (had expected) that the following label expression would work in all circumstances where the relationship exists: ${name} ($assignment:target{name})

Actual Behaviour

Instead it only works when the relationship is present in the View (in which case, it isn't needed!)

Steps to Reproduce the Behaviour

Just create the following model fragment - toggle the SystemSoftware in & out of the view. Label Bug

Phillipus commented 8 months ago

Hi, yes that's the expected behaviour.

lavenderb commented 8 months ago

Thanks for your quick reply PhilI guess there must be a good reason why it is this way? If you can also see why model scope would be useful, pls add it to the wish list 🙂

Phillipus commented 8 months ago

Hi, the label expressions have always worked on a per view basis, so that you can have different label expressions for each context.

lavenderb commented 8 months ago

All clear, thanks Phil I’d understood that the label could be used to show different text in different views, but it is obviously goes deeper than that I’ll use scripting instead 😊

From: Phil Beauvoir @.> Sent: 07 October 2023 13:39 To: archimatetool/archi @.> Cc: Steven Bradley @.>; Author @.> Subject: Re: [archimatetool/archi] Label Expressions: : expression only seems to work with relationships in View (Issue #970)

Hi, the label expressions have always worked on a per view basis, so that you can have different label expressions for each context.

— Reply to this email directly, view it on GitHub https://github.com/archimatetool/archi/issues/970#issuecomment-1751689501 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AH7XOEU2M3AEQJA5AQ6E5LDX6E5NTAVCNFSM6AAAAAA5W3B6R6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJRGY4DSNJQGE . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AH7XOEXXSFZI57QJTEZ2523X6E5NTA5CNFSM6AAAAAA5W3B6R6WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTINCUR2.gif Message ID: @. @.> >

Phillipus commented 8 months ago

I opened https://github.com/archimatetool/archi/issues/972 so I'll close this one.