nqramjets 4 Report post Posted April 17, 2014 In order to maintain state in Plastic I'm attempting to use multiple attributes; It's easy enough to apply multiple attributes to a single branch, but I can't seem to get a find command to work. Unless I'm missing something there is no obvious way to get a cm find where clause to feature more than one attribute/attrvalue combination. In my case I have a branch with the following two attributes and values: Status = 'Deprecated' TestFlag = 'TRUE' This is only thing that seems reasonable to try, but does not work (not surprised really because there is only a single, unqualified "attrvalue") >cm find branches where attribute = 'Status' and attrvalue = 'Deprecated' and attribute = 'TestFlag' and attrvalue = 'TRUE' >Total: 0 Obviously I can test for one attribute individually and it works just fine. >cm find branches where attribute = 'TestFlag' and attrvalue = 'TRUE' >Total: 1 >cm find branches where attribute = 'Status' and attrvalue = 'Deprecated' >Total: 1 Isn't this a common thing? Is this not possible? Furthermore, I would really like this for use in the branch inclusion/exclusion/format rules! Thanks, Ryan Share this post Link to post Share on other sites
omris 0 Report post Posted November 18, 2018 Hello, Maybe someone has answer to this question? Share this post Link to post Share on other sites
manu 165 Report post Posted November 23, 2018 Hi @nqramjets! (OMG so sorry about the 4 years delay!) Hi @omris! (and welcome) My attributes: >cm find attributes objid:6@repid:490@repserver:localhost:8087 -- git-repo-sync --> 1ead4e7c-2305-411e-a36a-08283ad7eb50|Test1@catacroquer@cloud|https://github.com/PlasticSCM/plastic-cmdrunner.git objid:4@repid:490@repserver:localhost:8087 -- BUILD --> OK objid:4@repid:490@repserver:localhost:8087 -- STAGE --> B objid:496@repid:490@repserver:localhost:8087 -- BUILD --> NOK objid:496@repid:490@repserver:localhost:8087 -- STAGE --> B Total: 5 Combined query example #1: >cm find "branch where (attribute='BUILD' and attrvalue='OK') and (attribute='STAGE' and attrvalue='B')" --nototal 4 11/07/2013 12:42:36 /main manu LocalBoatGameTest1 T Combined query example #2: >cm find "branch where (attribute='BUILD' and attrvalue='NOK') and (attribute='STAGE' and attrvalue='B')" --nototal 496 23/11/2018 10:37:49 /main/task002 manu LocalBoatGameTest1 T Hope it helps! Share this post Link to post Share on other sites
omris 0 Report post Posted November 25, 2018 Thank's manu Share this post Link to post Share on other sites
nqramjets 4 Report post Posted December 18, 2018 Well this certainly would have helped! 1 Share this post Link to post Share on other sites
manu 165 Report post Posted December 19, 2018 Sorry for the long delay! @omris Revealed the unanswered topic. Share this post Link to post Share on other sites