Re: 2 questions: unique properties + history

Nagy Gabor <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.user
Message-ID <20210304113636.4b028681@Dell>
Dear John,

Thank you for providing the source code of roundup_admin, it helped a
lot (your page did not let me in with demo/demo, but I installed it to
my machine), I've managed to create my own wizard. I ran into a bug and
of course I have a new question. :) Please let me use this ML to report
bugs, it is easier to me, and as I see, this ML is quite quiet. :)

1.
BUG: In the web interface, context.property.menu(value="text") does not
work, for example context.status.menu(value="new") will throw an
IndexError "no such status new"

As I see, the reason for this in LinkHTMLProperty.menu of
roundup.cgi.templating (lines 2372-2374 in v2.0.0):

        # make sure we list the current value if it's retired
        if value and value not in options:
            options.insert(0, value)

Then later in the loop "for optionid in options:" we assume that the
list options contains IDs only, leading to the the error:

 # get the option value, and if it's None use an empty
string option = linkcl.get(optionid, k) or ''

If I comment out options.insert line above, it works at expected (I
mean, the value can be referenced by labelprop).

And a personal comment for the line  "if value in [optionid, option]:"
and for this whole "referecing by labelprop" topic: I think it is not
recommended to set a labelprop to be a number (string). For example,
setting name="1" for status could lead to undesired behaviour. (Maybe
this should be included in the documentation.) 

I think I will rather use the option default_value="new" for
default status in the tracker schema. 

My questions:
2. In my custom cgi Action, it is allowed to modify form values?
For example, self.form['wizard_page'].value = "1" will not break
anything, right? (It seems to work though.)

Again, thank you for the useful information.

Regards,
Gábor



> In message <20210226124707.4bc5eb0b@fejer>,
> Nagy Gabor writes:
> 
> >In fact, I want to write a wizard for editing issues and to mimic a
> >process management system: The layout of issue.item html page should
> >depend on the actual status of the issue. For example, if the status
> >is "new", then I want to restrict user to set the status to
> >"phase1A" or "phase1B". (And I don't want to use the "menu" method,
> >a hidden status variable should be set silently by an onclick
> >javascript action when the user pressed a  button - and for this, I
> >will need the IDs of the statuses).
> >
> >But after thinking on this a bit, I realized that I should probably
> >follow the relevant part of the customization guide (and search for
> >working examples for inspection):
> >https://roundup-tracker.org/docs/customizing.html#setting-up-a-wizard-or-druid-for-controlled-adding-of-issues
> > 
> 
> You can look at https://rouilj.dynamic-dns.net/demo/ login with demo
> password demo. Take a look at the "Create with Druid" option under
> issues.
> 
> If you want to look at the source, it can be downloaded from the
> fossil instance at
> https://rouilj.dynamic-dns.net/fossil/roundup_sysadmin/home.
> 
> At the very least it will give you an idea of what you can do with
> roundup.
> 
> 
> >OK. Unfortunately, I am not a Python expert and I am far from
> >complete understanding of Roundup code.  
> 
> I actually started with python by making my own tracker using roundup.
> 
> >I think most of my questions are implied by this: I am trying to
> >understand what Roundup can and cannot do. But I do not want to spam
> >this ML with Q&A emails, I will use irc instead (I just have to find
> >a good time for most timezones :).  
> 
> Feel free to use the emailing list. I do have a logger attached to the
> IRC channel, but the mailing list and wiki are what most people use.
> When I was learning roundup, I would email Richard (Jones, the
> original author) late at night my time (US, east coast). He would fix
> things during his daytime (Australia) and email me back so I could
> spend the evening working on roundup.
> 
> >But if I implement this to the (hyper)database layer, I will
> >definitely submit a patch. :)  
> 
> Cool.
> 
> >My little contribution now is just a bugreport in customization
> >guide: The first line of 
> >https://roundup-tracker.org/docs/customizing.html#editing-multiple-items-in-an-index-view
> >issue.index.html should be mentioned instead of issue.item.html  
> 
> I'll get that fix in later today uless somebody beats me to it. That
> while doc needs to be resructured and possibly split into two
> (Reference and cookbok with examples maybe). It is too difficult to
> find info in it currently IMO.
> 
> --
> 				-- rouilj
> John Rouillard
> ===========================================================================
> My employers don't acknowledge my existence much less my opinions.


_______________________________________________
Roundup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/roundup-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.